2000-06-09 05:31:11 +00:00
|
|
|
|
2000-06-11 07:04:57 +00:00
|
|
|
// special.cpp
|
1997-10-18 11:34:02 +00:00
|
|
|
|
2000-06-11 07:04:57 +00:00
|
|
|
// Methods for dviwin which deal with "\special" commands found in the
|
|
|
|
// DVI file
|
|
|
|
|
2001-03-15 15:11:36 +00:00
|
|
|
// Copyright 2000--2001, Stefan Kebekus (stefan.kebekus@uni-bayreuth.de).
|
2000-06-11 07:04:57 +00:00
|
|
|
|
|
|
|
|
2003-03-07 11:54:35 +00:00
|
|
|
#include <kdebug.h>
|
|
|
|
#include <klocale.h>
|
2003-03-14 17:09:06 +00:00
|
|
|
#include <kprocio.h>
|
2000-06-23 00:22:44 +00:00
|
|
|
#include <qdir.h>
|
2003-03-07 11:54:35 +00:00
|
|
|
#include <qfile.h>
|
2000-06-23 00:22:44 +00:00
|
|
|
#include <qfileinfo.h>
|
2001-05-15 08:43:44 +00:00
|
|
|
#include <qstringlist.h>
|
2000-05-27 05:05:03 +00:00
|
|
|
|
2000-05-20 05:08:51 +00:00
|
|
|
#include "dviwin.h"
|
2001-03-05 23:16:05 +00:00
|
|
|
#include "kdvi.h"
|
2003-02-05 08:17:23 +00:00
|
|
|
#include "xdvi.h"
|
2000-06-09 05:31:11 +00:00
|
|
|
|
2000-02-29 11:27:53 +00:00
|
|
|
|
2000-06-09 05:31:11 +00:00
|
|
|
extern QPainter foreGroundPaint;
|
1997-10-18 11:34:02 +00:00
|
|
|
|
2000-06-11 07:04:57 +00:00
|
|
|
void dviWindow::html_anchor_special(QString cp)
|
1997-10-18 11:34:02 +00:00
|
|
|
{
|
2000-06-11 07:04:57 +00:00
|
|
|
if (PostScriptOutPutString != NULL) { // only during scanning, not during rendering
|
|
|
|
cp.truncate(cp.find('"'));
|
|
|
|
#ifdef DEBUG_SPECIAL
|
2001-03-15 15:11:36 +00:00
|
|
|
kdDebug(4300) << "HTML-special, anchor " << cp.latin1() << endl;
|
|
|
|
kdDebug(4300) << "page " << current_page << endl;
|
2000-06-07 01:41:55 +00:00
|
|
|
#endif
|
2000-06-11 07:04:57 +00:00
|
|
|
|
2003-02-19 12:54:27 +00:00
|
|
|
anchorList[cp] = DVI_Anchor(current_page, currinf.data.dvi_v);
|
2000-06-11 07:04:57 +00:00
|
|
|
}
|
1997-10-18 11:34:02 +00:00
|
|
|
}
|
|
|
|
|
2000-06-09 05:31:11 +00:00
|
|
|
void dviWindow::html_href_special(QString cp)
|
|
|
|
{
|
|
|
|
cp.truncate(cp.find('"'));
|
|
|
|
|
|
|
|
#ifdef DEBUG_SPECIAL
|
2001-03-15 15:11:36 +00:00
|
|
|
kdDebug(4300) << "HTML-special, href " << cp.latin1() << endl;
|
2000-06-09 05:31:11 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
if (!PostScriptOutPutString) { // only when rendering really takes place
|
|
|
|
HTML_href = new QString(cp);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void dviWindow::html_anchor_end(void)
|
|
|
|
{
|
|
|
|
#ifdef DEBUG_SPECIAL
|
2001-03-15 15:11:36 +00:00
|
|
|
kdDebug(4300) << "HTML-special, anchor-end" << endl;
|
2000-06-09 05:31:11 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
if (HTML_href != NULL) {
|
|
|
|
delete HTML_href;
|
|
|
|
HTML_href = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void dviWindow::header_special(QString cp)
|
|
|
|
{
|
|
|
|
#ifdef DEBUG_SPECIAL
|
2001-03-15 15:11:36 +00:00
|
|
|
kdDebug(4300) << "PostScript-special, header " << cp.latin1() << endl;
|
2000-06-09 05:31:11 +00:00
|
|
|
#endif
|
|
|
|
|
2000-06-11 07:04:57 +00:00
|
|
|
if (PostScriptOutPutString && QFile::exists(cp)) {
|
2000-06-23 00:22:44 +00:00
|
|
|
PS_interface->PostScriptHeaderString->append( QString(" (%1) run\n").arg(cp) );
|
2000-06-09 05:31:11 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2001-08-20 16:13:34 +00:00
|
|
|
void dviWindow::source_special(QString cp)
|
|
|
|
{
|
2003-01-16 15:45:13 +00:00
|
|
|
if (PostScriptOutPutString == NULL) {
|
|
|
|
// only when rendering really takes place: set source_href to the
|
|
|
|
// current special string. When characters are rendered, the
|
|
|
|
// rendering routine will then generate a DVI_HyperLink and add it
|
|
|
|
// to the proper list. This DVI_HyperLink is used to match mouse
|
|
|
|
// positions with the hyperlinks for inverse search.
|
2001-09-03 08:57:03 +00:00
|
|
|
if (source_href)
|
|
|
|
*source_href = cp;
|
|
|
|
else
|
|
|
|
source_href = new QString(cp);
|
2003-01-16 15:45:13 +00:00
|
|
|
} else {
|
|
|
|
// if no rendering takes place, i.e. when the DVI file is first
|
|
|
|
// loaded, generate a DVI_SourceFileAnchor. These anchors are used
|
|
|
|
// in forward search, i.e. to relate references line
|
|
|
|
// "src:123file.tex" to positions in the DVI file
|
|
|
|
|
|
|
|
// extract the file name and the numeral part from the string
|
|
|
|
Q_UINT32 j;
|
|
|
|
for(j=0;j<cp.length();j++)
|
|
|
|
if (!cp.at(j).isNumber())
|
|
|
|
break;
|
|
|
|
Q_UINT32 sourceLineNumber = cp.left(j).toUInt();
|
|
|
|
QString sourceFileName = QFileInfo(cp.mid(j).stripWhiteSpace()).absFilePath();
|
2003-02-19 12:54:27 +00:00
|
|
|
DVI_SourceFileAnchor sfa(sourceFileName, sourceLineNumber, current_page, currinf.data.dvi_v);
|
2003-01-16 15:45:13 +00:00
|
|
|
sourceHyperLinkAnchors.push_back(sfa);
|
|
|
|
}
|
2001-08-20 16:13:34 +00:00
|
|
|
}
|
|
|
|
|
2000-06-11 07:04:57 +00:00
|
|
|
static void parse_special_argument(QString strg, const char *argument_name, int *variable)
|
2000-06-07 01:41:55 +00:00
|
|
|
{
|
|
|
|
bool OK;
|
|
|
|
|
|
|
|
int index = strg.find(argument_name);
|
|
|
|
if (index >= 0) {
|
|
|
|
QString tmp = strg.mid(index + strlen(argument_name));
|
|
|
|
tmp.truncate(tmp.find(' '));
|
2002-04-10 09:46:39 +00:00
|
|
|
float tmp_float = tmp.toFloat(&OK);
|
2000-06-07 01:41:55 +00:00
|
|
|
if (OK)
|
2002-04-10 09:46:39 +00:00
|
|
|
*variable = (int)(tmp_float+0.5);
|
2000-06-07 01:41:55 +00:00
|
|
|
else
|
2000-07-08 11:10:43 +00:00
|
|
|
// Maybe we should open a dialog here.
|
2001-03-15 15:11:36 +00:00
|
|
|
kdError(4300) << i18n("Malformed parameter in the epsf special command.") << endl;
|
2000-06-07 01:41:55 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2000-06-09 05:31:11 +00:00
|
|
|
void dviWindow::epsf_special(QString cp)
|
1997-10-18 11:34:02 +00:00
|
|
|
{
|
2000-06-11 07:04:57 +00:00
|
|
|
#ifdef DEBUG_SPECIAL
|
2001-03-15 15:11:36 +00:00
|
|
|
kdDebug(4300) << "epsf-special: psfile=" << cp <<endl;
|
2000-06-11 07:04:57 +00:00
|
|
|
#endif
|
2000-06-07 01:41:55 +00:00
|
|
|
|
2000-06-09 05:31:11 +00:00
|
|
|
QString include_command = cp.simplifyWhiteSpace();
|
2000-06-07 01:41:55 +00:00
|
|
|
|
|
|
|
// The line is supposed to start with "..ile=", and then comes the
|
2000-09-19 12:20:04 +00:00
|
|
|
// filename. Figure out what the filename is and stow it away. Of
|
|
|
|
// course, this does not work if the filename contains spaces
|
|
|
|
// (already the simplifyWhiteSpace() above is wrong). If you have
|
|
|
|
// files like this, go away.
|
2000-06-23 00:22:44 +00:00
|
|
|
QString EPSfilename = include_command;
|
|
|
|
EPSfilename.truncate(EPSfilename.find(' '));
|
2000-09-19 12:20:04 +00:00
|
|
|
|
|
|
|
// Strip enclosing quotation marks which are included by some LaTeX
|
|
|
|
// macro packages (but not by others). This probably means that
|
|
|
|
// graphic files are no longer found if the filename really does
|
|
|
|
// contain quotes, but we don't really care that much.
|
|
|
|
if ((EPSfilename.at(0) == '\"') && (EPSfilename.at(EPSfilename.length()-1) == '\"')) {
|
|
|
|
EPSfilename = EPSfilename.mid(1,EPSfilename.length()-2);
|
|
|
|
}
|
|
|
|
|
2002-04-11 06:40:20 +00:00
|
|
|
// Now see if the Gfx file exists... try to find it in the current
|
|
|
|
// directory, in the DVI file's directory, and finally, if all else
|
|
|
|
// fails, use kpsewhich to find the file. Later on, we should
|
|
|
|
// probably use the DVI file's baseURL, once this is implemented.
|
2000-06-23 00:22:44 +00:00
|
|
|
if (! QFile::exists(EPSfilename)) {
|
|
|
|
QFileInfo fi1(dviFile->filename);
|
|
|
|
QFileInfo fi2(fi1.dir(),EPSfilename);
|
|
|
|
if (fi2.exists())
|
|
|
|
EPSfilename = fi2.absFilePath();
|
2002-04-11 06:40:20 +00:00
|
|
|
else {
|
2002-12-07 00:00:38 +00:00
|
|
|
// Use kpsewhich to find the eps file.
|
2003-03-14 17:09:06 +00:00
|
|
|
KProcIO proc;
|
|
|
|
proc << "kpsewhich" << EPSfilename;
|
|
|
|
proc.start(KProcess::Block);
|
|
|
|
proc.readln(EPSfilename);
|
|
|
|
EPSfilename = EPSfilename.stripWhiteSpace();
|
2001-05-15 08:43:44 +00:00
|
|
|
}
|
2000-06-23 00:22:44 +00:00
|
|
|
}
|
2000-09-19 12:20:04 +00:00
|
|
|
|
2000-06-07 01:41:55 +00:00
|
|
|
// Now parse the arguments.
|
|
|
|
int llx = 0;
|
|
|
|
int lly = 0;
|
|
|
|
int urx = 0;
|
|
|
|
int ury = 0;
|
|
|
|
int rwi = 0;
|
|
|
|
int rhi = 0;
|
2001-03-15 15:11:36 +00:00
|
|
|
int angle = 0;
|
2000-06-07 01:41:55 +00:00
|
|
|
|
|
|
|
// just to avoid ambiguities; the filename could contain keywords
|
|
|
|
include_command = include_command.mid(include_command.find(' '));
|
|
|
|
|
|
|
|
parse_special_argument(include_command, "llx=", &llx);
|
|
|
|
parse_special_argument(include_command, "lly=", &lly);
|
|
|
|
parse_special_argument(include_command, "urx=", &urx);
|
|
|
|
parse_special_argument(include_command, "ury=", &ury);
|
|
|
|
parse_special_argument(include_command, "rwi=", &rwi);
|
|
|
|
parse_special_argument(include_command, "rhi=", &rhi);
|
2001-03-15 15:11:36 +00:00
|
|
|
parse_special_argument(include_command, "angle=", &angle);
|
2000-06-07 01:41:55 +00:00
|
|
|
|
2000-06-09 05:31:11 +00:00
|
|
|
if (PostScriptOutPutString) {
|
2000-06-23 00:22:44 +00:00
|
|
|
if (QFile::exists(EPSfilename)) {
|
2003-03-07 11:54:35 +00:00
|
|
|
double PS_H = (currinf.data.dvi_h*300.0)/(65536*MFResolutions[MetafontMode])-300;
|
|
|
|
double PS_V = (currinf.data.dvi_v*300.0)/MFResolutions[MetafontMode] - 300;
|
2000-06-30 06:41:47 +00:00
|
|
|
PostScriptOutPutString->append( QString(" %1 %2 moveto\n").arg(PS_H).arg(PS_V) );
|
2000-06-11 07:04:57 +00:00
|
|
|
PostScriptOutPutString->append( "@beginspecial " );
|
|
|
|
PostScriptOutPutString->append( QString(" %1 @llx").arg(llx) );
|
|
|
|
PostScriptOutPutString->append( QString(" %1 @lly").arg(lly) );
|
|
|
|
PostScriptOutPutString->append( QString(" %1 @urx").arg(urx) );
|
|
|
|
PostScriptOutPutString->append( QString(" %1 @ury").arg(ury) );
|
|
|
|
if (rwi != 0)
|
|
|
|
PostScriptOutPutString->append( QString(" %1 @rwi").arg(rwi) );
|
|
|
|
if (rhi != 0)
|
2001-03-05 23:16:05 +00:00
|
|
|
PostScriptOutPutString->append( QString(" %1 @rhi").arg(rhi) );
|
2001-03-15 15:11:36 +00:00
|
|
|
if (angle != 0)
|
|
|
|
PostScriptOutPutString->append( QString(" %1 @angle").arg(angle) );
|
2000-06-11 07:04:57 +00:00
|
|
|
PostScriptOutPutString->append( " @setspecial \n" );
|
2000-06-23 00:22:44 +00:00
|
|
|
PostScriptOutPutString->append( QString(" (%1) run\n").arg(EPSfilename) );
|
2000-06-11 07:04:57 +00:00
|
|
|
PostScriptOutPutString->append( "@endspecial \n" );
|
|
|
|
}
|
2000-06-09 05:31:11 +00:00
|
|
|
} else {
|
2000-06-23 00:22:44 +00:00
|
|
|
if (!_postscript || !QFile::exists(EPSfilename)) {
|
2001-03-05 23:16:05 +00:00
|
|
|
// Don't show PostScript, just draw the bounding box. For this,
|
|
|
|
// calculate the size of the bounding box in Pixels.
|
2000-06-11 07:04:57 +00:00
|
|
|
double bbox_width = urx - llx;
|
2001-03-05 23:16:05 +00:00
|
|
|
double bbox_height = ury - lly;
|
2000-06-11 07:04:57 +00:00
|
|
|
|
|
|
|
if ((rwi != 0)&&(bbox_width != 0)) {
|
2001-08-28 13:01:30 +00:00
|
|
|
bbox_height *= rwi/bbox_width;
|
2000-06-11 07:04:57 +00:00
|
|
|
bbox_width = rwi;
|
|
|
|
}
|
|
|
|
if ((rhi != 0)&&(bbox_height != 0)) {
|
2001-03-05 23:16:05 +00:00
|
|
|
bbox_width *= rhi/bbox_height;
|
2000-06-11 07:04:57 +00:00
|
|
|
bbox_height = rhi;
|
|
|
|
}
|
|
|
|
|
2003-03-07 11:54:35 +00:00
|
|
|
bbox_width *= 0.1 * 65536.0*fontPixelPerDVIunit() / shrinkfactor;
|
|
|
|
bbox_height *= 0.1 * 65536.0*fontPixelPerDVIunit() / shrinkfactor;
|
2000-06-11 07:04:57 +00:00
|
|
|
|
2003-03-07 11:54:35 +00:00
|
|
|
QRect bbox(((int) ((currinf.data.dvi_h) / (shrinkfactor * 65536))), currinf.data.pxl_v - (int)bbox_height, (int)bbox_width, (int)bbox_height);
|
2001-08-08 12:50:03 +00:00
|
|
|
foreGroundPaint.save();
|
2000-06-23 00:22:44 +00:00
|
|
|
if (QFile::exists(EPSfilename))
|
2000-06-11 07:04:57 +00:00
|
|
|
foreGroundPaint.setBrush(Qt::lightGray);
|
|
|
|
else
|
|
|
|
foreGroundPaint.setBrush(Qt::red);
|
|
|
|
foreGroundPaint.setPen(Qt::black);
|
|
|
|
foreGroundPaint.drawRoundRect(bbox, 2, 2);
|
2000-06-23 00:22:44 +00:00
|
|
|
if (QFile::exists(EPSfilename))
|
2001-11-27 13:36:22 +00:00
|
|
|
foreGroundPaint.drawText (bbox, (int)(Qt::AlignCenter), EPSfilename, -1);
|
2000-06-11 07:04:57 +00:00
|
|
|
else
|
|
|
|
foreGroundPaint.drawText (bbox, (int)(Qt::AlignCenter),
|
2003-01-02 22:58:27 +00:00
|
|
|
i18n("File not found: \n %1").arg(EPSfilename), -1);
|
2001-08-08 12:50:03 +00:00
|
|
|
foreGroundPaint.restore();
|
2000-05-27 05:05:03 +00:00
|
|
|
}
|
|
|
|
}
|
2000-06-09 05:31:11 +00:00
|
|
|
return;
|
1997-10-18 11:34:02 +00:00
|
|
|
}
|
|
|
|
|
2000-06-09 05:31:11 +00:00
|
|
|
void dviWindow::bang_special(QString cp)
|
1997-10-18 11:34:02 +00:00
|
|
|
{
|
2000-06-09 05:31:11 +00:00
|
|
|
#ifdef DEBUG_SPECIAL
|
2001-03-15 15:11:36 +00:00
|
|
|
kdDebug(4300) << "PostScript-special, literal header " << cp.latin1() << endl;
|
2000-06-09 05:31:11 +00:00
|
|
|
#endif
|
|
|
|
|
2003-02-28 08:27:07 +00:00
|
|
|
if (PostScriptOutPutString) {
|
2000-06-23 00:22:44 +00:00
|
|
|
PS_interface->PostScriptHeaderString->append( " @defspecial \n" );
|
|
|
|
PS_interface->PostScriptHeaderString->append( cp );
|
|
|
|
PS_interface->PostScriptHeaderString->append( " @fedspecial \n" );
|
2000-05-27 05:05:03 +00:00
|
|
|
}
|
1997-10-18 11:34:02 +00:00
|
|
|
}
|
|
|
|
|
2000-06-09 05:31:11 +00:00
|
|
|
void dviWindow::quote_special(QString cp)
|
2000-06-07 01:41:55 +00:00
|
|
|
{
|
2000-06-09 05:31:11 +00:00
|
|
|
#ifdef DEBUG_SPECIAL
|
2001-03-15 15:11:36 +00:00
|
|
|
kdError(4300) << "PostScript-special, literal PostScript " << cp.latin1() << endl;
|
2000-06-09 05:31:11 +00:00
|
|
|
#endif
|
2000-06-07 01:41:55 +00:00
|
|
|
|
2003-02-28 08:27:07 +00:00
|
|
|
if (PostScriptOutPutString) {
|
2003-03-07 11:54:35 +00:00
|
|
|
double PS_H = (currinf.data.dvi_h*300.0)/(65536*MFResolutions[MetafontMode])-300;
|
|
|
|
double PS_V = (currinf.data.dvi_v*300.0)/MFResolutions[MetafontMode] - 300;
|
2000-06-30 06:41:47 +00:00
|
|
|
PostScriptOutPutString->append( QString(" %1 %2 moveto\n").arg(PS_H).arg(PS_V) );
|
2000-06-09 05:31:11 +00:00
|
|
|
PostScriptOutPutString->append( " @beginspecial @setspecial \n" );
|
|
|
|
PostScriptOutPutString->append( cp );
|
|
|
|
PostScriptOutPutString->append( " @endspecial \n" );
|
2000-05-27 05:05:03 +00:00
|
|
|
}
|
1997-10-18 11:34:02 +00:00
|
|
|
}
|
|
|
|
|
2001-03-15 15:11:36 +00:00
|
|
|
void dviWindow::ps_special(QString cp)
|
|
|
|
{
|
|
|
|
#ifdef DEBUG_SPECIAL
|
|
|
|
kdError(4300) << "PostScript-special, direct PostScript " << cp.latin1() << endl;
|
|
|
|
#endif
|
|
|
|
|
2003-02-28 08:27:07 +00:00
|
|
|
if (PostScriptOutPutString) {
|
2003-03-07 11:54:35 +00:00
|
|
|
double PS_H = (currinf.data.dvi_h*300.0)/(65536*MFResolutions[MetafontMode])-300;
|
|
|
|
double PS_V = (currinf.data.dvi_v*300.0)/MFResolutions[MetafontMode] - 300;
|
2001-03-15 15:11:36 +00:00
|
|
|
|
|
|
|
if (cp.find("ps::[begin]", 0, false) == 0) {
|
|
|
|
PostScriptOutPutString->append( QString(" %1 %2 moveto\n").arg(PS_H).arg(PS_V) );
|
|
|
|
PostScriptOutPutString->append( QString(" %1\n").arg(cp.mid(11)) );
|
|
|
|
} else {
|
|
|
|
if (cp.find("ps::[end]", 0, false) == 0) {
|
|
|
|
PostScriptOutPutString->append( QString(" %1\n").arg(cp.mid(9)) );
|
|
|
|
} else {
|
|
|
|
if (cp.find("ps::", 0, false) == 0) {
|
|
|
|
PostScriptOutPutString->append( QString(" %1\n").arg(cp.mid(4)) );
|
|
|
|
} else {
|
|
|
|
PostScriptOutPutString->append( QString(" %1 %2 moveto\n").arg(PS_H).arg(PS_V) );
|
|
|
|
PostScriptOutPutString->append( QString(" %1\n").arg(cp.mid(3)) );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2000-06-09 05:31:11 +00:00
|
|
|
void dviWindow::applicationDoSpecial(char *cp)
|
1997-10-18 11:34:02 +00:00
|
|
|
{
|
2000-06-07 01:41:55 +00:00
|
|
|
QString special_command(cp);
|
2001-08-13 07:37:47 +00:00
|
|
|
|
|
|
|
// Encapsulated Postscript File
|
|
|
|
if (special_command.find("src:", 0, false) == 0) {
|
2001-08-20 16:13:34 +00:00
|
|
|
source_special(special_command.mid(4));
|
2001-08-13 07:37:47 +00:00
|
|
|
return;
|
|
|
|
}
|
2000-06-07 01:41:55 +00:00
|
|
|
|
2000-06-09 05:31:11 +00:00
|
|
|
// Literal Postscript inclusion
|
2000-06-07 01:41:55 +00:00
|
|
|
if (special_command[0] == '"') {
|
|
|
|
quote_special(special_command.mid(1));
|
|
|
|
return;
|
|
|
|
}
|
2000-06-09 05:31:11 +00:00
|
|
|
|
2001-03-15 15:11:36 +00:00
|
|
|
// PS-Postscript inclusion
|
|
|
|
if (special_command.find("ps:", 0, false) == 0) {
|
|
|
|
ps_special(special_command);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2000-06-09 05:31:11 +00:00
|
|
|
// Literal Postscript Header
|
|
|
|
if (special_command[0] == '!') {
|
|
|
|
bang_special(special_command.mid(1));
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Encapsulated Postscript File
|
2001-03-15 15:11:36 +00:00
|
|
|
if (special_command.find("PSfile=", 0, false) == 0) {
|
2000-06-09 05:31:11 +00:00
|
|
|
epsf_special(special_command.mid(7));
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Postscript Header File
|
2001-03-15 15:11:36 +00:00
|
|
|
if (special_command.find("header=", 0, false) == 0) {
|
2000-06-09 05:31:11 +00:00
|
|
|
header_special(special_command.mid(7));
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
// HTML reference
|
2001-03-15 15:11:36 +00:00
|
|
|
if (special_command.find("html:<A href=", 0, false) == 0) {
|
2000-06-09 05:31:11 +00:00
|
|
|
html_href_special(special_command.mid(14));
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
// HTML anchor end
|
2001-03-15 15:11:36 +00:00
|
|
|
if (special_command.find("html:</A>", 0, false) == 0) {
|
2000-06-09 05:31:11 +00:00
|
|
|
html_anchor_end();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2000-06-11 07:04:57 +00:00
|
|
|
// HTML anchor special
|
2001-03-15 15:11:36 +00:00
|
|
|
if (special_command.find("html:<A name=", 0, false) == 0) {
|
2000-06-11 07:04:57 +00:00
|
|
|
html_anchor_special(special_command.mid(14));
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2001-03-15 15:11:36 +00:00
|
|
|
kdError(4300) << i18n("The special command \"") << special_command << i18n("\" is not implemented.") << endl;
|
2000-06-07 01:41:55 +00:00
|
|
|
return;
|
1997-10-18 11:34:02 +00:00
|
|
|
}
|