don't use python markup for console output (i.e. use indentation < 4)
[PyX/mjg.git] / manual / text.tex
blob36e35b8687ba8749ae069ed283723442c919a874
1 \chapter[Module \module{text}: TeX/LaTeX interface]{Module \module{text}: \TeX/\LaTeX{} interface}
2 \label{module:text}
4 \section{Basic functionality}
6 The \module{text} module seamlessly integrates Donald E. Knuths famous
7 \TeX{} typesetting engine into \PyX. The basic procedure is:
8 \begin{itemize}
9 \item start a \TeX/\LaTeX{} instance as soon as a \TeX/\LaTeX{}
10 preamble setting or a text creation is requested
11 \item create boxes containing the requested text and shipout those
12 boxes to the dvi file
13 \item immediately analyse the \TeX/\LaTeX{} output for errors; the box
14 extents are also contained in the \TeX/\LaTeX{} output and thus become
15 available immediately
16 \item when your TeX installation supports the \texttt{ipc} mode and
17 \PyX{} is configured to use it, the dvi output is also analysed
18 immediately; alternatively \PyX{} quits the \TeX/\LaTeX{} instance to
19 read the dvi file once the output needs to be generated or marker
20 positions are accessed
21 \item Type1 fonts are used for the PostScript generation
22 \end{itemize}
24 Note that for using Type1 fonts an appropriate font mapping file has
25 to be provided. When your \TeX{} installation is configured to use
26 Type1 fonts by default, the \texttt{psfonts.map} will contain entries
27 for the standard \TeX{} fonts already. Alternatively, you may either
28 look for \texttt{updmap} used by many \TeX{} distributions to create
29 an appropriate font mapping file. You may also specify one or several
30 alternative font mapping files like \texttt{psfonts.cmz} in the global
31 \texttt{pyxrc} or your local \texttt{.pyxrc}. Finally you can also use
32 the \var{fontmaps} keyword argument of the \class{texrunner}
33 constructor or its \method{set()} method.
35 \section[TeX/LaTeX instances: the \class{texrunner} class]%
36 {\TeX/\LaTeX{} instances: the \class{texrunner} class}
37 \declaremodule{}{text}
38 \modulesynopsis{\TeX/\LaTeX interface}
40 Instances of the class \class{texrunner} are responsible for executing
41 and controling a \TeX/\LaTeX{} instance.
43 \begin{classdesc}{texrunner}{mode="tex",
44 lfs="10pt",
45 docclass="article",
46 docopt=None,
47 usefiles=[],
48 fontmaps=config.get("text", "fontmaps", "psfonts.map"),
49 waitfortex=config.getint("text", "waitfortex", 60),
50 showwaitfortex=config.getint("text", "showwaitfortex", 5),
51 texipc=config.getboolean("text", "texipc", 0),
52 texdebug=None,
53 dvidebug=0,
54 errordebug=1,
55 pyxgraphics=1,
56 texmessagesstart=[],
57 texmessagesdocclass=[],
58 texmessagesbegindoc=[],
59 texmessagesend=[],
60 texmessagesdefaultpreamble=[],
61 texmessagesdefaultrun=[]}
62 \var{mode} should the string \samp{tex} or \samp{latex} and defines
63 whether \TeX{} or \LaTeX{} will be used. \var{lfs} specifies an
64 \texttt{lfs} file to simulate \LaTeX{} font size selection macros in
65 plain \TeX. \PyX{} comes with a set of \texttt{lfs} files and a
66 \LaTeX{} script to generate those files. For \var{lfs} being
67 \code{None} and \var{mode} equals \samp{tex} a list of installed
68 \texttt{lfs} files is shown.
70 \var{docclass} is the document class to be used in \LaTeX{} mode and
71 \var{docopt} are the options to be passed to the document class.
73 \var{usefiles} is a list of \TeX/\LaTeX{} jobname files. \PyX{} will
74 take care of the creation and storing of the corresponding temporary
75 files. A typical use-case would be \var{usefiles=["spam.aux"]}, but
76 you can also use it to access \TeX{}s log and dvi file.
78 \var{fontmaps} is a string containing whitespace separated names of
79 font mapping files. \var{waitfortex} is a number of seconds \PyX{}
80 should wait for \TeX/\LaTeX{} to process a request. While waiting
81 for \TeX/\LaTeX{} a \PyX{} process might seem to do not perform any
82 work anymore. To give some feedback to the user, a messages is
83 issued each \var{waitfortex} seconds. The \texttt{texipc} flag
84 indicates whether \PyX{} should use the \texttt{--ipc} option of
85 \TeX/\LaTeX{} for immediate dvi file access to increase the
86 execution speed of certain operations. See the output of
87 \texttt{tex~--help} whether the option is available at your \TeX{}
88 installation.
90 \var{texdebug} can be set to a filename to store the commands passed
91 to \TeX/\LaTeX{} for debugging. The flag \var{dvidebug} enables
92 debugging output in the dvi parser similar to \texttt{dvitype}.
93 \var{errordebug} controls the amount of information returned, when
94 an texmessage parser raises an error. Valid values are \code{0},
95 \code{1}, and \code{2}.
97 \var{pyxgraphics} allows use \LaTeX{}s graphics package without
98 further configuration of \texttt{pyx.def}.
100 The \TeX{} message parsers verify whether \TeX/\LaTeX{} could
101 properly process its input. By the parameters
102 \var{texmessagesstart}, \var{texmessagesdocclass},
103 \var{texmessagesbegindoc}, and \var{texmessagesend} you can set
104 \TeX{} message parsers to be used then \TeX/\LaTeX{} is started,
105 when the \texttt{documentclass} command is issued (\LaTeX{} only),
106 when the \texttt{\textbackslash{}begin\{document\}} is sent, and
107 when the \TeX/\LaTeX{} is stopped, respectively. The lists of
108 \TeX{} message parsers are merged with the following defaults:
109 \code{[texmessage.start]} for \var{texmessagesstart},
110 \code{[texmessage.load]} for \var{texmessagesdocclass},
111 \code{[texmessage.load, texmessage.noaux]} for
112 \var{texmessagesbegindoc}, and \code{[texmessage.texend,
113 texmessage.fontwarning]} for \var{texmessagesend}.
115 Similarily \var{texmessagesdefaultpreamble} and
116 \var{texmessagesdefaultrun} take \TeX{} message parser to be merged
117 to the \TeX{} message parsers given in the \method{preamble()} and
118 \method{text()} methods. The \var{texmessagesdefaultpreamble} and
119 \var{texmessagesdefaultrun} are merged with \code{[texmessage.load]}
120 and \code{[texmessage.loaddef, texmessage.graphicsload,
121 texmessage.fontwarning, texmessage.boxwarning]}, respectively.
122 \end{classdesc}
124 \class{texrunner} instances provides several methods to be called by
125 the user:
127 \begin{methoddesc}{set}{**kwargs}
128 This method takes the same keyword arguments as the
129 \class{texrunner} constructor. Its purpose is to reconfigure an
130 already constructed \class{texrunner} instance. The most prominent
131 use-case is to alter the configuration of the default
132 \class{texrunner} instance \code{defaulttexrunner} which is created
133 at the time of loading of the \module{text} module.
135 The \verb|set| method fails, when a modification cannot be applied
136 anymore (e.g. \TeX/\LaTeX{} has already been started).
137 \end{methoddesc}
139 \begin{methoddesc}{preamble}{expr, texmessages=[]}
140 The \method{preamble()} can be called prior to the \method{text()}
141 method only or after reseting a texrunner instance by
142 \method{reset()}. The \var{expr} is passed to the \TeX/\LaTeX{}
143 instance not encapsulated in a group. It should not generate any
144 output to the dvi file. In \LaTeX{} preamble expressions are
145 inserted prior to the \texttt{\textbackslash{}begin\{document\}} and
146 a typical use-case is to load packages by
147 \texttt{\textbackslash{}usepackage}. Note, that you may use
148 \texttt{\textbackslash{}AtBeginDocument} to postpone the
149 immediate evaluation.
151 \var{texmessages} are \TeX{} message parsers to handle the output of
152 \TeX/\LaTeX. They are merged with the default \TeX{} message
153 parsers for the \method{preamble()} method. See the constructur
154 description for details on the default \TeX{} message parsers.
155 \end{methoddesc}
157 \begin{methoddesc}{text}{x, y, expr, textattrs=[], texmessages=[]}
158 \var{x} and \var{y} are the position where a text should be typeset
159 and \var{expr} is the \TeX/\LaTeX{} expression to be passed to
160 \TeX/\LaTeX{}.
162 \var{textattrs} is a list of \TeX/\LaTeX{} settings as described
163 below, \PyX{} transformations, and \PyX{} fill styles (like colors).
165 \var{texmessages} are \TeX{} message parsers to handle the output of
166 \TeX/\LaTeX. They are merged with the default \TeX{} message
167 parsers for the \method{text()} method. See the constructur
168 description for details on the default \TeX{} message parsers.
170 The \method{text()} method returns a \class{textbox} instance, which
171 is a special \class{canvas} instance. It has the methods
172 \method{width()}, \method{height()}, and \method{depth()} to access
173 the size of the text. Additionally the \method{marker()} method,
174 which takes a string \emph{s}, returns a position in the text, where
175 the expression \texttt{\textbackslash{}PyXMarker\{\emph{s}\}} is
176 contained in \var{expr}. You should not use \texttt{@} within your
177 strings \emph{s} to prevent prevent name clashes with \PyX{}
178 internal macros (although we don't the marker feature internally
179 right now).
180 \end{methoddesc}
182 Note that for the outout generation and the marker access the
183 \TeX/\LaTeX{} instance must be terminated except when \texttt{texipc} is
184 turned on. However, after such a termination a new \TeX/\LaTeX{}
185 instance is started when the \method{text()} method is called again.
187 \begin{methoddesc}{reset}{reinit=0}
188 This method can be used to manually force a restart of
189 \TeX/\LaTeX{}. The flag \var{reinit} will initialize the
190 \TeX/\LaTeX{} by repeating the \method{preamble()} calls. New
191 \method{set()} and \method{preamble()} calls are allowed when
192 \var{reinit} was not set only.
193 \end{methoddesc}
196 \section[TeX/LaTeX attributes]
197 {\TeX/\LaTeX{} attributes}
198 \declaremodule{}{text}
199 \modulesynopsis{\TeX/\LaTeX interface}
201 \TeX/\LaTeX{} attributes are instances to be passed to a
202 \class{texrunner}s \method{text()} method. They stand for
203 \TeX/\LaTeX{} expression fragments and handle dependencies by proper
204 ordering.
206 \begin{classdesc}{halign}{boxhalign, flushhalign}
207 Instances of this class set the horizontal alignment of a text box
208 and the contents of a text box to be left, center and right for
209 \var{boxhalign} and \var{flushhalign} being \code{0}, \code{0.5},
210 and \code{1}. Other values are allowed as well, although such an
211 alignment seems quite unusual.
212 \end{classdesc}
214 Note that there are two separate classes \class{boxhalign} and
215 \class{flushhalign} to set the alignment of the box and its contents
216 independently, but those helper classes can't be cleared independently
217 from each other. Some handy instances available as class members:
219 \begin{memberdesc}{boxleft}
220 Left alignment of the text box, \emph{i.e.} sets \var{boxhalign} to
221 \code{0} and doesn't set \var{flushhalign}.
222 \end{memberdesc}
224 \begin{memberdesc}{boxcenter}
225 Center alignment of the text box, \emph{i.e.} sets \var{boxhalign} to
226 \code{0.5} and doesn't set \var{flushhalign}.
227 \end{memberdesc}
229 \begin{memberdesc}{boxright}
230 Right alignment of the text box, \emph{i.e.} sets \var{boxhalign} to
231 \code{1} and doesn't set \var{flushhalign}.
232 \end{memberdesc}
234 \begin{memberdesc}{flushleft}
235 Left alignment of the content of the text box in a multiline box,
236 \emph{i.e.} sets \var{flushhalign} to \code{0} and doesn't set
237 \var{boxhalign}.
238 \end{memberdesc}
240 \begin{memberdesc}{raggedright}
241 Identical to \member{flushleft}.
242 \end{memberdesc}
244 \begin{memberdesc}{flushcenter}
245 Center alignment of the content of the text box in a multiline box,
246 \emph{i.e.} sets \var{flushhalign} to \code{0.5} and doesn't set
247 \var{boxhalign}.
248 \end{memberdesc}
250 \begin{memberdesc}{raggedcenter}
251 Identical to \member{flushcenter}.
252 \end{memberdesc}
254 \begin{memberdesc}{flushright}
255 Right alignment of the content of the text box in a multiline box,
256 \emph{i.e.} sets \var{flushhalign} to \code{1} and doesn't set
257 \var{boxhalign}.
258 \end{memberdesc}
260 \begin{memberdesc}{raggedleft}
261 Identical to \member{flushright}.
262 \end{memberdesc}
264 \begin{memberdesc}{left}
265 Combines \member{boxleft} and \member{flushleft}, \emph{i.e.}
266 \code{halign(0, 0)}.
267 \end{memberdesc}
269 \begin{memberdesc}{center}
270 Combines \member{boxcenter} and \member{flushcenter}, \emph{i.e.}
271 \code{halign(0.5, 0.5)}.
272 \end{memberdesc}
274 \begin{memberdesc}{right}
275 Combines \member{boxright} and \member{flushright}, \emph{i.e.}
276 \code{halign(1, 1)}.
277 \end{memberdesc}
279 \begin{figure}
280 \centerline{\includegraphics{textvalign}}
281 \caption{valign example}
282 \label{fig:textvalign}
283 \end{figure}
285 \begin{classdesc}{valign}{valign}
286 Instances of this class set the vertical alignment of a text box to
287 be top, center and bottom for \var{valign} being \code{0},
288 \code{0.5}, and \code{1}. Other values are allowed as well, although
289 such an alignment seems quite unusual. See the left side of
290 figure~\ref{fig:textvalign} for an example.
291 \end{classdesc}
293 Some handy instances available as class members:
295 \begin{memberdesc}{top}
296 \code{valign(0)}
297 \end{memberdesc}
299 \begin{memberdesc}{middle}
300 \code{valign(0.5)}
301 \end{memberdesc}
303 \begin{memberdesc}{bottom}
304 \code{valign(1)}
305 \end{memberdesc}
307 \begin{memberdesc}{baseline}
308 Identical to clearing the vertical alignment by \member{clear} to
309 emphasise that a baseline alignment is not a box-related alignment.
310 Baseline alignment is the default, \emph{i.e.} no valign is set by
311 default.
312 \end{memberdesc}
314 \begin{classdesc}{parbox}{width, baseline=top}
315 Instances of this class create a box with a finite width, where the
316 typesetter creates multiple lines in. Note, that you can't create
317 multiple lines in \TeX/\LaTeX{} without specifying a box width.
318 Since \PyX{} doesn't know a box width, it uses \TeX{}s LR-mode by
319 default, which will always put everything into a single line. Since
320 in a vertical box there are several baselines, you can specify the
321 baseline to be used by the optional \var{baseline} argument. You can
322 set it to the symbolic names \member{top}, \member{parbox.middle},
323 and \member{parbox.bottom} only, which are members of
324 \class{valign}. See the right side of figure~\ref{fig:textvalign}
325 for an example.
326 \end{classdesc}
328 Since you need to specify a box width no predefined instances are
329 available as class members.
331 \begin{classdesc}{vshift}{lowerratio, heightstr="0"}
332 Instances of this class lower the output by \var{lowerratio} of the
333 height of the string \var{heigthstring}. Note, that you can apply
334 several shifts to sum up the shift result. However, there is still a
335 \member{clear} class member to remove all vertical shifts.
336 \end{classdesc}
338 Some handy instances available as class members:
340 \begin{memberdesc}{bottomzero}
341 \code{vshift(0)} (this doesn't shift at all)
342 \end{memberdesc}
344 \begin{memberdesc}{middlezero}
345 \code{vshift(0.5)}
346 \end{memberdesc}
348 \begin{memberdesc}{topzero}
349 \code{vshift(1)}
350 \end{memberdesc}
352 \begin{memberdesc}{mathaxis}
353 This is a special vertical shift to lower the output by the height
354 of the mathematical axis. The mathematical axis is used by \TeX{}
355 for the vertical alignment in mathematical expressions and is often
356 usefull for vertical alignment. The corresponding vertical shift is
357 less than \member{middlezero} and usually fits the height of the
358 minus sign. (It is the height of the minus sign in mathematical
359 mode, since that's that the mathematical axis is all about.)
360 \end{memberdesc}
362 There is a \TeX/\LaTeX{} attribute to switch to \TeX{}s math mode. The
363 appropriate instances \code{mathmode} and \code{clearmathmode} (to
364 clear the math mode attribute) are available at module level.
366 \begin{datadesc}{mathmode}
367 Enables \TeX{}s mathematical mode in display style.
368 \end{datadesc}
370 The \class{size} class creates \TeX/\LaTeX{} attributes for changing
371 the font size.
373 \begin{classdesc}{size}{sizeindex=None, sizename=None,
374 sizelist=defaultsizelist}
375 \LaTeX{} knows several commands to change the font size. The command
376 names are stored in the \var{sizelist}, which defaults to
377 \code{[\textquotedbl{}normalsize\textquotedbl{},
378 \textquotedbl{}large\textquotedbl{},
379 \textquotedbl{}Large\textquotedbl{},
380 \textquotedbl{}LARGE\textquotedbl{},
381 \textquotedbl{}huge\textquotedbl{},
382 \textquotedbl{}Huge\textquotedbl{},
383 None, \textquotedbl{}tiny\textquotedbl{},
384 \textquotedbl{}scriptsize\textquotedbl{},
385 \textquotedbl{}footnotesize\textquotedbl{},
386 \textquotedbl{}small\textquotedbl{}]}.
388 You can either provide an index \var{sizeindex} to access an item in
389 \var{sizelist} or set the command name by \var{sizename}.
390 \end{classdesc}
392 Instances for the \LaTeX{}s default size change commands are available
393 as class members:
395 \begin{memberdesc}{tiny}
396 \code{size(-4)}
397 \end{memberdesc}
399 \begin{memberdesc}{scriptsize}
400 \code{size(-3)}
401 \end{memberdesc}
403 \begin{memberdesc}{footnotesize}
404 \code{size(-2)}
405 \end{memberdesc}
407 \begin{memberdesc}{small}
408 \code{size(-1)}
409 \end{memberdesc}
411 \begin{memberdesc}{normalsize}
412 \code{size(0)}
413 \end{memberdesc}
415 \begin{memberdesc}{large}
416 \code{size(1)}
417 \end{memberdesc}
419 \begin{memberdesc}{Large}
420 \code{size(2)}
421 \end{memberdesc}
423 \begin{memberdesc}{LARGE}
424 \code{size(3)}
425 \end{memberdesc}
427 \begin{memberdesc}{huge}
428 \code{size(4)}
429 \end{memberdesc}
431 \begin{memberdesc}{Huge}
432 \code{size(5)}
433 \end{memberdesc}
435 There is a \TeX/\LaTeX{} attribute to create empty text boxes with the
436 size of the material passed in. The appropriate instances
437 \code{phantom} and \code{clearphantom} (to clear the phantom
438 attribute) are available at module level.
440 \begin{datadesc}{phantom}
441 Skip the text in the box, but keep its size.
442 \end{datadesc}
444 \section[Using the graphics-bundle with LaTeX]%
445 {Using the graphics-bundle with \LaTeX}
447 The packages in the \LaTeX{} graphics bundle (\texttt{color.sty},
448 \texttt{graphics.sty}, \texttt{graphicx.sty}, \ldots) make extensive
449 use of \texttt{\textbackslash{}special} commands and \PyX{} defines a
450 clean set of \texttt{\textbackslash{}special} commands to fit the
451 needs of the \LaTeX{} graphics bundle. The \texttt{pyx.def} driver
452 file need be used to tell the \LaTeX{} graphics bundle about the
453 syntax of the \texttt{\textbackslash{}special} commands as expected by
454 \PyX{}. You can put the driver file \texttt{pyx.def} into your
455 \LaTeX{} search path and add the content of both files
456 \texttt{color.cfg} and \texttt{graphics.cfg} to your personal
457 configuration files.\footnote{If you do not know what we're talking
458 about you can just ignore this paragraph but keep sure to not unset
459 the \var{pyxgraphics} keyword argument.} After you have installed the
460 \texttt{cfg} files please use the \module{text} module with unset
461 \code{pyxgraphics} keyword argument which will switch off a
462 convenience hack for less experienced \LaTeX{} users. You can then
463 import the \LaTeX{} graphics bundle packages and related packages
464 (e.g.~\texttt{rotating}, \ldots) with the option~\texttt{pyx},
465 e.g.~\texttt{\textbackslash{}usepackage[pyx]\{color,graphicx\}}. Please
466 note that the option~\texttt{pyx} is only available with unset
467 \var{pyxgraphics} keyword argument and a properly installed driver
468 file. Otherwise omit the specification of a driver when loading the
469 packages.
471 When defining colours in \LaTeX{} in one of the colour models
472 \texttt{gray}, \texttt{cmyk}, \texttt{rgb}, \texttt{RGB}, \texttt{hsb}
473 \PyX{} will use the corresponding values (one to four real numbers).
474 When you use one of the \texttt{named} colors in \LaTeX{} \PyX{} will
475 use the corresponding predefined colour (see module \texttt{color} and
476 the colour table at the end of the manual).
478 When importing Encapsulated PostScript files (\texttt{eps} files)
479 \PyX{} will rotate, scale and clip your file like you expect it. Other
480 graphic formats can not be imported via the graphics package at the
481 moment.
483 For reference purpose, the following specials can be handled by the
484 \PyX{} at the moment:
486 \begin{description}
487 \item[\texttt{PyX:color\_begin (model) (spec)}]
488 starts a colour. \texttt{(model)}~is one of
489 \texttt{gray}, \texttt{cmyk}, \texttt{rgb}, \texttt{hsb}, or
490 \texttt{texnamed}. \texttt{(spec)}~depends on the model: a name or
491 some numbers
492 \item[\texttt{PyX:color\_end}]
493 ends a colour.
494 \item[\texttt{PyX:epsinclude file= llx= lly= urx= ury= width= height= clip=0/1}]
495 includes an Encapsulated PostScript file (\texttt{eps}
496 files). The values of \texttt{llx} to \texttt{ury} are in the files'
497 coordinate system and specify the part of the graphics that should
498 become the specified \texttt{width} and \texttt{height} in the
499 outcome. The graphics may be clipped. The last three parameters are
500 optional.
501 \item[\texttt{PyX:scale\_begin (x) (y)}]
502 begins scaling from the current point.
503 \item[\texttt{PyX:scale\_end}]
504 ends scaling.
505 \item[\texttt{PyX:rotate\_begin (angle)}]
506 begins rotation around the current point.
507 \item[\texttt{PyX:rotate\_end}]
508 ends rotation.
509 \end{description}
511 \section[TeX message parsers]%
512 {\TeX{} message parsers}
513 \declaremodule{}{text}
514 \modulesynopsis{\TeX/\LaTeX interface}
516 Message parsers are used to scan the output of \TeX/\LaTeX. The output
517 is analysed by a sequence of \TeX{} message parsers. Each message
518 parser analyses the output and removes those parts of the output, it
519 feels responsible for. If there is nothing left in the end, the
520 message got validated, otherwise an exception is raised reporting the
521 problem. A message parser might issue a warning when removing some
522 output to give some feedback to the user.
524 \begin{classdesc}{texmessage}{}
525 This class acts as a container for \TeX{} message parsers instances,
526 which are all instances of classes derived from \class{texmessage}.
527 \end{classdesc}
529 The following \TeX{} message parser instances are available:
531 \begin{memberdesc}{start}
532 Check for \TeX/\LaTeX{} startup message including scrollmode test.
533 \end{memberdesc}
534 \begin{memberdesc}{noaux}
535 Ignore \LaTeX{}s no-aux-file warning.
536 \end{memberdesc}
537 \begin{memberdesc}{end}
538 Check for proper \TeX/\LaTeX{} tear down message.
539 \end{memberdesc}
540 \begin{memberdesc}{load}
541 Accepts arbitrary loading of files without checking for details,
542 \emph{i.e.} accept \texttt{(\emph{file} ...)} where
543 \texttt{\emph{file}} is an readable file.
544 \end{memberdesc}
545 \begin{memberdesc}{loaddef}
546 Accepts arbitrary loading of \texttt{fd} files, \emph{i.e.} accept
547 \texttt{(\emph{file}.def)} and \texttt{(\emph{file}.fd)} where
548 \texttt{\emph{file}.def} or \texttt{\emph{file}.fd} is an readable
549 file, respectively.
550 \end{memberdesc}
551 \begin{memberdesc}{graphicsload}
552 Accepts arbitrary loading of \texttt{eps} files,
553 \emph{i.e.} accept \texttt{(\emph{file}.eps)} where
554 \texttt{\emph{file}.eps} is an readable file.
555 \end{memberdesc}
556 \begin{memberdesc}{ignore}
557 Ignores everything (this is probably a bad idea, but sometimes you
558 might just want to ignore everything).
559 \end{memberdesc}
560 \begin{memberdesc}{allwarning}
561 Ignores everything but issues a warning.
562 \end{memberdesc}
563 \begin{memberdesc}{fontwarning}
564 Issues a warning about font substitutions of the \LaTeX{}s NFSS.
565 \end{memberdesc}
566 \begin{memberdesc}{boxwarning}
567 Issues a warning on under- and overfull horizontal and vertical boxes.
568 \end{memberdesc}
570 \begin{classdesc}{texmessagepattern}{pattern, warning=None}
571 This is a derived class of \class{texmessage}. It can be used to
572 construct simple \TeX{} message parsers, which validate a \TeX{}
573 message matching a certain regular expression pattern \var{pattern}.
574 When \var{warning} is set, a warning message is issued. Several of
575 the \TeX{} message parsers described above are implemented using
576 this class.
577 \end{classdesc}
579 \section{The \member{defaulttexrunner} instance}
580 \declaremodule{}{text}
581 \modulesynopsis{\TeX/\LaTeX interface}
583 \begin{datadesc}{defaulttexrunner}
584 The \code{defaulttexrunner} is an instance of \class{texrunner}. It
585 is created when the \module{text} module is loaded and it is used as
586 the default texrunner instance by all \class{canvas} instances to
587 implement its \method{text()} method.
588 \end{datadesc}
590 \begin{funcdesc}{preamble}{...}
591 \code{defaulttexrunner.preamble}
592 \end{funcdesc}
594 \begin{funcdesc}{text}{...}
595 \code{defaulttexrunner.text}
596 \end{funcdesc}
598 \begin{funcdesc}{set}{...}
599 \code{defaulttexrunner.set}
600 \end{funcdesc}
602 \begin{funcdesc}{reset}{...}
603 \code{defaulttexrunner.reset}
604 \end{funcdesc}