In the conversion process, no %include, %DM, %M, or %DATE marks will be acted upon. If this is required, then you should expand the file before converting to HTML.
Most of the Quikscript layout marks can be replaced by one or more HTML tags. This conversion is performed using a fixed set of internal rules for selecting the appropriate HTML tags. However, it is possible to override any of the conversions by reading from a given file a set of substitutions which are to override the internal rules.
Keyword substitution is performed when a keyword has been identified, after the leading and trailing "%" character has been stripped off, and before it is checked against the rules embedded in QstoHTML. This allows us to modify any of the default processing performed by QstoHTML if we wish. It also allows us to indicate replacements for Quikscript macros that can be defined for expansion before output.
The replacement text that we provide will itself be scanned for any layout marks, recursively.
A file of keyword substitutions can be indicated in the panel before the conversion is run. Lines in such a file will look like:
string1=string2where "string1" is the text between "%" Quikscript delimiters, and "string2" is the text to be put in the HTML output file.
Eg, if a Quikscript macro was defined:
%DM,1:%FN,Din%%C,182%%FN%:%enabling the Dingbats character 1 in a black circle to be represented by %M,1%, then this could be handled in QstoHTML with a line in the substitution file
M,1=(1)"(1)" is as good as we can achieve with the limited typesetting features of standard HTML.
A "character encoding" is the interpretation given to each character code, usually an 8-bit item, determining what character gets drawn on the page for this code. There are several character encodings commonly used in PostScript, and these can easily be set up in Quikscript by including appropriate PostScript code. When converting a Quikscript file to HTML, we need to allow for the encoding used. Unfortunately, the HTML character set is impoverished, and there are many PostScript characters that cannot be represented in HTML.
QstoHTML allows the character encoding to be established through a file that is read prior to conversion. The format of this file is:
number=replwhere "number" is the numeric representation of a character, and "repl" is the text that will be output in the HTML file if that character is encountered.
Character substitution is only performed on the actual text of the document after keyword processing has been performed, and in %C,number% Quikscript layout marks. Eg.
(HTML and PostScript have different representations for hyphen and minus.)162=¢ 163=£ 177=- 45=­
Two files are supplied which will meet most needs with character sets.
ps_std_subs ps_europe_subs pdffnt.qs supplied with Quikscript
will re-encode the standard fonts to use an encoding based on the ISO-8859-1
character set, with additional typesetting characters in little-used positions.
This is automatically included if "European characters" is selected from the
"Font" menu.]
Quikscript documents contain explicit size specifications for text, measured in printers points. HTML does not use this scheme, but rather a basefont and sizes relative to this.
It is possible with QstoHTML to indicate which PostScript font size is to be taken as the basefont size. The size must be an integer, and the default size is 13.
The number does not need to be an actual size used in the document. Sizes encountered will be compared with this number to determine approximately how much larger or smaller than the default they are. Choosing a default size that is too large will cause small text in PostScript to be almost unreadable on the screen.
The most common form of illustration used in Quikscript documents is an EPS file. QstoHTML will flag any included PostScript in its output. It is convenient to convert such EPS files to a form displayable in a browser. Two Unix scripts are provided to assist with this. The first is "epstopnm", which uses ghostscript to render the PostScript and create a PPM file. The second is "epstogif", which calls "epstopnm" and then "ppmtogif", a pbmplus (or netpbm) utility.
Quikscript allows any PostScript to be embedded within it, which can have a wide variety of effects on layout and representation of following text. QstoHTML simply outputs the PostScript code as a comment in the HTML, and also puts a message to the screen showing the first three lines of the PostScript to warn that it has not been converted.
The purpose of many Quikscript layout marks is to precisely position text. HTML has no concept of precise positioning. It does not even support tabs. QstoHTML ignores many layout marks, and performs a rough substitution in other cases.
HTML has a scheme for treating every character as intentional, similar to %NF% in Quikscript, but it only renders such text in monospaced font.
HTML has the notion of embedding one style within another, and most browsers require that the termination of styles be done in the reverse sequence of their declaration. So,
<I>test<FONT SIZE=-1>smaller</FONT></I>may not be rendered properly if the styles overlap, as in
<I>test<FONT SIZE=-1>smaller</I></FONT>Quikscript does not have this concept of embedding, so layout marks in generated HTML may not always be in the correct order. Some handediting of the HTML may be required to overcome such problems. Any desired hot links will also have to be added by hand.