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