blob: c1cf14ff2ca69532ff933a06cb6cdbd0eeeb78b2 [file] [log] [blame]
Fred Drake3a0351c1998-04-04 07:23:21 +00001\section{Standard Module \module{formatter}}
Fred Drakeb91e9341998-07-23 17:59:49 +00002\declaremodule{standard}{formatter}
3
4\modulesynopsis{Generic output formatter and device interface.}
5
Fred Drakee83b30d1996-10-08 21:53:33 +00006
Fred Drakee83b30d1996-10-08 21:53:33 +00007
8This module supports two interface definitions, each with mulitple
9implementations. The \emph{formatter} interface is used by the
Fred Drake3b5da761998-03-12 15:33:05 +000010\class{HTMLParser} class of the \module{htmllib} module, and the
Fred Drakee83b30d1996-10-08 21:53:33 +000011\emph{writer} interface is required by the formatter interface.
Fred Drake858f7871998-04-04 06:25:27 +000012\withsubitem{(class in htmllib)}{\ttindex{HTMLParser}}
Fred Drakee83b30d1996-10-08 21:53:33 +000013
14Formatter objects transform an abstract flow of formatting events into
15specific output events on writer objects. Formatters manage several
16stack structures to allow various properties of a writer object to be
17changed and restored; writers need not be able to handle relative
18changes nor any sort of ``change back'' operation. Specific writer
19properties which may be controlled via formatter objects are
20horizontal alignment, font, and left margin indentations. A mechanism
21is provided which supports providing arbitrary, non-exclusive style
22settings to a writer as well. Additional interfaces facilitate
23formatting events which are not reversible, such as paragraph
24separation.
25
26Writer objects encapsulate device interfaces. Abstract devices, such
27as file formats, are supported as well as physical devices. The
28provided implementations all work with abstract devices. The
29interface makes available mechanisms for setting the properties which
30formatter objects manage and inserting data into the output.
31
32
33\subsection{The Formatter Interface}
34
35Interfaces to create formatters are dependent on the specific
36formatter class being instantiated. The interfaces described below
37are the required interfaces which all formatters must support once
38initialized.
39
40One data element is defined at the module level:
41
Fred Drake8fe533e1998-03-27 05:27:08 +000042
Fred Drakee83b30d1996-10-08 21:53:33 +000043\begin{datadesc}{AS_IS}
44Value which can be used in the font specification passed to the
45\code{push_font()} method described below, or as the new value to any
46other \code{push_\var{property}()} method. Pushing the \code{AS_IS}
47value allows the corresponding \code{pop_\var{property}()} method to
48be called without having to track whether the property was changed.
49\end{datadesc}
50
51The following attributes are defined for formatter instance objects:
52
Fred Drake8f925951996-10-09 16:13:22 +000053
Fred Drake8fe533e1998-03-27 05:27:08 +000054\begin{memberdesc}[formatter]{writer}
Fred Drakee83b30d1996-10-08 21:53:33 +000055The writer instance with which the formatter interacts.
Fred Drake8fe533e1998-03-27 05:27:08 +000056\end{memberdesc}
Fred Drakee83b30d1996-10-08 21:53:33 +000057
58
Fred Drake8fe533e1998-03-27 05:27:08 +000059\begin{methoddesc}[formatter]{end_paragraph}{blanklines}
Fred Drake3b5da761998-03-12 15:33:05 +000060Close any open paragraphs and insert at least \var{blanklines}
Fred Drakee83b30d1996-10-08 21:53:33 +000061before the next paragraph.
Fred Drake8fe533e1998-03-27 05:27:08 +000062\end{methoddesc}
Fred Drakee83b30d1996-10-08 21:53:33 +000063
Fred Drake8fe533e1998-03-27 05:27:08 +000064\begin{methoddesc}[formatter]{add_line_break}{}
Fred Drakee83b30d1996-10-08 21:53:33 +000065Add a hard line break if one does not already exist. This does not
66break the logical paragraph.
Fred Drake8fe533e1998-03-27 05:27:08 +000067\end{methoddesc}
Fred Drakee83b30d1996-10-08 21:53:33 +000068
Fred Drake8fe533e1998-03-27 05:27:08 +000069\begin{methoddesc}[formatter]{add_hor_rule}{*args, **kw}
Fred Drakee83b30d1996-10-08 21:53:33 +000070Insert a horizontal rule in the output. A hard break is inserted if
71there is data in the current paragraph, but the logical paragraph is
72not broken. The arguments and keywords are passed on to the writer's
Fred Drake3b5da761998-03-12 15:33:05 +000073\method{send_line_break()} method.
Fred Drake8fe533e1998-03-27 05:27:08 +000074\end{methoddesc}
Fred Drakee83b30d1996-10-08 21:53:33 +000075
Fred Drake8fe533e1998-03-27 05:27:08 +000076\begin{methoddesc}[formatter]{add_flowing_data}{data}
Fred Drakee83b30d1996-10-08 21:53:33 +000077Provide data which should be formatted with collapsed whitespaces.
78Whitespace from preceeding and successive calls to
Fred Drake3b5da761998-03-12 15:33:05 +000079\method{add_flowing_data()} is considered as well when the whitespace
Fred Drakee83b30d1996-10-08 21:53:33 +000080collapse is performed. The data which is passed to this method is
81expected to be word-wrapped by the output device. Note that any
82word-wrapping still must be performed by the writer object due to the
83need to rely on device and font information.
Fred Drake8fe533e1998-03-27 05:27:08 +000084\end{methoddesc}
Fred Drakee83b30d1996-10-08 21:53:33 +000085
Fred Drake8fe533e1998-03-27 05:27:08 +000086\begin{methoddesc}[formatter]{add_literal_data}{data}
Fred Drakee83b30d1996-10-08 21:53:33 +000087Provide data which should be passed to the writer unchanged.
88Whitespace, including newline and tab characters, are considered legal
Fred Drake3b5da761998-03-12 15:33:05 +000089in the value of \var{data}.
Fred Drake8fe533e1998-03-27 05:27:08 +000090\end{methoddesc}
Fred Drakee83b30d1996-10-08 21:53:33 +000091
Fred Drake8fe533e1998-03-27 05:27:08 +000092\begin{methoddesc}[formatter]{add_label_data}{format, counter}
Fred Drakee83b30d1996-10-08 21:53:33 +000093Insert a label which should be placed to the left of the current left
94margin. This should be used for constructing bulleted or numbered
Fred Drake3b5da761998-03-12 15:33:05 +000095lists. If the \var{format} value is a string, it is interpreted as a
96format specification for \var{counter}, which should be an integer.
Fred Drakee83b30d1996-10-08 21:53:33 +000097The result of this formatting becomes the value of the label; if
Fred Drake3b5da761998-03-12 15:33:05 +000098\var{format} is not a string it is used as the label value directly.
Fred Drakee83b30d1996-10-08 21:53:33 +000099The label value is passed as the only argument to the writer's
Fred Drake3b5da761998-03-12 15:33:05 +0000100\method{send_label_data()} method. Interpretation of non-string label
Fred Drakee83b30d1996-10-08 21:53:33 +0000101values is dependent on the associated writer.
102
103Format specifications are strings which, in combination with a counter
104value, are used to compute label values. Each character in the format
105string is copied to the label value, with some characters recognized
106to indicate a transform on the counter value. Specifically, the
Fred Drake3b5da761998-03-12 15:33:05 +0000107character \character{1} represents the counter value formatter as an
108arabic number, the characters \character{A} and \character{a}
109represent alphabetic representations of the counter value in upper and
110lower case, respectively, and \character{I} and \character{i}
111represent the counter value in Roman numerals, in upper and lower
112case. Note that the alphabetic and roman transforms require that the
113counter value be greater than zero.
Fred Drake8fe533e1998-03-27 05:27:08 +0000114\end{methoddesc}
Fred Drakee83b30d1996-10-08 21:53:33 +0000115
Fred Drake8fe533e1998-03-27 05:27:08 +0000116\begin{methoddesc}[formatter]{flush_softspace}{}
Fred Drakee83b30d1996-10-08 21:53:33 +0000117Send any pending whitespace buffered from a previous call to
Fred Drake3b5da761998-03-12 15:33:05 +0000118\method{add_flowing_data()} to the associated writer object. This
Fred Drakee83b30d1996-10-08 21:53:33 +0000119should be called before any direct manipulation of the writer object.
Fred Drake8fe533e1998-03-27 05:27:08 +0000120\end{methoddesc}
Fred Drakee83b30d1996-10-08 21:53:33 +0000121
Fred Drake8fe533e1998-03-27 05:27:08 +0000122\begin{methoddesc}[formatter]{push_alignment}{align}
Fred Drakee83b30d1996-10-08 21:53:33 +0000123Push a new alignment setting onto the alignment stack. This may be
Fred Drake3b5da761998-03-12 15:33:05 +0000124\constant{AS_IS} if no change is desired. If the alignment value is
125changed from the previous setting, the writer's \method{new_alignment()}
126method is called with the \var{align} value.
Fred Drake8fe533e1998-03-27 05:27:08 +0000127\end{methoddesc}
Fred Drakee83b30d1996-10-08 21:53:33 +0000128
Fred Drake8fe533e1998-03-27 05:27:08 +0000129\begin{methoddesc}[formatter]{pop_alignment}{}
Fred Drakee83b30d1996-10-08 21:53:33 +0000130Restore the previous alignment.
Fred Drake8fe533e1998-03-27 05:27:08 +0000131\end{methoddesc}
Fred Drakee83b30d1996-10-08 21:53:33 +0000132
Fred Drake8fe533e1998-03-27 05:27:08 +0000133\begin{methoddesc}[formatter]{push_font}{\code{(}size, italic, bold, teletype\code{)}}
Fred Drakee83b30d1996-10-08 21:53:33 +0000134Change some or all font properties of the writer object. Properties
Fred Drake3b5da761998-03-12 15:33:05 +0000135which are not set to \constant{AS_IS} are set to the values passed in
Fred Drakee83b30d1996-10-08 21:53:33 +0000136while others are maintained at their current settings. The writer's
Fred Drake3b5da761998-03-12 15:33:05 +0000137\method{new_font()} method is called with the fully resolved font
Fred Drakee83b30d1996-10-08 21:53:33 +0000138specification.
Fred Drake8fe533e1998-03-27 05:27:08 +0000139\end{methoddesc}
Fred Drakee83b30d1996-10-08 21:53:33 +0000140
Fred Drake8fe533e1998-03-27 05:27:08 +0000141\begin{methoddesc}[formatter]{pop_font}{}
Fred Drakee83b30d1996-10-08 21:53:33 +0000142Restore the previous font.
Fred Drake8fe533e1998-03-27 05:27:08 +0000143\end{methoddesc}
Fred Drakee83b30d1996-10-08 21:53:33 +0000144
Fred Drake8fe533e1998-03-27 05:27:08 +0000145\begin{methoddesc}[formatter]{push_margin}{margin}
Fred Drakee83b30d1996-10-08 21:53:33 +0000146Increase the number of left margin indentations by one, associating
Fred Drake3b5da761998-03-12 15:33:05 +0000147the logical tag \var{margin} with the new indentation. The initial
Fred Drakee83b30d1996-10-08 21:53:33 +0000148margin level is \code{0}. Changed values of the logical tag must be
Fred Drake3b5da761998-03-12 15:33:05 +0000149true values; false values other than \constant{AS_IS} are not
150sufficient to change the margin.
Fred Drake8fe533e1998-03-27 05:27:08 +0000151\end{methoddesc}
Fred Drakee83b30d1996-10-08 21:53:33 +0000152
Fred Drake8fe533e1998-03-27 05:27:08 +0000153\begin{methoddesc}[formatter]{pop_margin}{}
Fred Drakee83b30d1996-10-08 21:53:33 +0000154Restore the previous margin.
Fred Drake8fe533e1998-03-27 05:27:08 +0000155\end{methoddesc}
Fred Drakee83b30d1996-10-08 21:53:33 +0000156
Fred Drake8fe533e1998-03-27 05:27:08 +0000157\begin{methoddesc}[formatter]{push_style}{*styles}
Fred Drakee83b30d1996-10-08 21:53:33 +0000158Push any number of arbitrary style specifications. All styles are
159pushed onto the styles stack in order. A tuple representing the
Fred Drake3b5da761998-03-12 15:33:05 +0000160entire stack, including \constant{AS_IS} values, is passed to the
161writer's \method{new_styles()} method.
Fred Drake8fe533e1998-03-27 05:27:08 +0000162\end{methoddesc}
Fred Drakee83b30d1996-10-08 21:53:33 +0000163
Fred Drake8fe533e1998-03-27 05:27:08 +0000164\begin{methoddesc}[formatter]{pop_style}{\optional{n\code{ = 1}}}
Fred Drake3b5da761998-03-12 15:33:05 +0000165Pop the last \var{n} style specifications passed to
166\method{push_style()}. A tuple representing the revised stack,
167including \constant{AS_IS} values, is passed to the writer's
168\method{new_styles()} method.
Fred Drake8fe533e1998-03-27 05:27:08 +0000169\end{methoddesc}
Fred Drakee83b30d1996-10-08 21:53:33 +0000170
Fred Drake8fe533e1998-03-27 05:27:08 +0000171\begin{methoddesc}[formatter]{set_spacing}{spacing}
Fred Drakee83b30d1996-10-08 21:53:33 +0000172Set the spacing style for the writer.
Fred Drake8fe533e1998-03-27 05:27:08 +0000173\end{methoddesc}
Fred Drakee83b30d1996-10-08 21:53:33 +0000174
Fred Drake8fe533e1998-03-27 05:27:08 +0000175\begin{methoddesc}[formatter]{assert_line_data}{\optional{flag\code{ = 1}}}
Fred Drakee83b30d1996-10-08 21:53:33 +0000176Inform the formatter that data has been added to the current paragraph
177out-of-band. This should be used when the writer has been manipulated
Fred Drake3b5da761998-03-12 15:33:05 +0000178directly. The optional \var{flag} argument can be set to false if
Fred Drakee83b30d1996-10-08 21:53:33 +0000179the writer manipulations produced a hard line break at the end of the
180output.
Fred Drake8fe533e1998-03-27 05:27:08 +0000181\end{methoddesc}
Fred Drakee83b30d1996-10-08 21:53:33 +0000182
183
184\subsection{Formatter Implementations}
185
Fred Drake8f925951996-10-09 16:13:22 +0000186Two implementations of formatter objects are provided by this module.
187Most applications may use one of these classes without modification or
188subclassing.
189
Fred Drake3b5da761998-03-12 15:33:05 +0000190\begin{classdesc}{NullFormatter}{\optional{writer}}
191A formatter which does nothing. If \var{writer} is omitted, a
192\class{NullWriter} instance is created. No methods of the writer are
193called by \class{NullFormatter} instances. Implementations should
194inherit from this class if implementing a writer interface but don't
195need to inherit any implementation.
196\end{classdesc}
Fred Drakee83b30d1996-10-08 21:53:33 +0000197
Fred Drake3b5da761998-03-12 15:33:05 +0000198\begin{classdesc}{AbstractFormatter}{writer}
Fred Drakee83b30d1996-10-08 21:53:33 +0000199The standard formatter. This implementation has demonstrated wide
200applicability to many writers, and may be used directly in most
Fred Drake8f925951996-10-09 16:13:22 +0000201circumstances. It has been used to implement a full-featured
202world-wide web browser.
Fred Drake3b5da761998-03-12 15:33:05 +0000203\end{classdesc}
Fred Drakee83b30d1996-10-08 21:53:33 +0000204
205
206
207\subsection{The Writer Interface}
208
209Interfaces to create writers are dependent on the specific writer
210class being instantiated. The interfaces described below are the
211required interfaces which all writers must support once initialized.
Fred Drake3b5da761998-03-12 15:33:05 +0000212Note that while most applications can use the
213\class{AbstractFormatter} class as a formatter, the writer must
214typically be provided by the application.
Fred Drakee83b30d1996-10-08 21:53:33 +0000215
Fred Drake8f925951996-10-09 16:13:22 +0000216
Fred Drake8fe533e1998-03-27 05:27:08 +0000217\begin{methoddesc}[writer]{flush}{}
Fred Drake591bbb11996-12-31 20:51:42 +0000218Flush any buffered output or device control events.
Fred Drake8fe533e1998-03-27 05:27:08 +0000219\end{methoddesc}
Fred Drake591bbb11996-12-31 20:51:42 +0000220
Fred Drake8fe533e1998-03-27 05:27:08 +0000221\begin{methoddesc}[writer]{new_alignment}{align}
Fred Drake3b5da761998-03-12 15:33:05 +0000222Set the alignment style. The \var{align} value can be any object,
Fred Drakee83b30d1996-10-08 21:53:33 +0000223but by convention is a string or \code{None}, where \code{None}
224indicates that the writer's ``preferred'' alignment should be used.
Fred Drake3b5da761998-03-12 15:33:05 +0000225Conventional \var{align} values are \code{'left'}, \code{'center'},
Fred Drakee83b30d1996-10-08 21:53:33 +0000226\code{'right'}, and \code{'justify'}.
Fred Drake8fe533e1998-03-27 05:27:08 +0000227\end{methoddesc}
Fred Drakee83b30d1996-10-08 21:53:33 +0000228
Fred Drake8fe533e1998-03-27 05:27:08 +0000229\begin{methoddesc}[writer]{new_font}{font}
Fred Drake3b5da761998-03-12 15:33:05 +0000230Set the font style. The value of \var{font} will be \code{None},
Fred Drakee83b30d1996-10-08 21:53:33 +0000231indicating that the device's default font should be used, or a tuple
Fred Drake3b5da761998-03-12 15:33:05 +0000232of the form \code{(}\var{size}, \var{italic}, \var{bold},
233\var{teletype}\code{)}. Size will be a string indicating the size of
234font that should be used; specific strings and their interpretation
235must be defined by the application. The \var{italic}, \var{bold}, and
236\var{teletype} values are boolean indicators specifying which of those
237font attributes should be used.
Fred Drake8fe533e1998-03-27 05:27:08 +0000238\end{methoddesc}
Fred Drakee83b30d1996-10-08 21:53:33 +0000239
Fred Drake8fe533e1998-03-27 05:27:08 +0000240\begin{methoddesc}[writer]{new_margin}{margin, level}
Fred Drake3b5da761998-03-12 15:33:05 +0000241Set the margin level to the integer \var{level} and the logical tag
242to \var{margin}. Interpretation of the logical tag is at the
Fred Drakee83b30d1996-10-08 21:53:33 +0000243writer's discretion; the only restriction on the value of the logical
244tag is that it not be a false value for non-zero values of
Fred Drake3b5da761998-03-12 15:33:05 +0000245\var{level}.
Fred Drake8fe533e1998-03-27 05:27:08 +0000246\end{methoddesc}
Fred Drakee83b30d1996-10-08 21:53:33 +0000247
Fred Drake8fe533e1998-03-27 05:27:08 +0000248\begin{methoddesc}[writer]{new_spacing}{spacing}
Fred Drake3b5da761998-03-12 15:33:05 +0000249Set the spacing style to \var{spacing}.
Fred Drake8fe533e1998-03-27 05:27:08 +0000250\end{methoddesc}
Fred Drakee83b30d1996-10-08 21:53:33 +0000251
Fred Drake8fe533e1998-03-27 05:27:08 +0000252\begin{methoddesc}[writer]{new_styles}{styles}
Fred Drake3b5da761998-03-12 15:33:05 +0000253Set additional styles. The \var{styles} value is a tuple of
254arbitrary values; the value \constant{AS_IS} should be ignored. The
255\var{styles} tuple may be interpreted either as a set or as a stack
Fred Drakee83b30d1996-10-08 21:53:33 +0000256depending on the requirements of the application and writer
257implementation.
Fred Drake8fe533e1998-03-27 05:27:08 +0000258\end{methoddesc}
Fred Drakee83b30d1996-10-08 21:53:33 +0000259
Fred Drake8fe533e1998-03-27 05:27:08 +0000260\begin{methoddesc}[writer]{send_line_break}{}
Fred Drakee83b30d1996-10-08 21:53:33 +0000261Break the current line.
Fred Drake8fe533e1998-03-27 05:27:08 +0000262\end{methoddesc}
Fred Drakee83b30d1996-10-08 21:53:33 +0000263
Fred Drake8fe533e1998-03-27 05:27:08 +0000264\begin{methoddesc}[writer]{send_paragraph}{blankline}
Fred Drake3b5da761998-03-12 15:33:05 +0000265Produce a paragraph separation of at least \var{blankline} blank
266lines, or the equivelent. The \var{blankline} value will be an
Fred Drakee83b30d1996-10-08 21:53:33 +0000267integer.
Fred Drake8fe533e1998-03-27 05:27:08 +0000268\end{methoddesc}
Fred Drakee83b30d1996-10-08 21:53:33 +0000269
Fred Drake8fe533e1998-03-27 05:27:08 +0000270\begin{methoddesc}[writer]{send_hor_rule}{*args, **kw}
Fred Drakee83b30d1996-10-08 21:53:33 +0000271Display a horizontal rule on the output device. The arguments to this
272method are entirely application- and writer-specific, and should be
273interpreted with care. The method implementation may assume that a
Fred Drake3b5da761998-03-12 15:33:05 +0000274line break has already been issued via \method{send_line_break()}.
Fred Drake8fe533e1998-03-27 05:27:08 +0000275\end{methoddesc}
Fred Drakee83b30d1996-10-08 21:53:33 +0000276
Fred Drake8fe533e1998-03-27 05:27:08 +0000277\begin{methoddesc}[writer]{send_flowing_data}{data}
Fred Drakee83b30d1996-10-08 21:53:33 +0000278Output character data which may be word-wrapped and re-flowed as
279needed. Within any sequence of calls to this method, the writer may
280assume that spans of multiple whitespace characters have been
281collapsed to single space characters.
Fred Drake8fe533e1998-03-27 05:27:08 +0000282\end{methoddesc}
Fred Drakee83b30d1996-10-08 21:53:33 +0000283
Fred Drake8fe533e1998-03-27 05:27:08 +0000284\begin{methoddesc}[writer]{send_literal_data}{data}
Fred Drakee83b30d1996-10-08 21:53:33 +0000285Output character data which has already been formatted
286for display. Generally, this should be interpreted to mean that line
287breaks indicated by newline characters should be preserved and no new
288line breaks should be introduced. The data may contain embedded
289newline and tab characters, unlike data provided to the
Fred Drake3b5da761998-03-12 15:33:05 +0000290\method{send_formatted_data()} interface.
Fred Drake8fe533e1998-03-27 05:27:08 +0000291\end{methoddesc}
Fred Drakee83b30d1996-10-08 21:53:33 +0000292
Fred Drake8fe533e1998-03-27 05:27:08 +0000293\begin{methoddesc}[writer]{send_label_data}{data}
Fred Drake3b5da761998-03-12 15:33:05 +0000294Set \var{data} to the left of the current left margin, if possible.
295The value of \var{data} is not restricted; treatment of non-string
Fred Drakee83b30d1996-10-08 21:53:33 +0000296values is entirely application- and writer-dependent. This method
297will only be called at the beginning of a line.
Fred Drake8fe533e1998-03-27 05:27:08 +0000298\end{methoddesc}
Fred Drakee83b30d1996-10-08 21:53:33 +0000299
300
301\subsection{Writer Implementations}
302
Fred Drake8f925951996-10-09 16:13:22 +0000303Three implementations of the writer object interface are provided as
304examples by this module. Most applications will need to derive new
Fred Drake3b5da761998-03-12 15:33:05 +0000305writer classes from the \class{NullWriter} class.
Fred Drake8f925951996-10-09 16:13:22 +0000306
Fred Drake7bf5e081998-03-16 05:07:04 +0000307\begin{classdesc}{NullWriter}{}
Fred Drakee83b30d1996-10-08 21:53:33 +0000308A writer which only provides the interface definition; no actions are
309taken on any methods. This should be the base class for all writers
310which do not need to inherit any implementation methods.
Fred Drake7bf5e081998-03-16 05:07:04 +0000311\end{classdesc}
Fred Drakee83b30d1996-10-08 21:53:33 +0000312
Fred Drake7bf5e081998-03-16 05:07:04 +0000313\begin{classdesc}{AbstractWriter}{}
Fred Drakee83b30d1996-10-08 21:53:33 +0000314A writer which can be used in debugging formatters, but not much
Fred Drake5081b221998-01-15 05:49:00 +0000315else. Each method simply announces itself by printing its name and
Fred Drakee83b30d1996-10-08 21:53:33 +0000316arguments on standard output.
Fred Drake7bf5e081998-03-16 05:07:04 +0000317\end{classdesc}
Fred Drakee83b30d1996-10-08 21:53:33 +0000318
Fred Drakecce10901998-03-17 06:33:25 +0000319\begin{classdesc}{DumbWriter}{\optional{file\optional{, maxcol\code{ = 72}}}}
Fred Drakee83b30d1996-10-08 21:53:33 +0000320Simple writer class which writes output on the file object passed in
Fred Drake3b5da761998-03-12 15:33:05 +0000321as \var{file} or, if \var{file} is omitted, on standard output. The
Fred Drakee83b30d1996-10-08 21:53:33 +0000322output is simply word-wrapped to the number of columns specified by
Fred Drake3b5da761998-03-12 15:33:05 +0000323\var{maxcol}. This class is suitable for reflowing a sequence of
Fred Drakee83b30d1996-10-08 21:53:33 +0000324paragraphs.
Fred Drake7bf5e081998-03-16 05:07:04 +0000325\end{classdesc}