# 5 PreScript

PreScript has been designed in conjunction with a2ps{}. Since bold sequences, special characters etc. were implemented in a2ps{}, we thought it would be good to allow direct access to those features: PreScript became an input language for a2ps{}, where special font treatments are specified in a LaTeX-like syntax.

The main advantages for using PreScript are:

• it is fairly simple,
• it is LaTeX compatible (that is, correctly written PreScript files do compile with LaTeX)
• a2ps is small and easy to install, hence it is available on every UNIX platform.

It can be a good candidate for generation of PostScript output (syntactic pretty-printers, generation of various reports etc.).

## 5.1 Syntax

Every command name begins with a backslash (\'). If the command uses an argument, it is given between curly braces with no spaces between the command name and the argument.

The main limit on PreScript is that no command can be used inside another command. For instance, though it is perfectly legal in LaTeX, the following line will be badly interpreted by a2ps{}:

\textbf{Problems using \textit{PreScript} instead of \LaTeX}


The correct way to write this in PreScript is

\textbf{Problems using} \textbi{PreScript} \textbf{instead of} \LaTeX.


Everything from an unquoted % to the end of line is ignored (comments).

## 5.2 PreScript commands

### 5.2.1 Structure commands

These commands required arguments.

\section{Title}'
\subsection{Title}'
\subsubsection{Title}.'
Used to specify the title of a section, subsection or subsubsection.
\textbf{text}'
\textit{text}'
\textbi{text}'
\textrm{text}'
write text in bold, italic, bold-italic, Times. Default font is Courier. These instructions are said to be hard-coded. They may be removed in a future definition of PreScript. The following instructions are prefered.
\keyword{text}'
\Keyword{text}'
Highlight lightly/strongly the given text. Should be used only for a couple of adjacent words.
\comment{text}'
\Comment{text}'
The text is given a special face. The text may be removed if option --strip' is used.
\label{text}'
\Label{text}'
text should be considered as a definition, or an important point in the structure of the whole text.
\string{text}'
Write text with string's face (i.e. font Times).
\textsy{text}'
text is written in the PostScript symbol font. This feature is not compatible with LaTeX. It is recommended, when possible, to use the special keywords denoting symbols, which are compatible with LaTeX (see section 5.2.2 Printed symbols).
\footer{text}'
Use text as header (footer) for the current page. At run time, to override the defined headers and footers by these dynamic headers, the option --dynamic-header' must be set. If several headers or footers are defined on the same page, the last one is taken into account.

### 5.2.2 Printed symbols

There is a big menagerie of symbols. To get a list, it is suggested to print a2ps{}'s report about PreScript using the command line:

a2ps --report=PreScript | a2ps -EPreScript


The reader should be aware that LaTeX is more demanding about special symbols. Most of them must be in so-called math mode, which means that the command must be inside $signs. For instance, though If \forall x \in E, x \in F then E \subseteq F.  is perfectly legal in PreScript, it should be written If$\forall x \in E, x \in F$then$E \subseteq F$.  for LaTeX. Since in PreScript every $' is discarded (unless quoted by a \'), the second form is also admitted.

| a2ps -Epre -P
`