home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / p / python / pytexdoc / ext / lib / lib2 / formatter / tex
LaTeX Document  |  1996-11-08  |  13.0 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: LaTeX Document (document/latex).

You can browse this item here: tex

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert LaTeX Document (document/latex) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file LaTeX document text default
99% file LaTeX document, ASCII text default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/281 LaTeX (Subdocument) default
100% detectItEasy Format: plain text[LF] default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 5c 73 65 63 74 69 6f 6e | 7b 53 74 61 6e 64 61 72 |\section|{Standar|
|00000010| 64 20 4d 6f 64 75 6c 65 | 20 5c 73 65 63 74 63 6f |d Module| \sectco|
|00000020| 64 65 7b 66 6f 72 6d 61 | 74 74 65 72 7d 7d 0a 5c |de{forma|tter}}.\|
|00000030| 73 74 6d 6f 64 69 6e 64 | 65 78 7b 66 6f 72 6d 61 |stmodind|ex{forma|
|00000040| 74 74 65 72 7d 0a 0a 5c | 72 65 6e 65 77 63 6f 6d |tter}..\|renewcom|
|00000050| 6d 61 6e 64 7b 5c 69 6e | 64 65 78 73 75 62 69 74 |mand{\in|dexsubit|
|00000060| 65 6d 7d 7b 28 69 6e 20 | 6d 6f 64 75 6c 65 20 66 |em}{(in |module f|
|00000070| 6f 72 6d 61 74 74 65 72 | 29 7d 0a 0a 54 68 69 73 |ormatter|)}..This|
|00000080| 20 6d 6f 64 75 6c 65 20 | 73 75 70 70 6f 72 74 73 | module |supports|
|00000090| 20 74 77 6f 20 69 6e 74 | 65 72 66 61 63 65 20 64 | two int|erface d|
|000000a0| 65 66 69 6e 69 74 69 6f | 6e 73 2c 20 65 61 63 68 |efinitio|ns, each|
|000000b0| 20 77 69 74 68 20 6d 75 | 6c 69 74 70 6c 65 0a 69 | with mu|litple.i|
|000000c0| 6d 70 6c 65 6d 65 6e 74 | 61 74 69 6f 6e 73 2e 20 |mplement|ations. |
|000000d0| 20 54 68 65 20 5c 65 6d | 70 68 7b 66 6f 72 6d 61 | The \em|ph{forma|
|000000e0| 74 74 65 72 7d 20 69 6e | 74 65 72 66 61 63 65 20 |tter} in|terface |
|000000f0| 69 73 20 75 73 65 64 20 | 62 79 20 74 68 65 0a 5c |is used |by the.\|
|00000100| 63 6f 64 65 7b 48 54 4d | 4c 50 61 72 73 65 72 7d |code{HTM|LParser}|
|00000110| 20 63 6c 61 73 73 20 6f | 66 20 74 68 65 20 5c 63 | class o|f the \c|
|00000120| 6f 64 65 7b 68 74 6d 6c | 6c 69 62 7d 20 6d 6f 64 |ode{html|lib} mod|
|00000130| 75 6c 65 2c 20 61 6e 64 | 20 74 68 65 0a 5c 65 6d |ule, and| the.\em|
|00000140| 70 68 7b 77 72 69 74 65 | 72 7d 20 69 6e 74 65 72 |ph{write|r} inter|
|00000150| 66 61 63 65 20 69 73 20 | 72 65 71 75 69 72 65 64 |face is |required|
|00000160| 20 62 79 20 74 68 65 20 | 66 6f 72 6d 61 74 74 65 | by the |formatte|
|00000170| 72 20 69 6e 74 65 72 66 | 61 63 65 2e 0a 0a 46 6f |r interf|ace...Fo|
|00000180| 72 6d 61 74 74 65 72 20 | 6f 62 6a 65 63 74 73 20 |rmatter |objects |
|00000190| 74 72 61 6e 73 66 6f 72 | 6d 20 61 6e 20 61 62 73 |transfor|m an abs|
|000001a0| 74 72 61 63 74 20 66 6c | 6f 77 20 6f 66 20 66 6f |tract fl|ow of fo|
|000001b0| 72 6d 61 74 74 69 6e 67 | 20 65 76 65 6e 74 73 20 |rmatting| events |
|000001c0| 69 6e 74 6f 0a 73 70 65 | 63 69 66 69 63 20 6f 75 |into.spe|cific ou|
|000001d0| 74 70 75 74 20 65 76 65 | 6e 74 73 20 6f 6e 20 77 |tput eve|nts on w|
|000001e0| 72 69 74 65 72 20 6f 62 | 6a 65 63 74 73 2e 20 20 |riter ob|jects. |
|000001f0| 46 6f 72 6d 61 74 74 65 | 72 73 20 6d 61 6e 61 67 |Formatte|rs manag|
|00000200| 65 20 73 65 76 65 72 61 | 6c 0a 73 74 61 63 6b 20 |e severa|l.stack |
|00000210| 73 74 72 75 63 74 75 72 | 65 73 20 74 6f 20 61 6c |structur|es to al|
|00000220| 6c 6f 77 20 76 61 72 69 | 6f 75 73 20 70 72 6f 70 |low vari|ous prop|
|00000230| 65 72 74 69 65 73 20 6f | 66 20 61 20 77 72 69 74 |erties o|f a writ|
|00000240| 65 72 20 6f 62 6a 65 63 | 74 20 74 6f 20 62 65 0a |er objec|t to be.|
|00000250| 63 68 61 6e 67 65 64 20 | 61 6e 64 20 72 65 73 74 |changed |and rest|
|00000260| 6f 72 65 64 3b 20 77 72 | 69 74 65 72 73 20 6e 65 |ored; wr|iters ne|
|00000270| 65 64 20 6e 6f 74 20 62 | 65 20 61 62 6c 65 20 74 |ed not b|e able t|
|00000280| 6f 20 68 61 6e 64 6c 65 | 20 72 65 6c 61 74 69 76 |o handle| relativ|
|00000290| 65 0a 63 68 61 6e 67 65 | 73 20 6e 6f 72 20 61 6e |e.change|s nor an|
|000002a0| 79 20 73 6f 72 74 20 6f | 66 20 60 60 63 68 61 6e |y sort o|f ``chan|
|000002b0| 67 65 20 62 61 63 6b 27 | 27 20 6f 70 65 72 61 74 |ge back'|' operat|
|000002c0| 69 6f 6e 2e 20 20 53 70 | 65 63 69 66 69 63 20 77 |ion. Sp|ecific w|
|000002d0| 72 69 74 65 72 0a 70 72 | 6f 70 65 72 74 69 65 73 |riter.pr|operties|
|000002e0| 20 77 68 69 63 68 20 6d | 61 79 20 62 65 20 63 6f | which m|ay be co|
|000002f0| 6e 74 72 6f 6c 6c 65 64 | 20 76 69 61 20 66 6f 72 |ntrolled| via for|
|00000300| 6d 61 74 74 65 72 20 6f | 62 6a 65 63 74 73 20 61 |matter o|bjects a|
|00000310| 72 65 0a 68 6f 72 69 7a | 6f 6e 74 61 6c 20 61 6c |re.horiz|ontal al|
|00000320| 69 67 6e 6d 65 6e 74 2c | 20 66 6f 6e 74 2c 20 61 |ignment,| font, a|
|00000330| 6e 64 20 6c 65 66 74 20 | 6d 61 72 67 69 6e 20 69 |nd left |margin i|
|00000340| 6e 64 65 6e 74 61 74 69 | 6f 6e 73 2e 20 20 41 20 |ndentati|ons. A |
|00000350| 6d 65 63 68 61 6e 69 73 | 6d 0a 69 73 20 70 72 6f |mechanis|m.is pro|
|00000360| 76 69 64 65 64 20 77 68 | 69 63 68 20 73 75 70 70 |vided wh|ich supp|
|00000370| 6f 72 74 73 20 70 72 6f | 76 69 64 69 6e 67 20 61 |orts pro|viding a|
|00000380| 72 62 69 74 72 61 72 79 | 2c 20 6e 6f 6e 2d 65 78 |rbitrary|, non-ex|
|00000390| 63 6c 75 73 69 76 65 20 | 73 74 79 6c 65 0a 73 65 |clusive |style.se|
|000003a0| 74 74 69 6e 67 73 20 74 | 6f 20 61 20 77 72 69 74 |ttings t|o a writ|
|000003b0| 65 72 20 61 73 20 77 65 | 6c 6c 2e 20 20 41 64 64 |er as we|ll. Add|
|000003c0| 69 74 69 6f 6e 61 6c 20 | 69 6e 74 65 72 66 61 63 |itional |interfac|
|000003d0| 65 73 20 66 61 63 69 6c | 69 74 61 74 65 0a 66 6f |es facil|itate.fo|
|000003e0| 72 6d 61 74 74 69 6e 67 | 20 65 76 65 6e 74 73 20 |rmatting| events |
|000003f0| 77 68 69 63 68 20 61 72 | 65 20 6e 6f 74 20 72 65 |which ar|e not re|
|00000400| 76 65 72 73 69 62 6c 65 | 2c 20 73 75 63 68 20 61 |versible|, such a|
|00000410| 73 20 70 61 72 61 67 72 | 61 70 68 0a 73 65 70 61 |s paragr|aph.sepa|
|00000420| 72 61 74 69 6f 6e 2e 0a | 0a 57 72 69 74 65 72 20 |ration..|.Writer |
|00000430| 6f 62 6a 65 63 74 73 20 | 65 6e 63 61 70 73 75 6c |objects |encapsul|
|00000440| 61 74 65 20 64 65 76 69 | 63 65 20 69 6e 74 65 72 |ate devi|ce inter|
|00000450| 66 61 63 65 73 2e 20 20 | 41 62 73 74 72 61 63 74 |faces. |Abstract|
|00000460| 20 64 65 76 69 63 65 73 | 2c 20 73 75 63 68 0a 61 | devices|, such.a|
|00000470| 73 20 66 69 6c 65 20 66 | 6f 72 6d 61 74 73 2c 20 |s file f|ormats, |
|00000480| 61 72 65 20 73 75 70 70 | 6f 72 74 65 64 20 61 73 |are supp|orted as|
|00000490| 20 77 65 6c 6c 20 61 73 | 20 70 68 79 73 69 63 61 | well as| physica|
|000004a0| 6c 20 64 65 76 69 63 65 | 73 2e 20 20 54 68 65 0a |l device|s. The.|
|000004b0| 70 72 6f 76 69 64 65 64 | 20 69 6d 70 6c 65 6d 65 |provided| impleme|
|000004c0| 6e 74 61 74 69 6f 6e 73 | 20 61 6c 6c 20 77 6f 72 |ntations| all wor|
|000004d0| 6b 20 77 69 74 68 20 61 | 62 73 74 72 61 63 74 20 |k with a|bstract |
|000004e0| 64 65 76 69 63 65 73 2e | 20 20 54 68 65 0a 69 6e |devices.| The.in|
|000004f0| 74 65 72 66 61 63 65 20 | 6d 61 6b 65 73 20 61 76 |terface |makes av|
|00000500| 61 69 6c 61 62 6c 65 20 | 6d 65 63 68 61 6e 69 73 |ailable |mechanis|
|00000510| 6d 73 20 66 6f 72 20 73 | 65 74 74 69 6e 67 20 74 |ms for s|etting t|
|00000520| 68 65 20 70 72 6f 70 65 | 72 74 69 65 73 20 77 68 |he prope|rties wh|
|00000530| 69 63 68 0a 66 6f 72 6d | 61 74 74 65 72 20 6f 62 |ich.form|atter ob|
|00000540| 6a 65 63 74 73 20 6d 61 | 6e 61 67 65 20 61 6e 64 |jects ma|nage and|
|00000550| 20 69 6e 73 65 72 74 69 | 6e 67 20 64 61 74 61 20 | inserti|ng data |
|00000560| 69 6e 74 6f 20 74 68 65 | 20 6f 75 74 70 75 74 2e |into the| output.|
|00000570| 0a 0a 0a 5c 73 75 62 73 | 65 63 74 69 6f 6e 7b 54 |...\subs|ection{T|
|00000580| 68 65 20 46 6f 72 6d 61 | 74 74 65 72 20 49 6e 74 |he Forma|tter Int|
|00000590| 65 72 66 61 63 65 7d 0a | 0a 49 6e 74 65 72 66 61 |erface}.|.Interfa|
|000005a0| 63 65 73 20 74 6f 20 63 | 72 65 61 74 65 20 66 6f |ces to c|reate fo|
|000005b0| 72 6d 61 74 74 65 72 73 | 20 61 72 65 20 64 65 70 |rmatters| are dep|
|000005c0| 65 6e 64 65 6e 74 20 6f | 6e 20 74 68 65 20 73 70 |endent o|n the sp|
|000005d0| 65 63 69 66 69 63 0a 66 | 6f 72 6d 61 74 74 65 72 |ecific.f|ormatter|
|000005e0| 20 63 6c 61 73 73 20 62 | 65 69 6e 67 20 69 6e 73 | class b|eing ins|
|000005f0| 74 61 6e 74 69 61 74 65 | 64 2e 20 20 54 68 65 20 |tantiate|d. The |
|00000600| 69 6e 74 65 72 66 61 63 | 65 73 20 64 65 73 63 72 |interfac|es descr|
|00000610| 69 62 65 64 20 62 65 6c | 6f 77 0a 61 72 65 20 74 |ibed bel|ow.are t|
|00000620| 68 65 20 72 65 71 75 69 | 72 65 64 20 69 6e 74 65 |he requi|red inte|
|00000630| 72 66 61 63 65 73 20 77 | 68 69 63 68 20 61 6c 6c |rfaces w|hich all|
|00000640| 20 66 6f 72 6d 61 74 74 | 65 72 73 20 6d 75 73 74 | formatt|ers must|
|00000650| 20 73 75 70 70 6f 72 74 | 20 6f 6e 63 65 0a 69 6e | support| once.in|
|00000660| 69 74 69 61 6c 69 7a 65 | 64 2e 0a 0a 4f 6e 65 20 |itialize|d...One |
|00000670| 64 61 74 61 20 65 6c 65 | 6d 65 6e 74 20 69 73 20 |data ele|ment is |
|00000680| 64 65 66 69 6e 65 64 20 | 61 74 20 74 68 65 20 6d |defined |at the m|
|00000690| 6f 64 75 6c 65 20 6c 65 | 76 65 6c 3a 0a 0a 5c 62 |odule le|vel:..\b|
|000006a0| 65 67 69 6e 7b 64 61 74 | 61 64 65 73 63 7d 7b 41 |egin{dat|adesc}{A|
|000006b0| 53 5f 49 53 7d 0a 56 61 | 6c 75 65 20 77 68 69 63 |S_IS}.Va|lue whic|
|000006c0| 68 20 63 61 6e 20 62 65 | 20 75 73 65 64 20 69 6e |h can be| used in|
|000006d0| 20 74 68 65 20 66 6f 6e | 74 20 73 70 65 63 69 66 | the fon|t specif|
|000006e0| 69 63 61 74 69 6f 6e 20 | 70 61 73 73 65 64 20 74 |ication |passed t|
|000006f0| 6f 20 74 68 65 0a 5c 63 | 6f 64 65 7b 70 75 73 68 |o the.\c|ode{push|
|00000700| 5f 66 6f 6e 74 28 29 7d | 20 6d 65 74 68 6f 64 20 |_font()}| method |
|00000710| 64 65 73 63 72 69 62 65 | 64 20 62 65 6c 6f 77 2c |describe|d below,|
|00000720| 20 6f 72 20 61 73 20 74 | 68 65 20 6e 65 77 20 76 | or as t|he new v|
|00000730| 61 6c 75 65 20 74 6f 20 | 61 6e 79 0a 6f 74 68 65 |alue to |any.othe|
|00000740| 72 20 5c 63 6f 64 65 7b | 70 75 73 68 5f 5c 76 61 |r \code{|push_\va|
|00000750| 72 7b 70 72 6f 70 65 72 | 74 79 7d 28 29 7d 20 6d |r{proper|ty}()} m|
|00000760| 65 74 68 6f 64 2e 20 20 | 50 75 73 68 69 6e 67 20 |ethod. |Pushing |
|00000770| 74 68 65 20 5c 63 6f 64 | 65 7b 41 53 5f 49 53 7d |the \cod|e{AS_IS}|
|00000780| 0a 76 61 6c 75 65 20 61 | 6c 6c 6f 77 73 20 74 68 |.value a|llows th|
|00000790| 65 20 63 6f 72 72 65 73 | 70 6f 6e 64 69 6e 67 20 |e corres|ponding |
|000007a0| 5c 63 6f 64 65 7b 70 6f | 70 5f 5c 76 61 72 7b 70 |\code{po|p_\var{p|
|000007b0| 72 6f 70 65 72 74 79 7d | 28 29 7d 20 6d 65 74 68 |roperty}|()} meth|
|000007c0| 6f 64 20 74 6f 0a 62 65 | 20 63 61 6c 6c 65 64 20 |od to.be| called |
|000007d0| 77 69 74 68 6f 75 74 20 | 68 61 76 69 6e 67 20 74 |without |having t|
|000007e0| 6f 20 74 72 61 63 6b 20 | 77 68 65 74 68 65 72 20 |o track |whether |
|000007f0| 74 68 65 20 70 72 6f 70 | 65 72 74 79 20 77 61 73 |the prop|erty was|
|00000800| 20 63 68 61 6e 67 65 64 | 2e 0a 5c 65 6e 64 7b 64 | changed|..\end{d|
|00000810| 61 74 61 64 65 73 63 7d | 0a 0a 54 68 65 20 66 6f |atadesc}|..The fo|
|00000820| 6c 6c 6f 77 69 6e 67 20 | 61 74 74 72 69 62 75 74 |llowing |attribut|
|00000830| 65 73 20 61 72 65 20 64 | 65 66 69 6e 65 64 20 66 |es are d|efined f|
|00000840| 6f 72 20 66 6f 72 6d 61 | 74 74 65 72 20 69 6e 73 |or forma|tter ins|
|00000850| 74 61 6e 63 65 20 6f 62 | 6a 65 63 74 73 3a 0a 0a |tance ob|jects:..|
|00000860| 5c 72 65 6e 65 77 63 6f | 6d 6d 61 6e 64 7b 5c 69 |\renewco|mmand{\i|
|00000870| 6e 64 65 78 73 75 62 69 | 74 65 6d 7d 7b 28 66 6f |ndexsubi|tem}{(fo|
|00000880| 72 6d 61 74 74 65 72 20 | 6f 62 6a 65 63 74 20 64 |rmatter |object d|
|00000890| 61 74 61 29 7d 0a 0a 5c | 62 65 67 69 6e 7b 64 61 |ata)}..\|begin{da|
|000008a0| 74 61 64 65 73 63 7d 7b | 77 72 69 74 65 72 7d 0a |tadesc}{|writer}.|
|000008b0| 54 68 65 20 77 72 69 74 | 65 72 20 69 6e 73 74 61 |The writ|er insta|
|000008c0| 6e 63 65 20 77 69 74 68 | 20 77 68 69 63 68 20 74 |nce with| which t|
|000008d0| 68 65 20 66 6f 72 6d 61 | 74 74 65 72 20 69 6e 74 |he forma|tter int|
|000008e0| 65 72 61 63 74 73 2e 0a | 5c 65 6e 64 7b 64 61 74 |eracts..|\end{dat|
|000008f0| 61 64 65 73 63 7d 0a 0a | 0a 5c 72 65 6e 65 77 63 |adesc}..|.\renewc|
|00000900| 6f 6d 6d 61 6e 64 7b 5c | 69 6e 64 65 78 73 75 62 |ommand{\|indexsub|
|00000910| 69 74 65 6d 7d 7b 28 66 | 6f 72 6d 61 74 74 65 72 |item}{(f|ormatter|
|00000920| 20 6f 62 6a 65 63 74 20 | 6d 65 74 68 6f 64 29 7d | object |method)}|
|00000930| 0a 0a 5c 62 65 67 69 6e | 7b 66 75 6e 63 64 65 73 |..\begin|{funcdes|
|00000940| 63 7d 7b 65 6e 64 5f 70 | 61 72 61 67 72 61 70 68 |c}{end_p|aragraph|
|00000950| 7d 7b 62 6c 61 6e 6b 6c | 69 6e 65 73 7d 0a 43 6c |}{blankl|ines}.Cl|
|00000960| 6f 73 65 20 61 6e 79 20 | 6f 70 65 6e 20 70 61 72 |ose any |open par|
|00000970| 61 67 72 61 70 68 73 20 | 61 6e 64 20 69 6e 73 65 |agraphs |and inse|
|00000980| 72 74 20 61 74 20 6c 65 | 61 73 74 20 5c 63 6f 64 |rt at le|ast \cod|
|00000990| 65 7b 62 6c 61 6e 6b 6c | 69 6e 65 73 7d 0a 62 65 |e{blankl|ines}.be|
|000009a0| 66 6f 72 65 20 74 68 65 | 20 6e 65 78 74 20 70 61 |fore the| next pa|
|000009b0| 72 61 67 72 61 70 68 2e | 0a 5c 65 6e 64 7b 66 75 |ragraph.|.\end{fu|
|000009c0| 6e 63 64 65 73 63 7d 0a | 0a 5c 62 65 67 69 6e 7b |ncdesc}.|.\begin{|
|000009d0| 66 75 6e 63 64 65 73 63 | 7d 7b 61 64 64 5f 6c 69 |funcdesc|}{add_li|
|000009e0| 6e 65 5f 62 72 65 61 6b | 7d 7b 7d 0a 41 64 64 20 |ne_break|}{}.Add |
|000009f0| 61 20 68 61 72 64 20 6c | 69 6e 65 20 62 72 65 61 |a hard l|ine brea|
|00000a00| 6b 20 69 66 20 6f 6e 65 | 20 64 6f 65 73 20 6e 6f |k if one| does no|
|00000a10| 74 20 61 6c 72 65 61 64 | 79 20 65 78 69 73 74 2e |t alread|y exist.|
|00000a20| 20 20 54 68 69 73 20 64 | 6f 65 73 20 6e 6f 74 0a | This d|oes not.|
|00000a30| 62 72 65 61 6b 20 74 68 | 65 20 6c 6f 67 69 63 61 |break th|e logica|
|00000a40| 6c 20 70 61 72 61 67 72 | 61 70 68 2e 0a 5c 65 6e |l paragr|aph..\en|
|00000a50| 64 7b 66 75 6e 63 64 65 | 73 63 7d 0a 0a 5c 62 65 |d{funcde|sc}..\be|
|00000a60| 67 69 6e 7b 66 75 6e 63 | 64 65 73 63 7d 7b 61 64 |gin{func|desc}{ad|
|00000a70| 64 5f 68 6f 72 5f 72 75 | 6c 65 7d 7b 2a 61 72 67 |d_hor_ru|le}{*arg|
|00000a80| 73 5c 2c 20 2a 2a 6b 77 | 7d 0a 49 6e 73 65 72 74 |s\, **kw|}.Insert|
|00000a90| 20 61 20 68 6f 72 69 7a | 6f 6e 74 61 6c 20 72 75 | a horiz|ontal ru|
|00000aa0| 6c 65 20 69 6e 20 74 68 | 65 20 6f 75 74 70 75 74 |le in th|e output|
|00000ab0| 2e 20 20 41 20 68 61 72 | 64 20 62 72 65 61 6b 20 |. A har|d break |
|00000ac0| 69 73 20 69 6e 73 65 72 | 74 65 64 20 69 66 0a 74 |is inser|ted if.t|
|00000ad0| 68 65 72 65 20 69 73 20 | 64 61 74 61 20 69 6e 20 |here is |data in |
|00000ae0| 74 68 65 20 63 75 72 72 | 65 6e 74 20 70 61 72 61 |the curr|ent para|
|00000af0| 67 72 61 70 68 2c 20 62 | 75 74 20 74 68 65 20 6c |graph, b|ut the l|
|00000b00| 6f 67 69 63 61 6c 20 70 | 61 72 61 67 72 61 70 68 |ogical p|aragraph|
|00000b10| 20 69 73 0a 6e 6f 74 20 | 62 72 6f 6b 65 6e 2e 20 | is.not |broken. |
|00000b20| 20 54 68 65 20 61 72 67 | 75 6d 65 6e 74 73 20 61 | The arg|uments a|
|00000b30| 6e 64 20 6b 65 79 77 6f | 72 64 73 20 61 72 65 20 |nd keywo|rds are |
|00000b40| 70 61 73 73 65 64 20 6f | 6e 20 74 6f 20 74 68 65 |passed o|n to the|
|00000b50| 20 77 72 69 74 65 72 27 | 73 0a 5c 63 6f 64 65 7b | writer'|s.\code{|
|00000b60| 73 65 6e 64 5f 6c 69 6e | 65 5f 62 72 65 61 6b 28 |send_lin|e_break(|
|00000b70| 29 7d 20 6d 65 74 68 6f | 64 2e 0a 5c 65 6e 64 7b |)} metho|d..\end{|
|00000b80| 66 75 6e 63 64 65 73 63 | 7d 0a 0a 5c 62 65 67 69 |funcdesc|}..\begi|
|00000b90| 6e 7b 66 75 6e 63 64 65 | 73 63 7d 7b 61 64 64 5f |n{funcde|sc}{add_|
|00000ba0| 66 6c 6f 77 69 6e 67 5f | 64 61 74 61 7d 7b 64 61 |flowing_|data}{da|
|00000bb0| 74 61 7d 0a 50 72 6f 76 | 69 64 65 20 64 61 74 61 |ta}.Prov|ide data|
|00000bc0| 20 77 68 69 63 68 20 73 | 68 6f 75 6c 64 20 62 65 | which s|hould be|
|00000bd0| 20 66 6f 72 6d 61 74 74 | 65 64 20 77 69 74 68 20 | formatt|ed with |
|00000be0| 63 6f 6c 6c 61 70 73 65 | 64 20 77 68 69 74 65 73 |collapse|d whites|
|00000bf0| 70 61 63 65 73 2e 0a 57 | 68 69 74 65 73 70 61 63 |paces..W|hitespac|
|00000c00| 65 20 66 72 6f 6d 20 70 | 72 65 63 65 65 64 69 6e |e from p|receedin|
|00000c10| 67 20 61 6e 64 20 73 75 | 63 63 65 73 73 69 76 65 |g and su|ccessive|
|00000c20| 20 63 61 6c 6c 73 20 74 | 6f 0a 5c 63 6f 64 65 7b | calls t|o.\code{|
|00000c30| 61 64 64 5f 66 6c 6f 77 | 69 6e 67 5f 64 61 74 61 |add_flow|ing_data|
|00000c40| 28 29 7d 20 69 73 20 63 | 6f 6e 73 69 64 65 72 65 |()} is c|onsidere|
|00000c50| 64 20 61 73 20 77 65 6c | 6c 20 77 68 65 6e 20 74 |d as wel|l when t|
|00000c60| 68 65 20 77 68 69 74 65 | 73 70 61 63 65 0a 63 6f |he white|space.co|
|00000c70| 6c 6c 61 70 73 65 20 69 | 73 20 70 65 72 66 6f 72 |llapse i|s perfor|
|00000c80| 6d 65 64 2e 20 20 54 68 | 65 20 64 61 74 61 20 77 |med. Th|e data w|
|00000c90| 68 69 63 68 20 69 73 20 | 70 61 73 73 65 64 20 74 |hich is |passed t|
|00000ca0| 6f 20 74 68 69 73 20 6d | 65 74 68 6f 64 20 69 73 |o this m|ethod is|
|00000cb0| 0a 65 78 70 65 63 74 65 | 64 20 74 6f 20 62 65 20 |.expecte|d to be |
|00000cc0| 77 6f 72 64 2d 77 72 61 | 70 70 65 64 20 62 79 20 |word-wra|pped by |
|00000cd0| 74 68 65 20 6f 75 74 70 | 75 74 20 64 65 76 69 63 |the outp|ut devic|
|00000ce0| 65 2e 20 20 4e 6f 74 65 | 20 74 68 61 74 20 61 6e |e. Note| that an|
|00000cf0| 79 0a 77 6f 72 64 2d 77 | 72 61 70 70 69 6e 67 20 |y.word-w|rapping |
|00000d00| 73 74 69 6c 6c 20 6d 75 | 73 74 20 62 65 20 70 65 |still mu|st be pe|
|00000d10| 72 66 6f 72 6d 65 64 20 | 62 79 20 74 68 65 20 77 |rformed |by the w|
|00000d20| 72 69 74 65 72 20 6f 62 | 6a 65 63 74 20 64 75 65 |riter ob|ject due|
|00000d30| 20 74 6f 20 74 68 65 0a | 6e 65 65 64 20 74 6f 20 | to the.|need to |
|00000d40| 72 65 6c 79 20 6f 6e 20 | 64 65 76 69 63 65 20 61 |rely on |device a|
|00000d50| 6e 64 20 66 6f 6e 74 20 | 69 6e 66 6f 72 6d 61 74 |nd font |informat|
|00000d60| 69 6f 6e 2e 0a 5c 65 6e | 64 7b 66 75 6e 63 64 65 |ion..\en|d{funcde|
|00000d70| 73 63 7d 0a 0a 5c 62 65 | 67 69 6e 7b 66 75 6e 63 |sc}..\be|gin{func|
|00000d80| 64 65 73 63 7d 7b 61 64 | 64 5f 6c 69 74 65 72 61 |desc}{ad|d_litera|
|00000d90| 6c 5f 64 61 74 61 7d 7b | 64 61 74 61 7d 0a 50 72 |l_data}{|data}.Pr|
|00000da0| 6f 76 69 64 65 20 64 61 | 74 61 20 77 68 69 63 68 |ovide da|ta which|
|00000db0| 20 73 68 6f 75 6c 64 20 | 62 65 20 70 61 73 73 65 | should |be passe|
|00000dc0| 64 20 74 6f 20 74 68 65 | 20 77 72 69 74 65 72 20 |d to the| writer |
|00000dd0| 75 6e 63 68 61 6e 67 65 | 64 2e 0a 57 68 69 74 65 |unchange|d..White|
|00000de0| 73 70 61 63 65 2c 20 69 | 6e 63 6c 75 64 69 6e 67 |space, i|ncluding|
|00000df0| 20 6e 65 77 6c 69 6e 65 | 20 61 6e 64 20 74 61 62 | newline| and tab|
|00000e00| 20 63 68 61 72 61 63 74 | 65 72 73 2c 20 61 72 65 | charact|ers, are|
|00000e10| 20 63 6f 6e 73 69 64 65 | 72 65 64 20 6c 65 67 61 | conside|red lega|
|00000e20| 6c 0a 69 6e 20 74 68 65 | 20 76 61 6c 75 65 20 6f |l.in the| value o|
|00000e30| 66 20 5c 63 6f 64 65 7b | 64 61 74 61 7d 2e 20 20 |f \code{|data}. |
|00000e40| 0a 5c 65 6e 64 7b 66 75 | 6e 63 64 65 73 63 7d 0a |.\end{fu|ncdesc}.|
|00000e50| 0a 5c 62 65 67 69 6e 7b | 66 75 6e 63 64 65 73 63 |.\begin{|funcdesc|
|00000e60| 7d 7b 61 64 64 5f 6c 61 | 62 65 6c 5f 64 61 74 61 |}{add_la|bel_data|
|00000e70| 7d 7b 66 6f 72 6d 61 74 | 2c 20 63 6f 75 6e 74 65 |}{format|, counte|
|00000e80| 72 7d 0a 49 6e 73 65 72 | 74 20 61 20 6c 61 62 65 |r}.Inser|t a labe|
|00000e90| 6c 20 77 68 69 63 68 20 | 73 68 6f 75 6c 64 20 62 |l which |should b|
|00000ea0| 65 20 70 6c 61 63 65 64 | 20 74 6f 20 74 68 65 20 |e placed| to the |
|00000eb0| 6c 65 66 74 20 6f 66 20 | 74 68 65 20 63 75 72 72 |left of |the curr|
|00000ec0| 65 6e 74 20 6c 65 66 74 | 0a 6d 61 72 67 69 6e 2e |ent left|.margin.|
|00000ed0| 20 20 54 68 69 73 20 73 | 68 6f 75 6c 64 20 62 65 | This s|hould be|
|00000ee0| 20 75 73 65 64 20 66 6f | 72 20 63 6f 6e 73 74 72 | used fo|r constr|
|00000ef0| 75 63 74 69 6e 67 20 62 | 75 6c 6c 65 74 65 64 20 |ucting b|ulleted |
|00000f00| 6f 72 20 6e 75 6d 62 65 | 72 65 64 0a 6c 69 73 74 |or numbe|red.list|
|00000f10| 73 2e 20 20 49 66 20 74 | 68 65 20 5c 63 6f 64 65 |s. If t|he \code|
|00000f20| 7b 66 6f 72 6d 61 74 7d | 20 76 61 6c 75 65 20 69 |{format}| value i|
|00000f30| 73 20 61 20 73 74 72 69 | 6e 67 2c 20 69 74 20 69 |s a stri|ng, it i|
|00000f40| 73 20 69 6e 74 65 72 70 | 72 65 74 65 64 20 61 73 |s interp|reted as|
|00000f50| 20 61 0a 66 6f 72 6d 61 | 74 20 73 70 65 63 69 66 | a.forma|t specif|
|00000f60| 69 63 61 74 69 6f 6e 20 | 66 6f 72 20 5c 63 6f 64 |ication |for \cod|
|00000f70| 65 7b 63 6f 75 6e 74 65 | 72 7d 2c 20 77 68 69 63 |e{counte|r}, whic|
|00000f80| 68 20 73 68 6f 75 6c 64 | 20 62 65 20 61 6e 20 69 |h should| be an i|
|00000f90| 6e 74 65 67 65 72 2e 0a | 54 68 65 20 72 65 73 75 |nteger..|The resu|
|00000fa0| 6c 74 20 6f 66 20 74 68 | 69 73 20 66 6f 72 6d 61 |lt of th|is forma|
|00000fb0| 74 74 69 6e 67 20 62 65 | 63 6f 6d 65 73 20 74 68 |tting be|comes th|
|00000fc0| 65 20 76 61 6c 75 65 20 | 6f 66 20 74 68 65 20 6c |e value |of the l|
|00000fd0| 61 62 65 6c 3b 20 69 66 | 0a 5c 63 6f 64 65 7b 66 |abel; if|.\code{f|
|00000fe0| 6f 72 6d 61 74 7d 20 69 | 73 20 6e 6f 74 20 61 20 |ormat} i|s not a |
|00000ff0| 73 74 72 69 6e 67 20 69 | 74 20 69 73 20 75 73 65 |string i|t is use|
|00001000| 64 20 61 73 20 74 68 65 | 20 6c 61 62 65 6c 20 76 |d as the| label v|
|00001010| 61 6c 75 65 20 64 69 72 | 65 63 74 6c 79 2e 0a 54 |alue dir|ectly..T|
|00001020| 68 65 20 6c 61 62 65 6c | 20 76 61 6c 75 65 20 69 |he label| value i|
|00001030| 73 20 70 61 73 73 65 64 | 20 61 73 20 74 68 65 20 |s passed| as the |
|00001040| 6f 6e 6c 79 20 61 72 67 | 75 6d 65 6e 74 20 74 6f |only arg|ument to|
|00001050| 20 74 68 65 20 77 72 69 | 74 65 72 27 73 0a 5c 63 | the wri|ter's.\c|
|00001060| 6f 64 65 7b 73 65 6e 64 | 5f 6c 61 62 65 6c 5f 64 |ode{send|_label_d|
|00001070| 61 74 61 28 29 7d 20 6d | 65 74 68 6f 64 2e 20 20 |ata()} m|ethod. |
|00001080| 49 6e 74 65 72 70 72 65 | 74 61 74 69 6f 6e 20 6f |Interpre|tation o|
|00001090| 66 20 6e 6f 6e 2d 73 74 | 72 69 6e 67 20 6c 61 62 |f non-st|ring lab|
|000010a0| 65 6c 0a 76 61 6c 75 65 | 73 20 69 73 20 64 65 70 |el.value|s is dep|
|000010b0| 65 6e 64 65 6e 74 20 6f | 6e 20 74 68 65 20 61 73 |endent o|n the as|
|000010c0| 73 6f 63 69 61 74 65 64 | 20 77 72 69 74 65 72 2e |sociated| writer.|
|000010d0| 0a 0a 46 6f 72 6d 61 74 | 20 73 70 65 63 69 66 69 |..Format| specifi|
|000010e0| 63 61 74 69 6f 6e 73 20 | 61 72 65 20 73 74 72 69 |cations |are stri|
|000010f0| 6e 67 73 20 77 68 69 63 | 68 2c 20 69 6e 20 63 6f |ngs whic|h, in co|
|00001100| 6d 62 69 6e 61 74 69 6f | 6e 20 77 69 74 68 20 61 |mbinatio|n with a|
|00001110| 20 63 6f 75 6e 74 65 72 | 0a 76 61 6c 75 65 2c 20 | counter|.value, |
|00001120| 61 72 65 20 75 73 65 64 | 20 74 6f 20 63 6f 6d 70 |are used| to comp|
|00001130| 75 74 65 20 6c 61 62 65 | 6c 20 76 61 6c 75 65 73 |ute labe|l values|
|00001140| 2e 20 20 45 61 63 68 20 | 63 68 61 72 61 63 74 65 |. Each |characte|
|00001150| 72 20 69 6e 20 74 68 65 | 20 66 6f 72 6d 61 74 0a |r in the| format.|
|00001160| 73 74 72 69 6e 67 20 69 | 73 20 63 6f 70 69 65 64 |string i|s copied|
|00001170| 20 74 6f 20 74 68 65 20 | 6c 61 62 65 6c 20 76 61 | to the |label va|
|00001180| 6c 75 65 2c 20 77 69 74 | 68 20 73 6f 6d 65 20 63 |lue, wit|h some c|
|00001190| 68 61 72 61 63 74 65 72 | 73 20 72 65 63 6f 67 6e |haracter|s recogn|
|000011a0| 69 7a 65 64 0a 74 6f 20 | 69 6e 64 69 63 61 74 65 |ized.to |indicate|
|000011b0| 20 61 20 74 72 61 6e 73 | 66 6f 72 6d 20 6f 6e 20 | a trans|form on |
|000011c0| 74 68 65 20 63 6f 75 6e | 74 65 72 20 76 61 6c 75 |the coun|ter valu|
|000011d0| 65 2e 20 20 53 70 65 63 | 69 66 69 63 61 6c 6c 79 |e. Spec|ifically|
|000011e0| 2c 20 74 68 65 0a 63 68 | 61 72 61 63 74 65 72 20 |, the.ch|aracter |
|000011f0| 60 60 5c 63 6f 64 65 7b | 31 7d 27 27 20 72 65 70 |``\code{|1}'' rep|
|00001200| 72 65 73 65 6e 74 73 20 | 74 68 65 20 63 6f 75 6e |resents |the coun|
|00001210| 74 65 72 20 76 61 6c 75 | 65 20 66 6f 72 6d 61 74 |ter valu|e format|
|00001220| 74 65 72 20 61 73 20 61 | 6e 0a 61 72 61 62 69 63 |ter as a|n.arabic|
|00001230| 20 6e 75 6d 62 65 72 2c | 20 74 68 65 20 63 68 61 | number,| the cha|
|00001240| 72 61 63 74 65 72 73 20 | 60 60 5c 63 6f 64 65 7b |racters |``\code{|
|00001250| 41 7d 27 27 20 61 6e 64 | 20 60 60 5c 63 6f 64 65 |A}'' and| ``\code|
|00001260| 7b 61 7d 27 27 20 72 65 | 70 72 65 73 65 6e 74 0a |{a}'' re|present.|
|00001270| 61 6c 70 68 61 62 65 74 | 69 63 20 72 65 70 72 65 |alphabet|ic repre|
|00001280| 73 65 6e 74 61 74 69 6f | 6e 73 20 6f 66 20 74 68 |sentatio|ns of th|
|00001290| 65 20 63 6f 75 6e 74 65 | 72 20 76 61 6c 75 65 20 |e counte|r value |
|000012a0| 69 6e 20 75 70 70 65 72 | 20 61 6e 64 20 6c 6f 77 |in upper| and low|
|000012b0| 65 72 0a 63 61 73 65 2c | 20 72 65 73 70 65 63 74 |er.case,| respect|
|000012c0| 69 76 65 6c 79 2c 20 61 | 6e 64 20 60 60 5c 63 6f |ively, a|nd ``\co|
|000012d0| 64 65 7b 49 7d 27 27 20 | 61 6e 64 20 60 60 5c 63 |de{I}'' |and ``\c|
|000012e0| 6f 64 65 7b 69 7d 27 27 | 20 72 65 70 72 65 73 65 |ode{i}''| represe|
|000012f0| 6e 74 20 74 68 65 0a 63 | 6f 75 6e 74 65 72 20 76 |nt the.c|ounter v|
|00001300| 61 6c 75 65 20 69 6e 20 | 52 6f 6d 61 6e 20 6e 75 |alue in |Roman nu|
|00001310| 6d 65 72 61 6c 73 2c 20 | 69 6e 20 75 70 70 65 72 |merals, |in upper|
|00001320| 20 61 6e 64 20 6c 6f 77 | 65 72 20 63 61 73 65 2e | and low|er case.|
|00001330| 20 20 4e 6f 74 65 20 74 | 68 61 74 0a 74 68 65 20 | Note t|hat.the |
|00001340| 61 6c 70 68 61 62 65 74 | 69 63 20 61 6e 64 20 72 |alphabet|ic and r|
|00001350| 6f 6d 61 6e 20 74 72 61 | 6e 73 66 6f 72 6d 73 20 |oman tra|nsforms |
|00001360| 72 65 71 75 69 72 65 20 | 74 68 61 74 20 74 68 65 |require |that the|
|00001370| 20 63 6f 75 6e 74 65 72 | 20 76 61 6c 75 65 20 62 | counter| value b|
|00001380| 65 0a 67 72 65 61 74 65 | 72 20 74 68 61 6e 20 7a |e.greate|r than z|
|00001390| 65 72 6f 2e 0a 5c 65 6e | 64 7b 66 75 6e 63 64 65 |ero..\en|d{funcde|
|000013a0| 73 63 7d 0a 0a 5c 62 65 | 67 69 6e 7b 66 75 6e 63 |sc}..\be|gin{func|
|000013b0| 64 65 73 63 7d 7b 66 6c | 75 73 68 5f 73 6f 66 74 |desc}{fl|ush_soft|
|000013c0| 73 70 61 63 65 7d 7b 7d | 0a 53 65 6e 64 20 61 6e |space}{}|.Send an|
|000013d0| 79 20 70 65 6e 64 69 6e | 67 20 77 68 69 74 65 73 |y pendin|g whites|
|000013e0| 70 61 63 65 20 62 75 66 | 66 65 72 65 64 20 66 72 |pace buf|fered fr|
|000013f0| 6f 6d 20 61 20 70 72 65 | 76 69 6f 75 73 20 63 61 |om a pre|vious ca|
|00001400| 6c 6c 20 74 6f 0a 5c 63 | 6f 64 65 7b 61 64 64 5f |ll to.\c|ode{add_|
|00001410| 66 6c 6f 77 69 6e 67 5f | 64 61 74 61 28 29 7d 20 |flowing_|data()} |
|00001420| 74 6f 20 74 68 65 20 61 | 73 73 6f 63 69 61 74 65 |to the a|ssociate|
|00001430| 64 20 77 72 69 74 65 72 | 20 6f 62 6a 65 63 74 2e |d writer| object.|
|00001440| 20 20 54 68 69 73 0a 73 | 68 6f 75 6c 64 20 62 65 | This.s|hould be|
|00001450| 20 63 61 6c 6c 65 64 20 | 62 65 66 6f 72 65 20 61 | called |before a|
|00001460| 6e 79 20 64 69 72 65 63 | 74 20 6d 61 6e 69 70 75 |ny direc|t manipu|
|00001470| 6c 61 74 69 6f 6e 20 6f | 66 20 74 68 65 20 77 72 |lation o|f the wr|
|00001480| 69 74 65 72 20 6f 62 6a | 65 63 74 2e 0a 5c 65 6e |iter obj|ect..\en|
|00001490| 64 7b 66 75 6e 63 64 65 | 73 63 7d 0a 0a 5c 62 65 |d{funcde|sc}..\be|
|000014a0| 67 69 6e 7b 66 75 6e 63 | 64 65 73 63 7d 7b 70 75 |gin{func|desc}{pu|
|000014b0| 73 68 5f 61 6c 69 67 6e | 6d 65 6e 74 7d 7b 61 6c |sh_align|ment}{al|
|000014c0| 69 67 6e 7d 0a 50 75 73 | 68 20 61 20 6e 65 77 20 |ign}.Pus|h a new |
|000014d0| 61 6c 69 67 6e 6d 65 6e | 74 20 73 65 74 74 69 6e |alignmen|t settin|
|000014e0| 67 20 6f 6e 74 6f 20 74 | 68 65 20 61 6c 69 67 6e |g onto t|he align|
|000014f0| 6d 65 6e 74 20 73 74 61 | 63 6b 2e 20 20 54 68 69 |ment sta|ck. Thi|
|00001500| 73 20 6d 61 79 20 62 65 | 0a 5c 63 6f 64 65 7b 41 |s may be|.\code{A|
|00001510| 53 5f 49 53 7d 20 69 66 | 20 6e 6f 20 63 68 61 6e |S_IS} if| no chan|
|00001520| 67 65 20 69 73 20 64 65 | 73 69 72 65 64 2e 20 20 |ge is de|sired. |
|00001530| 49 66 20 74 68 65 20 61 | 6c 69 67 6e 6d 65 6e 74 |If the a|lignment|
|00001540| 20 76 61 6c 75 65 20 69 | 73 0a 63 68 61 6e 67 65 | value i|s.change|
|00001550| 64 20 66 72 6f 6d 20 74 | 68 65 20 70 72 65 76 69 |d from t|he previ|
|00001560| 6f 75 73 20 73 65 74 74 | 69 6e 67 2c 20 74 68 65 |ous sett|ing, the|
|00001570| 20 77 72 69 74 65 72 27 | 73 20 5c 63 6f 64 65 7b | writer'|s \code{|
|00001580| 6e 65 77 5f 61 6c 69 67 | 6e 6d 65 6e 74 28 29 7d |new_alig|nment()}|
|00001590| 0a 6d 65 74 68 6f 64 20 | 69 73 20 63 61 6c 6c 65 |.method |is calle|
|000015a0| 64 20 77 69 74 68 20 74 | 68 65 20 5c 63 6f 64 65 |d with t|he \code|
|000015b0| 7b 61 6c 69 67 6e 7d 20 | 76 61 6c 75 65 2e 0a 5c |{align} |value..\|
|000015c0| 65 6e 64 7b 66 75 6e 63 | 64 65 73 63 7d 0a 0a 5c |end{func|desc}..\|
|000015d0| 62 65 67 69 6e 7b 66 75 | 6e 63 64 65 73 63 7d 7b |begin{fu|ncdesc}{|
|000015e0| 70 6f 70 5f 61 6c 69 67 | 6e 6d 65 6e 74 7d 7b 7d |pop_alig|nment}{}|
|000015f0| 0a 52 65 73 74 6f 72 65 | 20 74 68 65 20 70 72 65 |.Restore| the pre|
|00001600| 76 69 6f 75 73 20 61 6c | 69 67 6e 6d 65 6e 74 2e |vious al|ignment.|
|00001610| 0a 5c 65 6e 64 7b 66 75 | 6e 63 64 65 73 63 7d 0a |.\end{fu|ncdesc}.|
|00001620| 0a 5c 62 65 67 69 6e 7b | 66 75 6e 63 64 65 73 63 |.\begin{|funcdesc|
|00001630| 7d 7b 70 75 73 68 5f 66 | 6f 6e 74 7d 7b 28 73 69 |}{push_f|ont}{(si|
|00001640| 7a 65 2c 20 69 74 61 6c | 69 63 2c 20 62 6f 6c 64 |ze, ital|ic, bold|
|00001650| 2c 20 74 65 6c 65 74 79 | 70 65 29 7d 0a 43 68 61 |, telety|pe)}.Cha|
|00001660| 6e 67 65 20 73 6f 6d 65 | 20 6f 72 20 61 6c 6c 20 |nge some| or all |
|00001670| 66 6f 6e 74 20 70 72 6f | 70 65 72 74 69 65 73 20 |font pro|perties |
|00001680| 6f 66 20 74 68 65 20 77 | 72 69 74 65 72 20 6f 62 |of the w|riter ob|
|00001690| 6a 65 63 74 2e 20 20 50 | 72 6f 70 65 72 74 69 65 |ject. P|ropertie|
|000016a0| 73 0a 77 68 69 63 68 20 | 61 72 65 20 6e 6f 74 20 |s.which |are not |
|000016b0| 73 65 74 20 74 6f 20 5c | 63 6f 64 65 7b 41 53 5f |set to \|code{AS_|
|000016c0| 49 53 7d 20 61 72 65 20 | 73 65 74 20 74 6f 20 74 |IS} are |set to t|
|000016d0| 68 65 20 76 61 6c 75 65 | 73 20 70 61 73 73 65 64 |he value|s passed|
|000016e0| 20 69 6e 0a 77 68 69 6c | 65 20 6f 74 68 65 72 73 | in.whil|e others|
|000016f0| 20 61 72 65 20 6d 61 69 | 6e 74 61 69 6e 65 64 20 | are mai|ntained |
|00001700| 61 74 20 74 68 65 69 72 | 20 63 75 72 72 65 6e 74 |at their| current|
|00001710| 20 73 65 74 74 69 6e 67 | 73 2e 20 20 54 68 65 20 | setting|s. The |
|00001720| 77 72 69 74 65 72 27 73 | 0a 5c 63 6f 64 65 7b 6e |writer's|.\code{n|
|00001730| 65 77 5f 66 6f 6e 74 28 | 29 7d 20 6d 65 74 68 6f |ew_font(|)} metho|
|00001740| 64 20 69 73 20 63 61 6c | 6c 65 64 20 77 69 74 68 |d is cal|led with|
|00001750| 20 74 68 65 20 66 75 6c | 6c 79 20 72 65 73 6f 6c | the ful|ly resol|
|00001760| 76 65 64 20 66 6f 6e 74 | 0a 73 70 65 63 69 66 69 |ved font|.specifi|
|00001770| 63 61 74 69 6f 6e 2e 0a | 5c 65 6e 64 7b 66 75 6e |cation..|\end{fun|
|00001780| 63 64 65 73 63 7d 0a 0a | 5c 62 65 67 69 6e 7b 66 |cdesc}..|\begin{f|
|00001790| 75 6e 63 64 65 73 63 7d | 7b 70 6f 70 5f 66 6f 6e |uncdesc}|{pop_fon|
|000017a0| 74 7d 7b 7d 0a 52 65 73 | 74 6f 72 65 20 74 68 65 |t}{}.Res|tore the|
|000017b0| 20 70 72 65 76 69 6f 75 | 73 20 66 6f 6e 74 2e 0a | previou|s font..|
|000017c0| 5c 65 6e 64 7b 66 75 6e | 63 64 65 73 63 7d 0a 0a |\end{fun|cdesc}..|
|000017d0| 5c 62 65 67 69 6e 7b 66 | 75 6e 63 64 65 73 63 7d |\begin{f|uncdesc}|
|000017e0| 7b 70 75 73 68 5f 6d 61 | 72 67 69 6e 7d 7b 6d 61 |{push_ma|rgin}{ma|
|000017f0| 72 67 69 6e 7d 0a 49 6e | 63 72 65 61 73 65 20 74 |rgin}.In|crease t|
|00001800| 68 65 20 6e 75 6d 62 65 | 72 20 6f 66 20 6c 65 66 |he numbe|r of lef|
|00001810| 74 20 6d 61 72 67 69 6e | 20 69 6e 64 65 6e 74 61 |t margin| indenta|
|00001820| 74 69 6f 6e 73 20 62 79 | 20 6f 6e 65 2c 20 61 73 |tions by| one, as|
|00001830| 73 6f 63 69 61 74 69 6e | 67 0a 74 68 65 20 6c 6f |sociatin|g.the lo|
|00001840| 67 69 63 61 6c 20 74 61 | 67 20 5c 63 6f 64 65 7b |gical ta|g \code{|
|00001850| 6d 61 72 67 69 6e 7d 20 | 77 69 74 68 20 74 68 65 |margin} |with the|
|00001860| 20 6e 65 77 20 69 6e 64 | 65 6e 74 61 74 69 6f 6e | new ind|entation|
|00001870| 2e 20 20 54 68 65 20 69 | 6e 69 74 69 61 6c 0a 6d |. The i|nitial.m|
|00001880| 61 72 67 69 6e 20 6c 65 | 76 65 6c 20 69 73 20 5c |argin le|vel is \|
|00001890| 63 6f 64 65 7b 30 7d 2e | 20 20 43 68 61 6e 67 65 |code{0}.| Change|
|000018a0| 64 20 76 61 6c 75 65 73 | 20 6f 66 20 74 68 65 20 |d values| of the |
|000018b0| 6c 6f 67 69 63 61 6c 20 | 74 61 67 20 6d 75 73 74 |logical |tag must|
|000018c0| 20 62 65 0a 74 72 75 65 | 20 76 61 6c 75 65 73 3b | be.true| values;|
|000018d0| 20 66 61 6c 73 65 20 76 | 61 6c 75 65 73 20 6f 74 | false v|alues ot|
|000018e0| 68 65 72 20 74 68 61 6e | 20 5c 63 6f 64 65 7b 41 |her than| \code{A|
|000018f0| 53 5f 49 53 7d 20 61 72 | 65 20 6e 6f 74 20 73 75 |S_IS} ar|e not su|
|00001900| 66 66 69 63 69 65 6e 74 | 0a 74 6f 20 63 68 61 6e |fficient|.to chan|
|00001910| 67 65 20 74 68 65 20 6d | 61 72 67 69 6e 2e 0a 5c |ge the m|argin..\|
|00001920| 65 6e 64 7b 66 75 6e 63 | 64 65 73 63 7d 0a 0a 5c |end{func|desc}..\|
|00001930| 62 65 67 69 6e 7b 66 75 | 6e 63 64 65 73 63 7d 7b |begin{fu|ncdesc}{|
|00001940| 70 6f 70 5f 6d 61 72 67 | 69 6e 7d 7b 7d 0a 52 65 |pop_marg|in}{}.Re|
|00001950| 73 74 6f 72 65 20 74 68 | 65 20 70 72 65 76 69 6f |store th|e previo|
|00001960| 75 73 20 6d 61 72 67 69 | 6e 2e 0a 5c 65 6e 64 7b |us margi|n..\end{|
|00001970| 66 75 6e 63 64 65 73 63 | 7d 0a 0a 5c 62 65 67 69 |funcdesc|}..\begi|
|00001980| 6e 7b 66 75 6e 63 64 65 | 73 63 7d 7b 70 75 73 68 |n{funcde|sc}{push|
|00001990| 5f 73 74 79 6c 65 7d 7b | 2a 73 74 79 6c 65 73 7d |_style}{|*styles}|
|000019a0| 0a 50 75 73 68 20 61 6e | 79 20 6e 75 6d 62 65 72 |.Push an|y number|
|000019b0| 20 6f 66 20 61 72 62 69 | 74 72 61 72 79 20 73 74 | of arbi|trary st|
|000019c0| 79 6c 65 20 73 70 65 63 | 69 66 69 63 61 74 69 6f |yle spec|ificatio|
|000019d0| 6e 73 2e 20 20 41 6c 6c | 20 73 74 79 6c 65 73 20 |ns. All| styles |
|000019e0| 61 72 65 0a 70 75 73 68 | 65 64 20 6f 6e 74 6f 20 |are.push|ed onto |
|000019f0| 74 68 65 20 73 74 79 6c | 65 73 20 73 74 61 63 6b |the styl|es stack|
|00001a00| 20 69 6e 20 6f 72 64 65 | 72 2e 20 20 41 20 74 75 | in orde|r. A tu|
|00001a10| 70 6c 65 20 72 65 70 72 | 65 73 65 6e 74 69 6e 67 |ple repr|esenting|
|00001a20| 20 74 68 65 0a 65 6e 74 | 69 72 65 20 73 74 61 63 | the.ent|ire stac|
|00001a30| 6b 2c 20 69 6e 63 6c 75 | 64 69 6e 67 20 5c 63 6f |k, inclu|ding \co|
|00001a40| 64 65 7b 41 53 5f 49 53 | 7d 20 76 61 6c 75 65 73 |de{AS_IS|} values|
|00001a50| 2c 20 69 73 20 70 61 73 | 73 65 64 20 74 6f 20 74 |, is pas|sed to t|
|00001a60| 68 65 20 77 72 69 74 65 | 72 27 73 0a 5c 63 6f 64 |he write|r's.\cod|
|00001a70| 65 7b 6e 65 77 5f 73 74 | 79 6c 65 73 28 29 7d 20 |e{new_st|yles()} |
|00001a80| 6d 65 74 68 6f 64 2e 0a | 5c 65 6e 64 7b 66 75 6e |method..|\end{fun|
|00001a90| 63 64 65 73 63 7d 0a 0a | 5c 62 65 67 69 6e 7b 66 |cdesc}..|\begin{f|
|00001aa0| 75 6e 63 64 65 73 63 7d | 7b 70 6f 70 5f 73 74 79 |uncdesc}|{pop_sty|
|00001ab0| 6c 65 7d 7b 5c 6f 70 74 | 69 6f 6e 61 6c 7b 6e 5c |le}{\opt|ional{n\|
|00001ac0| 63 6f 64 65 7b 20 3d 20 | 31 7d 7d 7d 0a 50 6f 70 |code{ = |1}}}.Pop|
|00001ad0| 20 74 68 65 20 6c 61 73 | 74 20 5c 63 6f 64 65 7b | the las|t \code{|
|00001ae0| 6e 7d 20 73 74 79 6c 65 | 20 73 70 65 63 69 66 69 |n} style| specifi|
|00001af0| 63 61 74 69 6f 6e 73 20 | 70 61 73 73 65 64 20 74 |cations |passed t|
|00001b00| 6f 0a 5c 63 6f 64 65 7b | 70 75 73 68 5f 73 74 79 |o.\code{|push_sty|
|00001b10| 6c 65 28 29 7d 2e 20 20 | 41 20 74 75 70 6c 65 20 |le()}. |A tuple |
|00001b20| 72 65 70 72 65 73 65 6e | 74 69 6e 67 20 74 68 65 |represen|ting the|
|00001b30| 20 72 65 76 69 73 65 64 | 20 73 74 61 63 6b 2c 0a | revised| stack,.|
|00001b40| 69 6e 63 6c 75 64 69 6e | 67 20 5c 63 6f 64 65 7b |includin|g \code{|
|00001b50| 41 53 5f 49 53 7d 20 76 | 61 6c 75 65 73 2c 20 69 |AS_IS} v|alues, i|
|00001b60| 73 20 70 61 73 73 65 64 | 20 74 6f 20 74 68 65 20 |s passed| to the |
|00001b70| 77 72 69 74 65 72 27 73 | 0a 5c 63 6f 64 65 7b 6e |writer's|.\code{n|
|00001b80| 65 77 5f 73 74 79 6c 65 | 73 28 29 7d 20 6d 65 74 |ew_style|s()} met|
|00001b90| 68 6f 64 2e 0a 5c 65 6e | 64 7b 66 75 6e 63 64 65 |hod..\en|d{funcde|
|00001ba0| 73 63 7d 0a 0a 5c 62 65 | 67 69 6e 7b 66 75 6e 63 |sc}..\be|gin{func|
|00001bb0| 64 65 73 63 7d 7b 73 65 | 74 5f 73 70 61 63 69 6e |desc}{se|t_spacin|
|00001bc0| 67 7d 7b 73 70 61 63 69 | 6e 67 7d 0a 53 65 74 20 |g}{spaci|ng}.Set |
|00001bd0| 74 68 65 20 73 70 61 63 | 69 6e 67 20 73 74 79 6c |the spac|ing styl|
|00001be0| 65 20 66 6f 72 20 74 68 | 65 20 77 72 69 74 65 72 |e for th|e writer|
|00001bf0| 2e 0a 5c 65 6e 64 7b 66 | 75 6e 63 64 65 73 63 7d |..\end{f|uncdesc}|
|00001c00| 0a 0a 5c 62 65 67 69 6e | 7b 66 75 6e 63 64 65 73 |..\begin|{funcdes|
|00001c10| 63 7d 7b 61 73 73 65 72 | 74 5f 6c 69 6e 65 5f 64 |c}{asser|t_line_d|
|00001c20| 61 74 61 7d 7b 5c 6f 70 | 74 69 6f 6e 61 6c 7b 66 |ata}{\op|tional{f|
|00001c30| 6c 61 67 5c 63 6f 64 65 | 7b 20 3d 20 31 7d 7d 7d |lag\code|{ = 1}}}|
|00001c40| 0a 49 6e 66 6f 72 6d 20 | 74 68 65 20 66 6f 72 6d |.Inform |the form|
|00001c50| 61 74 74 65 72 20 74 68 | 61 74 20 64 61 74 61 20 |atter th|at data |
|00001c60| 68 61 73 20 62 65 65 6e | 20 61 64 64 65 64 20 74 |has been| added t|
|00001c70| 6f 20 74 68 65 20 63 75 | 72 72 65 6e 74 20 70 61 |o the cu|rrent pa|
|00001c80| 72 61 67 72 61 70 68 0a | 6f 75 74 2d 6f 66 2d 62 |ragraph.|out-of-b|
|00001c90| 61 6e 64 2e 20 20 54 68 | 69 73 20 73 68 6f 75 6c |and. Th|is shoul|
|00001ca0| 64 20 62 65 20 75 73 65 | 64 20 77 68 65 6e 20 74 |d be use|d when t|
|00001cb0| 68 65 20 77 72 69 74 65 | 72 20 68 61 73 20 62 65 |he write|r has be|
|00001cc0| 65 6e 20 6d 61 6e 69 70 | 75 6c 61 74 65 64 0a 64 |en manip|ulated.d|
|00001cd0| 69 72 65 63 74 6c 79 2e | 20 20 54 68 65 20 6f 70 |irectly.| The op|
|00001ce0| 74 69 6f 6e 61 6c 20 5c | 63 6f 64 65 7b 66 6c 61 |tional \|code{fla|
|00001cf0| 67 7d 20 61 72 67 75 6d | 65 6e 74 20 63 61 6e 20 |g} argum|ent can |
|00001d00| 62 65 20 73 65 74 20 74 | 6f 20 66 61 6c 73 65 20 |be set t|o false |
|00001d10| 69 66 0a 74 68 65 20 77 | 72 69 74 65 72 20 6d 61 |if.the w|riter ma|
|00001d20| 6e 69 70 75 6c 61 74 69 | 6f 6e 73 20 70 72 6f 64 |nipulati|ons prod|
|00001d30| 75 63 65 64 20 61 20 68 | 61 72 64 20 6c 69 6e 65 |uced a h|ard line|
|00001d40| 20 62 72 65 61 6b 20 61 | 74 20 74 68 65 20 65 6e | break a|t the en|
|00001d50| 64 20 6f 66 20 74 68 65 | 0a 6f 75 74 70 75 74 2e |d of the|.output.|
|00001d60| 0a 5c 65 6e 64 7b 66 75 | 6e 63 64 65 73 63 7d 0a |.\end{fu|ncdesc}.|
|00001d70| 0a 0a 5c 73 75 62 73 65 | 63 74 69 6f 6e 7b 46 6f |..\subse|ction{Fo|
|00001d80| 72 6d 61 74 74 65 72 20 | 49 6d 70 6c 65 6d 65 6e |rmatter |Implemen|
|00001d90| 74 61 74 69 6f 6e 73 7d | 0a 0a 54 77 6f 20 69 6d |tations}|..Two im|
|00001da0| 70 6c 65 6d 65 6e 74 61 | 74 69 6f 6e 73 20 6f 66 |plementa|tions of|
|00001db0| 20 66 6f 72 6d 61 74 74 | 65 72 20 6f 62 6a 65 63 | formatt|er objec|
|00001dc0| 74 73 20 61 72 65 20 70 | 72 6f 76 69 64 65 64 20 |ts are p|rovided |
|00001dd0| 62 79 20 74 68 69 73 20 | 6d 6f 64 75 6c 65 2e 0a |by this |module..|
|00001de0| 4d 6f 73 74 20 61 70 70 | 6c 69 63 61 74 69 6f 6e |Most app|lication|
|00001df0| 73 20 6d 61 79 20 75 73 | 65 20 6f 6e 65 20 6f 66 |s may us|e one of|
|00001e00| 20 74 68 65 73 65 20 63 | 6c 61 73 73 65 73 20 77 | these c|lasses w|
|00001e10| 69 74 68 6f 75 74 20 6d | 6f 64 69 66 69 63 61 74 |ithout m|odificat|
|00001e20| 69 6f 6e 20 6f 72 0a 73 | 75 62 63 6c 61 73 73 69 |ion or.s|ubclassi|
|00001e30| 6e 67 2e 0a 0a 5c 72 65 | 6e 65 77 63 6f 6d 6d 61 |ng...\re|newcomma|
|00001e40| 6e 64 7b 5c 69 6e 64 65 | 78 73 75 62 69 74 65 6d |nd{\inde|xsubitem|
|00001e50| 7d 7b 28 69 6e 20 6d 6f | 64 75 6c 65 20 66 6f 72 |}{(in mo|dule for|
|00001e60| 6d 61 74 74 65 72 29 7d | 0a 0a 5c 62 65 67 69 6e |matter)}|..\begin|
|00001e70| 7b 66 75 6e 63 64 65 73 | 63 7d 7b 4e 75 6c 6c 46 |{funcdes|c}{NullF|
|00001e80| 6f 72 6d 61 74 74 65 72 | 7d 7b 5c 6f 70 74 69 6f |ormatter|}{\optio|
|00001e90| 6e 61 6c 7b 77 72 69 74 | 65 72 5c 63 6f 64 65 7b |nal{writ|er\code{|
|00001ea0| 20 3d 20 4e 6f 6e 65 7d | 7d 7d 0a 41 20 66 6f 72 | = None}|}}.A for|
|00001eb0| 6d 61 74 74 65 72 20 77 | 68 69 63 68 20 64 6f 65 |matter w|hich doe|
|00001ec0| 73 20 6e 6f 74 68 69 6e | 67 2e 20 20 49 66 20 5c |s nothin|g. If \|
|00001ed0| 63 6f 64 65 7b 77 72 69 | 74 65 72 7d 20 69 73 20 |code{wri|ter} is |
|00001ee0| 6f 6d 69 74 74 65 64 2c | 20 61 0a 5c 63 6f 64 65 |omitted,| a.\code|
|00001ef0| 7b 4e 75 6c 6c 57 72 69 | 74 65 72 7d 20 69 6e 73 |{NullWri|ter} ins|
|00001f00| 74 61 6e 63 65 20 69 73 | 20 63 72 65 61 74 65 64 |tance is| created|
|00001f10| 2e 20 20 4e 6f 20 6d 65 | 74 68 6f 64 73 20 6f 66 |. No me|thods of|
|00001f20| 20 74 68 65 20 77 72 69 | 74 65 72 20 61 72 65 0a | the wri|ter are.|
|00001f30| 63 61 6c 6c 65 64 20 62 | 79 20 5c 63 6f 64 65 7b |called b|y \code{|
|00001f40| 4e 75 6c 6c 57 72 69 74 | 65 72 7d 20 69 6e 73 74 |NullWrit|er} inst|
|00001f50| 61 6e 63 65 73 2e 20 20 | 49 6d 70 6c 65 6d 65 6e |ances. |Implemen|
|00001f60| 74 61 74 69 6f 6e 73 20 | 73 68 6f 75 6c 64 20 69 |tations |should i|
|00001f70| 6e 68 65 72 69 74 0a 66 | 72 6f 6d 20 74 68 69 73 |nherit.f|rom this|
|00001f80| 20 63 6c 61 73 73 20 69 | 66 20 69 6d 70 6c 65 6d | class i|f implem|
|00001f90| 65 6e 74 69 6e 67 20 61 | 20 77 72 69 74 65 72 20 |enting a| writer |
|00001fa0| 69 6e 74 65 72 66 61 63 | 65 20 62 75 74 20 64 6f |interfac|e but do|
|00001fb0| 6e 27 74 20 6e 65 65 64 | 20 74 6f 0a 69 6e 68 65 |n't need| to.inhe|
|00001fc0| 72 69 74 20 61 6e 79 20 | 69 6d 70 6c 65 6d 65 6e |rit any |implemen|
|00001fd0| 74 61 74 69 6f 6e 2e 0a | 5c 65 6e 64 7b 66 75 6e |tation..|\end{fun|
|00001fe0| 63 64 65 73 63 7d 0a 0a | 5c 62 65 67 69 6e 7b 66 |cdesc}..|\begin{f|
|00001ff0| 75 6e 63 64 65 73 63 7d | 7b 41 62 73 74 72 61 63 |uncdesc}|{Abstrac|
|00002000| 74 46 6f 72 6d 61 74 74 | 65 72 7d 7b 77 72 69 74 |tFormatt|er}{writ|
|00002010| 65 72 7d 0a 54 68 65 20 | 73 74 61 6e 64 61 72 64 |er}.The |standard|
|00002020| 20 66 6f 72 6d 61 74 74 | 65 72 2e 20 20 54 68 69 | formatt|er. Thi|
|00002030| 73 20 69 6d 70 6c 65 6d | 65 6e 74 61 74 69 6f 6e |s implem|entation|
|00002040| 20 68 61 73 20 64 65 6d | 6f 6e 73 74 72 61 74 65 | has dem|onstrate|
|00002050| 64 20 77 69 64 65 0a 61 | 70 70 6c 69 63 61 62 69 |d wide.a|pplicabi|
|00002060| 6c 69 74 79 20 74 6f 20 | 6d 61 6e 79 20 77 72 69 |lity to |many wri|
|00002070| 74 65 72 73 2c 20 61 6e | 64 20 6d 61 79 20 62 65 |ters, an|d may be|
|00002080| 20 75 73 65 64 20 64 69 | 72 65 63 74 6c 79 20 69 | used di|rectly i|
|00002090| 6e 20 6d 6f 73 74 0a 63 | 69 72 63 75 6d 73 74 61 |n most.c|ircumsta|
|000020a0| 6e 63 65 73 2e 20 20 49 | 74 20 68 61 73 20 62 65 |nces. I|t has be|
|000020b0| 65 6e 20 75 73 65 64 20 | 74 6f 20 69 6d 70 6c 65 |en used |to imple|
|000020c0| 6d 65 6e 74 20 61 20 66 | 75 6c 6c 2d 66 65 61 74 |ment a f|ull-feat|
|000020d0| 75 72 65 64 0a 77 6f 72 | 6c 64 2d 77 69 64 65 20 |ured.wor|ld-wide |
|000020e0| 77 65 62 20 62 72 6f 77 | 73 65 72 2e 0a 5c 65 6e |web brow|ser..\en|
|000020f0| 64 7b 66 75 6e 63 64 65 | 73 63 7d 0a 0a 0a 0a 5c |d{funcde|sc}....\|
|00002100| 73 75 62 73 65 63 74 69 | 6f 6e 7b 54 68 65 20 57 |subsecti|on{The W|
|00002110| 72 69 74 65 72 20 49 6e | 74 65 72 66 61 63 65 7d |riter In|terface}|
|00002120| 0a 0a 49 6e 74 65 72 66 | 61 63 65 73 20 74 6f 20 |..Interf|aces to |
|00002130| 63 72 65 61 74 65 20 77 | 72 69 74 65 72 73 20 61 |create w|riters a|
|00002140| 72 65 20 64 65 70 65 6e | 64 65 6e 74 20 6f 6e 20 |re depen|dent on |
|00002150| 74 68 65 20 73 70 65 63 | 69 66 69 63 20 77 72 69 |the spec|ific wri|
|00002160| 74 65 72 0a 63 6c 61 73 | 73 20 62 65 69 6e 67 20 |ter.clas|s being |
|00002170| 69 6e 73 74 61 6e 74 69 | 61 74 65 64 2e 20 20 54 |instanti|ated. T|
|00002180| 68 65 20 69 6e 74 65 72 | 66 61 63 65 73 20 64 65 |he inter|faces de|
|00002190| 73 63 72 69 62 65 64 20 | 62 65 6c 6f 77 20 61 72 |scribed |below ar|
|000021a0| 65 20 74 68 65 0a 72 65 | 71 75 69 72 65 64 20 69 |e the.re|quired i|
|000021b0| 6e 74 65 72 66 61 63 65 | 73 20 77 68 69 63 68 20 |nterface|s which |
|000021c0| 61 6c 6c 20 77 72 69 74 | 65 72 73 20 6d 75 73 74 |all writ|ers must|
|000021d0| 20 73 75 70 70 6f 72 74 | 20 6f 6e 63 65 20 69 6e | support| once in|
|000021e0| 69 74 69 61 6c 69 7a 65 | 64 2e 0a 4e 6f 74 65 20 |itialize|d..Note |
|000021f0| 74 68 61 74 20 77 68 69 | 6c 65 20 6d 6f 73 74 20 |that whi|le most |
|00002200| 61 70 70 6c 69 63 61 74 | 69 6f 6e 73 20 63 61 6e |applicat|ions can|
|00002210| 20 75 73 65 20 74 68 65 | 20 5c 63 6f 64 65 7b 41 | use the| \code{A|
|00002220| 62 73 74 72 61 63 74 46 | 6f 72 6d 61 74 74 65 72 |bstractF|ormatter|
|00002230| 7d 0a 63 6c 61 73 73 20 | 61 73 20 61 20 66 6f 72 |}.class |as a for|
|00002240| 6d 61 74 74 65 72 2c 20 | 74 68 65 20 77 72 69 74 |matter, |the writ|
|00002250| 65 72 20 6d 75 73 74 20 | 74 79 70 69 63 61 6c 6c |er must |typicall|
|00002260| 79 20 62 65 20 70 72 6f | 76 69 64 65 64 20 62 79 |y be pro|vided by|
|00002270| 20 74 68 65 0a 61 70 70 | 6c 69 63 61 74 69 6f 6e | the.app|lication|
|00002280| 2e 0a 0a 5c 72 65 6e 65 | 77 63 6f 6d 6d 61 6e 64 |...\rene|wcommand|
|00002290| 7b 5c 69 6e 64 65 78 73 | 75 62 69 74 65 6d 7d 7b |{\indexs|ubitem}{|
|000022a0| 28 77 72 69 74 65 72 20 | 6f 62 6a 65 63 74 20 6d |(writer |object m|
|000022b0| 65 74 68 6f 64 29 7d 0a | 0a 5c 62 65 67 69 6e 7b |ethod)}.|.\begin{|
|000022c0| 66 75 6e 63 64 65 73 63 | 7d 7b 6e 65 77 5f 61 6c |funcdesc|}{new_al|
|000022d0| 69 67 6e 6d 65 6e 74 7d | 7b 61 6c 69 67 6e 7d 0a |ignment}|{align}.|
|000022e0| 53 65 74 20 74 68 65 20 | 61 6c 69 67 6e 6d 65 6e |Set the |alignmen|
|000022f0| 74 20 73 74 79 6c 65 2e | 20 20 54 68 65 20 5c 63 |t style.| The \c|
|00002300| 6f 64 65 7b 61 6c 69 67 | 6e 7d 20 76 61 6c 75 65 |ode{alig|n} value|
|00002310| 20 63 61 6e 20 62 65 20 | 61 6e 79 20 6f 62 6a 65 | can be |any obje|
|00002320| 63 74 2c 0a 62 75 74 20 | 62 79 20 63 6f 6e 76 65 |ct,.but |by conve|
|00002330| 6e 74 69 6f 6e 20 69 73 | 20 61 20 73 74 72 69 6e |ntion is| a strin|
|00002340| 67 20 6f 72 20 5c 63 6f | 64 65 7b 4e 6f 6e 65 7d |g or \co|de{None}|
|00002350| 2c 20 77 68 65 72 65 20 | 5c 63 6f 64 65 7b 4e 6f |, where |\code{No|
|00002360| 6e 65 7d 0a 69 6e 64 69 | 63 61 74 65 73 20 74 68 |ne}.indi|cates th|
|00002370| 61 74 20 74 68 65 20 77 | 72 69 74 65 72 27 73 20 |at the w|riter's |
|00002380| 60 60 70 72 65 66 65 72 | 72 65 64 27 27 20 61 6c |``prefer|red'' al|
|00002390| 69 67 6e 6d 65 6e 74 20 | 73 68 6f 75 6c 64 20 62 |ignment |should b|
|000023a0| 65 20 75 73 65 64 2e 0a | 43 6f 6e 76 65 6e 74 69 |e used..|Conventi|
|000023b0| 6f 6e 61 6c 20 5c 63 6f | 64 65 7b 61 6c 69 67 6e |onal \co|de{align|
|000023c0| 7d 20 76 61 6c 75 65 73 | 20 61 72 65 20 5c 63 6f |} values| are \co|
|000023d0| 64 65 7b 27 6c 65 66 74 | 27 7d 2c 20 5c 63 6f 64 |de{'left|'}, \cod|
|000023e0| 65 7b 27 63 65 6e 74 65 | 72 27 7d 2c 0a 5c 63 6f |e{'cente|r'},.\co|
|000023f0| 64 65 7b 27 72 69 67 68 | 74 27 7d 2c 20 61 6e 64 |de{'righ|t'}, and|
|00002400| 20 5c 63 6f 64 65 7b 27 | 6a 75 73 74 69 66 79 27 | \code{'|justify'|
|00002410| 7d 2e 0a 5c 65 6e 64 7b | 66 75 6e 63 64 65 73 63 |}..\end{|funcdesc|
|00002420| 7d 0a 0a 5c 62 65 67 69 | 6e 7b 66 75 6e 63 64 65 |}..\begi|n{funcde|
|00002430| 73 63 7d 7b 6e 65 77 5f | 66 6f 6e 74 7d 7b 66 6f |sc}{new_|font}{fo|
|00002440| 6e 74 7d 0a 53 65 74 20 | 74 68 65 20 66 6f 6e 74 |nt}.Set |the font|
|00002450| 20 73 74 79 6c 65 2e 20 | 20 54 68 65 20 76 61 6c | style. | The val|
|00002460| 75 65 20 6f 66 20 5c 63 | 6f 64 65 7b 66 6f 6e 74 |ue of \c|ode{font|
|00002470| 7d 20 77 69 6c 6c 20 62 | 65 20 5c 63 6f 64 65 7b |} will b|e \code{|
|00002480| 4e 6f 6e 65 7d 2c 0a 69 | 6e 64 69 63 61 74 69 6e |None},.i|ndicatin|
|00002490| 67 20 74 68 61 74 20 74 | 68 65 20 64 65 76 69 63 |g that t|he devic|
|000024a0| 65 27 73 20 64 65 66 61 | 75 6c 74 20 66 6f 6e 74 |e's defa|ult font|
|000024b0| 20 73 68 6f 75 6c 64 20 | 62 65 20 75 73 65 64 2c | should |be used,|
|000024c0| 20 6f 72 20 61 20 74 75 | 70 6c 65 0a 6f 66 20 74 | or a tu|ple.of t|
|000024d0| 68 65 20 66 6f 72 6d 20 | 28 5c 76 61 72 7b 73 69 |he form |(\var{si|
|000024e0| 7a 65 7d 2c 20 5c 76 61 | 72 7b 69 74 61 6c 69 63 |ze}, \va|r{italic|
|000024f0| 7d 2c 20 5c 76 61 72 7b | 62 6f 6c 64 7d 2c 20 5c |}, \var{|bold}, \|
|00002500| 76 61 72 7b 74 65 6c 65 | 74 79 70 65 7d 29 2e 0a |var{tele|type})..|
|00002510| 53 69 7a 65 20 77 69 6c | 6c 20 62 65 20 61 20 73 |Size wil|l be a s|
|00002520| 74 72 69 6e 67 20 69 6e | 64 69 63 61 74 69 6e 67 |tring in|dicating|
|00002530| 20 74 68 65 20 73 69 7a | 65 20 6f 66 20 66 6f 6e | the siz|e of fon|
|00002540| 74 20 74 68 61 74 20 73 | 68 6f 75 6c 64 20 62 65 |t that s|hould be|
|00002550| 20 75 73 65 64 3b 0a 73 | 70 65 63 69 66 69 63 20 | used;.s|pecific |
|00002560| 73 74 72 69 6e 67 73 20 | 61 6e 64 20 74 68 65 69 |strings |and thei|
|00002570| 72 20 69 6e 74 65 72 70 | 72 65 74 61 74 69 6f 6e |r interp|retation|
|00002580| 20 6d 75 73 74 20 62 65 | 20 64 65 66 69 6e 65 64 | must be| defined|
|00002590| 20 62 79 20 74 68 65 0a | 61 70 70 6c 69 63 61 74 | by the.|applicat|
|000025a0| 69 6f 6e 2e 20 20 54 68 | 65 20 5c 76 61 72 7b 69 |ion. Th|e \var{i|
|000025b0| 74 61 6c 69 63 7d 2c 20 | 5c 76 61 72 7b 62 6f 6c |talic}, |\var{bol|
|000025c0| 64 7d 2c 20 61 6e 64 20 | 5c 76 61 72 7b 74 65 6c |d}, and |\var{tel|
|000025d0| 65 74 79 70 65 7d 20 76 | 61 6c 75 65 73 0a 61 72 |etype} v|alues.ar|
|000025e0| 65 20 62 6f 6f 6c 65 61 | 6e 20 69 6e 64 69 63 61 |e boolea|n indica|
|000025f0| 74 6f 72 73 20 73 70 65 | 63 69 66 79 69 6e 67 20 |tors spe|cifying |
|00002600| 77 68 69 63 68 20 6f 66 | 20 74 68 6f 73 65 20 66 |which of| those f|
|00002610| 6f 6e 74 20 61 74 74 72 | 69 62 75 74 65 73 0a 73 |ont attr|ibutes.s|
|00002620| 68 6f 75 6c 64 20 62 65 | 20 75 73 65 64 2e 0a 5c |hould be| used..\|
|00002630| 65 6e 64 7b 66 75 6e 63 | 64 65 73 63 7d 0a 0a 5c |end{func|desc}..\|
|00002640| 62 65 67 69 6e 7b 66 75 | 6e 63 64 65 73 63 7d 7b |begin{fu|ncdesc}{|
|00002650| 6e 65 77 5f 6d 61 72 67 | 69 6e 7d 7b 6d 61 72 67 |new_marg|in}{marg|
|00002660| 69 6e 2c 20 6c 65 76 65 | 6c 7d 0a 53 65 74 20 74 |in, leve|l}.Set t|
|00002670| 68 65 20 6d 61 72 67 69 | 6e 20 6c 65 76 65 6c 20 |he margi|n level |
|00002680| 74 6f 20 74 68 65 20 69 | 6e 74 65 67 65 72 20 5c |to the i|nteger \|
|00002690| 63 6f 64 65 7b 6c 65 76 | 65 6c 7d 20 61 6e 64 20 |code{lev|el} and |
|000026a0| 74 68 65 20 6c 6f 67 69 | 63 61 6c 20 74 61 67 0a |the logi|cal tag.|
|000026b0| 74 6f 20 5c 63 6f 64 65 | 7b 6d 61 72 67 69 6e 7d |to \code|{margin}|
|000026c0| 2e 20 20 49 6e 74 65 72 | 70 72 65 74 61 74 69 6f |. Inter|pretatio|
|000026d0| 6e 20 6f 66 20 74 68 65 | 20 6c 6f 67 69 63 61 6c |n of the| logical|
|000026e0| 20 74 61 67 20 69 73 20 | 61 74 20 74 68 65 0a 77 | tag is |at the.w|
|000026f0| 72 69 74 65 72 27 73 20 | 64 69 73 63 72 65 74 69 |riter's |discreti|
|00002700| 6f 6e 3b 20 74 68 65 20 | 6f 6e 6c 79 20 72 65 73 |on; the |only res|
|00002710| 74 72 69 63 74 69 6f 6e | 20 6f 6e 20 74 68 65 20 |triction| on the |
|00002720| 76 61 6c 75 65 20 6f 66 | 20 74 68 65 20 6c 6f 67 |value of| the log|
|00002730| 69 63 61 6c 0a 74 61 67 | 20 69 73 20 74 68 61 74 |ical.tag| is that|
|00002740| 20 69 74 20 6e 6f 74 20 | 62 65 20 61 20 66 61 6c | it not |be a fal|
|00002750| 73 65 20 76 61 6c 75 65 | 20 66 6f 72 20 6e 6f 6e |se value| for non|
|00002760| 2d 7a 65 72 6f 20 76 61 | 6c 75 65 73 20 6f 66 0a |-zero va|lues of.|
|00002770| 5c 63 6f 64 65 7b 6c 65 | 76 65 6c 7d 2e 0a 5c 65 |\code{le|vel}..\e|
|00002780| 6e 64 7b 66 75 6e 63 64 | 65 73 63 7d 0a 0a 5c 62 |nd{funcd|esc}..\b|
|00002790| 65 67 69 6e 7b 66 75 6e | 63 64 65 73 63 7d 7b 6e |egin{fun|cdesc}{n|
|000027a0| 65 77 5f 73 70 61 63 69 | 6e 67 7d 7b 73 70 61 63 |ew_spaci|ng}{spac|
|000027b0| 69 6e 67 7d 0a 53 65 74 | 20 74 68 65 20 73 70 61 |ing}.Set| the spa|
|000027c0| 63 69 6e 67 20 73 74 79 | 6c 65 20 74 6f 20 5c 63 |cing sty|le to \c|
|000027d0| 6f 64 65 7b 73 70 61 63 | 69 6e 67 7d 2e 0a 5c 65 |ode{spac|ing}..\e|
|000027e0| 6e 64 7b 66 75 6e 63 64 | 65 73 63 7d 0a 0a 5c 62 |nd{funcd|esc}..\b|
|000027f0| 65 67 69 6e 7b 66 75 6e | 63 64 65 73 63 7d 7b 6e |egin{fun|cdesc}{n|
|00002800| 65 77 5f 73 74 79 6c 65 | 73 7d 7b 73 74 79 6c 65 |ew_style|s}{style|
|00002810| 73 7d 0a 53 65 74 20 61 | 64 64 69 74 69 6f 6e 61 |s}.Set a|dditiona|
|00002820| 6c 20 73 74 79 6c 65 73 | 2e 20 20 54 68 65 20 5c |l styles|. The \|
|00002830| 63 6f 64 65 7b 73 74 79 | 6c 65 73 7d 20 76 61 6c |code{sty|les} val|
|00002840| 75 65 20 69 73 20 61 20 | 74 75 70 6c 65 20 6f 66 |ue is a |tuple of|
|00002850| 0a 61 72 62 69 74 72 61 | 72 79 20 76 61 6c 75 65 |.arbitra|ry value|
|00002860| 73 3b 20 74 68 65 20 76 | 61 6c 75 65 20 5c 63 6f |s; the v|alue \co|
|00002870| 64 65 7b 41 53 5f 49 53 | 7d 20 73 68 6f 75 6c 64 |de{AS_IS|} should|
|00002880| 20 62 65 20 69 67 6e 6f | 72 65 64 2e 20 20 54 68 | be igno|red. Th|
|00002890| 65 0a 5c 63 6f 64 65 7b | 73 74 79 6c 65 73 7d 20 |e.\code{|styles} |
|000028a0| 74 75 70 6c 65 20 6d 61 | 79 20 62 65 20 69 6e 74 |tuple ma|y be int|
|000028b0| 65 72 70 72 65 74 65 64 | 20 65 69 74 68 65 72 20 |erpreted| either |
|000028c0| 61 73 20 61 20 73 65 74 | 20 6f 72 20 61 73 20 61 |as a set| or as a|
|000028d0| 20 73 74 61 63 6b 0a 64 | 65 70 65 6e 64 69 6e 67 | stack.d|epending|
|000028e0| 20 6f 6e 20 74 68 65 20 | 72 65 71 75 69 72 65 6d | on the |requirem|
|000028f0| 65 6e 74 73 20 6f 66 20 | 74 68 65 20 61 70 70 6c |ents of |the appl|
|00002900| 69 63 61 74 69 6f 6e 20 | 61 6e 64 20 77 72 69 74 |ication |and writ|
|00002910| 65 72 0a 69 6d 70 6c 65 | 6d 65 6e 74 61 74 69 6f |er.imple|mentatio|
|00002920| 6e 2e 0a 5c 65 6e 64 7b | 66 75 6e 63 64 65 73 63 |n..\end{|funcdesc|
|00002930| 7d 0a 0a 5c 62 65 67 69 | 6e 7b 66 75 6e 63 64 65 |}..\begi|n{funcde|
|00002940| 73 63 7d 7b 73 65 6e 64 | 5f 6c 69 6e 65 5f 62 72 |sc}{send|_line_br|
|00002950| 65 61 6b 7d 7b 7d 0a 42 | 72 65 61 6b 20 74 68 65 |eak}{}.B|reak the|
|00002960| 20 63 75 72 72 65 6e 74 | 20 6c 69 6e 65 2e 0a 5c | current| line..\|
|00002970| 65 6e 64 7b 66 75 6e 63 | 64 65 73 63 7d 0a 0a 5c |end{func|desc}..\|
|00002980| 62 65 67 69 6e 7b 66 75 | 6e 63 64 65 73 63 7d 7b |begin{fu|ncdesc}{|
|00002990| 73 65 6e 64 5f 70 61 72 | 61 67 72 61 70 68 7d 7b |send_par|agraph}{|
|000029a0| 62 6c 61 6e 6b 6c 69 6e | 65 7d 0a 50 72 6f 64 75 |blanklin|e}.Produ|
|000029b0| 63 65 20 61 20 70 61 72 | 61 67 72 61 70 68 20 73 |ce a par|agraph s|
|000029c0| 65 70 61 72 61 74 69 6f | 6e 20 6f 66 20 61 74 20 |eparatio|n of at |
|000029d0| 6c 65 61 73 74 20 5c 63 | 6f 64 65 7b 62 6c 61 6e |least \c|ode{blan|
|000029e0| 6b 6c 69 6e 65 7d 20 62 | 6c 61 6e 6b 0a 6c 69 6e |kline} b|lank.lin|
|000029f0| 65 73 2c 20 6f 72 20 74 | 68 65 20 65 71 75 69 76 |es, or t|he equiv|
|00002a00| 65 6c 65 6e 74 2e 20 20 | 54 68 65 20 5c 63 6f 64 |elent. |The \cod|
|00002a10| 65 7b 62 6c 61 6e 6b 6c | 69 6e 65 7d 20 76 61 6c |e{blankl|ine} val|
|00002a20| 75 65 20 77 69 6c 6c 20 | 62 65 20 61 6e 0a 69 6e |ue will |be an.in|
|00002a30| 74 65 67 65 72 2e 0a 5c | 65 6e 64 7b 66 75 6e 63 |teger..\|end{func|
|00002a40| 64 65 73 63 7d 0a 0a 5c | 62 65 67 69 6e 7b 66 75 |desc}..\|begin{fu|
|00002a50| 6e 63 64 65 73 63 7d 7b | 73 65 6e 64 5f 68 6f 72 |ncdesc}{|send_hor|
|00002a60| 5f 72 75 6c 65 7d 7b 2a | 61 72 67 73 5c 2c 20 2a |_rule}{*|args\, *|
|00002a70| 2a 6b 77 7d 0a 44 69 73 | 70 6c 61 79 20 61 20 68 |*kw}.Dis|play a h|
|00002a80| 6f 72 69 7a 6f 6e 74 61 | 6c 20 72 75 6c 65 20 6f |orizonta|l rule o|
|00002a90| 6e 20 74 68 65 20 6f 75 | 74 70 75 74 20 64 65 76 |n the ou|tput dev|
|00002aa0| 69 63 65 2e 20 20 54 68 | 65 20 61 72 67 75 6d 65 |ice. Th|e argume|
|00002ab0| 6e 74 73 20 74 6f 20 74 | 68 69 73 0a 6d 65 74 68 |nts to t|his.meth|
|00002ac0| 6f 64 20 61 72 65 20 65 | 6e 74 69 72 65 6c 79 20 |od are e|ntirely |
|00002ad0| 61 70 70 6c 69 63 61 74 | 69 6f 6e 2d 20 61 6e 64 |applicat|ion- and|
|00002ae0| 20 77 72 69 74 65 72 2d | 73 70 65 63 69 66 69 63 | writer-|specific|
|00002af0| 2c 20 61 6e 64 20 73 68 | 6f 75 6c 64 20 62 65 0a |, and sh|ould be.|
|00002b00| 69 6e 74 65 72 70 72 65 | 74 65 64 20 77 69 74 68 |interpre|ted with|
|00002b10| 20 63 61 72 65 2e 20 20 | 54 68 65 20 6d 65 74 68 | care. |The meth|
|00002b20| 6f 64 20 69 6d 70 6c 65 | 6d 65 6e 74 61 74 69 6f |od imple|mentatio|
|00002b30| 6e 20 6d 61 79 20 61 73 | 73 75 6d 65 20 74 68 61 |n may as|sume tha|
|00002b40| 74 20 61 0a 6c 69 6e 65 | 20 62 72 65 61 6b 20 68 |t a.line| break h|
|00002b50| 61 73 20 61 6c 72 65 61 | 64 79 20 62 65 65 6e 20 |as alrea|dy been |
|00002b60| 69 73 73 75 65 64 20 76 | 69 61 20 5c 63 6f 64 65 |issued v|ia \code|
|00002b70| 7b 73 65 6e 64 5f 6c 69 | 6e 65 5f 62 72 65 61 6b |{send_li|ne_break|
|00002b80| 28 29 7d 2e 0a 5c 65 6e | 64 7b 66 75 6e 63 64 65 |()}..\en|d{funcde|
|00002b90| 73 63 7d 0a 0a 5c 62 65 | 67 69 6e 7b 66 75 6e 63 |sc}..\be|gin{func|
|00002ba0| 64 65 73 63 7d 7b 73 65 | 6e 64 5f 66 6c 6f 77 69 |desc}{se|nd_flowi|
|00002bb0| 6e 67 5f 64 61 74 61 7d | 7b 64 61 74 61 7d 0a 4f |ng_data}|{data}.O|
|00002bc0| 75 74 70 75 74 20 63 68 | 61 72 61 63 74 65 72 20 |utput ch|aracter |
|00002bd0| 64 61 74 61 20 77 68 69 | 63 68 20 6d 61 79 20 62 |data whi|ch may b|
|00002be0| 65 20 77 6f 72 64 2d 77 | 72 61 70 70 65 64 20 61 |e word-w|rapped a|
|00002bf0| 6e 64 20 72 65 2d 66 6c | 6f 77 65 64 20 61 73 0a |nd re-fl|owed as.|
|00002c00| 6e 65 65 64 65 64 2e 20 | 20 57 69 74 68 69 6e 20 |needed. | Within |
|00002c10| 61 6e 79 20 73 65 71 75 | 65 6e 63 65 20 6f 66 20 |any sequ|ence of |
|00002c20| 63 61 6c 6c 73 20 74 6f | 20 74 68 69 73 20 6d 65 |calls to| this me|
|00002c30| 74 68 6f 64 2c 20 74 68 | 65 20 77 72 69 74 65 72 |thod, th|e writer|
|00002c40| 20 6d 61 79 0a 61 73 73 | 75 6d 65 20 74 68 61 74 | may.ass|ume that|
|00002c50| 20 73 70 61 6e 73 20 6f | 66 20 6d 75 6c 74 69 70 | spans o|f multip|
|00002c60| 6c 65 20 77 68 69 74 65 | 73 70 61 63 65 20 63 68 |le white|space ch|
|00002c70| 61 72 61 63 74 65 72 73 | 20 68 61 76 65 20 62 65 |aracters| have be|
|00002c80| 65 6e 0a 63 6f 6c 6c 61 | 70 73 65 64 20 74 6f 20 |en.colla|psed to |
|00002c90| 73 69 6e 67 6c 65 20 73 | 70 61 63 65 20 63 68 61 |single s|pace cha|
|00002ca0| 72 61 63 74 65 72 73 2e | 0a 5c 65 6e 64 7b 66 75 |racters.|.\end{fu|
|00002cb0| 6e 63 64 65 73 63 7d 0a | 0a 5c 62 65 67 69 6e 7b |ncdesc}.|.\begin{|
|00002cc0| 66 75 6e 63 64 65 73 63 | 7d 7b 73 65 6e 64 5f 6c |funcdesc|}{send_l|
|00002cd0| 69 74 65 72 61 6c 5f 64 | 61 74 61 7d 7b 64 61 74 |iteral_d|ata}{dat|
|00002ce0| 61 7d 0a 4f 75 74 70 75 | 74 20 63 68 61 72 61 63 |a}.Outpu|t charac|
|00002cf0| 74 65 72 20 64 61 74 61 | 20 77 68 69 63 68 20 68 |ter data| which h|
|00002d00| 61 73 20 61 6c 72 65 61 | 64 79 20 62 65 65 6e 20 |as alrea|dy been |
|00002d10| 66 6f 72 6d 61 74 74 65 | 64 0a 66 6f 72 20 64 69 |formatte|d.for di|
|00002d20| 73 70 6c 61 79 2e 20 20 | 47 65 6e 65 72 61 6c 6c |splay. |Generall|
|00002d30| 79 2c 20 74 68 69 73 20 | 73 68 6f 75 6c 64 20 62 |y, this |should b|
|00002d40| 65 20 69 6e 74 65 72 70 | 72 65 74 65 64 20 74 6f |e interp|reted to|
|00002d50| 20 6d 65 61 6e 20 74 68 | 61 74 20 6c 69 6e 65 0a | mean th|at line.|
|00002d60| 62 72 65 61 6b 73 20 69 | 6e 64 69 63 61 74 65 64 |breaks i|ndicated|
|00002d70| 20 62 79 20 6e 65 77 6c | 69 6e 65 20 63 68 61 72 | by newl|ine char|
|00002d80| 61 63 74 65 72 73 20 73 | 68 6f 75 6c 64 20 62 65 |acters s|hould be|
|00002d90| 20 70 72 65 73 65 72 76 | 65 64 20 61 6e 64 20 6e | preserv|ed and n|
|00002da0| 6f 20 6e 65 77 0a 6c 69 | 6e 65 20 62 72 65 61 6b |o new.li|ne break|
|00002db0| 73 20 73 68 6f 75 6c 64 | 20 62 65 20 69 6e 74 72 |s should| be intr|
|00002dc0| 6f 64 75 63 65 64 2e 20 | 20 54 68 65 20 64 61 74 |oduced. | The dat|
|00002dd0| 61 20 6d 61 79 20 63 6f | 6e 74 61 69 6e 20 65 6d |a may co|ntain em|
|00002de0| 62 65 64 64 65 64 0a 6e | 65 77 6c 69 6e 65 20 61 |bedded.n|ewline a|
|00002df0| 6e 64 20 74 61 62 20 63 | 68 61 72 61 63 74 65 72 |nd tab c|haracter|
|00002e00| 73 2c 20 75 6e 6c 69 6b | 65 20 64 61 74 61 20 70 |s, unlik|e data p|
|00002e10| 72 6f 76 69 64 65 64 20 | 74 6f 20 74 68 65 0a 5c |rovided |to the.\|
|00002e20| 63 6f 64 65 7b 73 65 6e | 64 5f 66 6f 72 6d 61 74 |code{sen|d_format|
|00002e30| 74 65 64 5f 64 61 74 61 | 28 29 7d 20 69 6e 74 65 |ted_data|()} inte|
|00002e40| 72 66 61 63 65 2e 0a 5c | 65 6e 64 7b 66 75 6e 63 |rface..\|end{func|
|00002e50| 64 65 73 63 7d 0a 0a 5c | 62 65 67 69 6e 7b 66 75 |desc}..\|begin{fu|
|00002e60| 6e 63 64 65 73 63 7d 7b | 73 65 6e 64 5f 6c 61 62 |ncdesc}{|send_lab|
|00002e70| 65 6c 5f 64 61 74 61 7d | 7b 64 61 74 61 7d 0a 53 |el_data}|{data}.S|
|00002e80| 65 74 20 5c 63 6f 64 65 | 7b 64 61 74 61 7d 20 74 |et \code|{data} t|
|00002e90| 6f 20 74 68 65 20 6c 65 | 66 74 20 6f 66 20 74 68 |o the le|ft of th|
|00002ea0| 65 20 63 75 72 72 65 6e | 74 20 6c 65 66 74 20 6d |e curren|t left m|
|00002eb0| 61 72 67 69 6e 2c 20 69 | 66 20 70 6f 73 73 69 62 |argin, i|f possib|
|00002ec0| 6c 65 2e 0a 54 68 65 20 | 76 61 6c 75 65 20 6f 66 |le..The |value of|
|00002ed0| 20 5c 63 6f 64 65 7b 64 | 61 74 61 7d 20 69 73 20 | \code{d|ata} is |
|00002ee0| 6e 6f 74 20 72 65 73 74 | 72 69 63 74 65 64 3b 20 |not rest|ricted; |
|00002ef0| 74 72 65 61 74 6d 65 6e | 74 20 6f 66 20 6e 6f 6e |treatmen|t of non|
|00002f00| 2d 73 74 72 69 6e 67 0a | 76 61 6c 75 65 73 20 69 |-string.|values i|
|00002f10| 73 20 65 6e 74 69 72 65 | 6c 79 20 61 70 70 6c 69 |s entire|ly appli|
|00002f20| 63 61 74 69 6f 6e 2d 20 | 61 6e 64 20 77 72 69 74 |cation- |and writ|
|00002f30| 65 72 2d 64 65 70 65 6e | 64 65 6e 74 2e 20 20 54 |er-depen|dent. T|
|00002f40| 68 69 73 20 6d 65 74 68 | 6f 64 0a 77 69 6c 6c 20 |his meth|od.will |
|00002f50| 6f 6e 6c 79 20 62 65 20 | 63 61 6c 6c 65 64 20 61 |only be |called a|
|00002f60| 74 20 74 68 65 20 62 65 | 67 69 6e 6e 69 6e 67 20 |t the be|ginning |
|00002f70| 6f 66 20 61 20 6c 69 6e | 65 2e 0a 5c 65 6e 64 7b |of a lin|e..\end{|
|00002f80| 66 75 6e 63 64 65 73 63 | 7d 0a 0a 0a 5c 73 75 62 |funcdesc|}...\sub|
|00002f90| 73 65 63 74 69 6f 6e 7b | 57 72 69 74 65 72 20 49 |section{|Writer I|
|00002fa0| 6d 70 6c 65 6d 65 6e 74 | 61 74 69 6f 6e 73 7d 0a |mplement|ations}.|
|00002fb0| 0a 54 68 72 65 65 20 69 | 6d 70 6c 65 6d 65 6e 74 |.Three i|mplement|
|00002fc0| 61 74 69 6f 6e 73 20 6f | 66 20 74 68 65 20 77 72 |ations o|f the wr|
|00002fd0| 69 74 65 72 20 6f 62 6a | 65 63 74 20 69 6e 74 65 |iter obj|ect inte|
|00002fe0| 72 66 61 63 65 20 61 72 | 65 20 70 72 6f 76 69 64 |rface ar|e provid|
|00002ff0| 65 64 20 61 73 0a 65 78 | 61 6d 70 6c 65 73 20 62 |ed as.ex|amples b|
|00003000| 79 20 74 68 69 73 20 6d | 6f 64 75 6c 65 2e 20 20 |y this m|odule. |
|00003010| 4d 6f 73 74 20 61 70 70 | 6c 69 63 61 74 69 6f 6e |Most app|lication|
|00003020| 73 20 77 69 6c 6c 20 6e | 65 65 64 20 74 6f 20 64 |s will n|eed to d|
|00003030| 65 72 69 76 65 20 6e 65 | 77 0a 77 72 69 74 65 72 |erive ne|w.writer|
|00003040| 20 63 6c 61 73 73 65 73 | 20 66 72 6f 6d 20 74 68 | classes| from th|
|00003050| 65 20 5c 63 6f 64 65 7b | 4e 75 6c 6c 57 72 69 74 |e \code{|NullWrit|
|00003060| 65 72 7d 20 63 6c 61 73 | 73 2e 0a 0a 5c 72 65 6e |er} clas|s...\ren|
|00003070| 65 77 63 6f 6d 6d 61 6e | 64 7b 5c 69 6e 64 65 78 |ewcomman|d{\index|
|00003080| 73 75 62 69 74 65 6d 7d | 7b 28 69 6e 20 6d 6f 64 |subitem}|{(in mod|
|00003090| 75 6c 65 20 66 6f 72 6d | 61 74 74 65 72 29 7d 0a |ule form|atter)}.|
|000030a0| 0a 5c 62 65 67 69 6e 7b | 66 75 6e 63 64 65 73 63 |.\begin{|funcdesc|
|000030b0| 7d 7b 4e 75 6c 6c 57 72 | 69 74 65 72 7d 7b 7d 0a |}{NullWr|iter}{}.|
|000030c0| 41 20 77 72 69 74 65 72 | 20 77 68 69 63 68 20 6f |A writer| which o|
|000030d0| 6e 6c 79 20 70 72 6f 76 | 69 64 65 73 20 74 68 65 |nly prov|ides the|
|000030e0| 20 69 6e 74 65 72 66 61 | 63 65 20 64 65 66 69 6e | interfa|ce defin|
|000030f0| 69 74 69 6f 6e 3b 20 6e | 6f 20 61 63 74 69 6f 6e |ition; n|o action|
|00003100| 73 20 61 72 65 0a 74 61 | 6b 65 6e 20 6f 6e 20 61 |s are.ta|ken on a|
|00003110| 6e 79 20 6d 65 74 68 6f | 64 73 2e 20 20 54 68 69 |ny metho|ds. Thi|
|00003120| 73 20 73 68 6f 75 6c 64 | 20 62 65 20 74 68 65 20 |s should| be the |
|00003130| 62 61 73 65 20 63 6c 61 | 73 73 20 66 6f 72 20 61 |base cla|ss for a|
|00003140| 6c 6c 20 77 72 69 74 65 | 72 73 0a 77 68 69 63 68 |ll write|rs.which|
|00003150| 20 64 6f 20 6e 6f 74 20 | 6e 65 65 64 20 74 6f 20 | do not |need to |
|00003160| 69 6e 68 65 72 69 74 20 | 61 6e 79 20 69 6d 70 6c |inherit |any impl|
|00003170| 65 6d 65 6e 74 61 74 69 | 6f 6e 20 6d 65 74 68 6f |ementati|on metho|
|00003180| 64 73 2e 0a 5c 65 6e 64 | 7b 66 75 6e 63 64 65 73 |ds..\end|{funcdes|
|00003190| 63 7d 0a 0a 5c 62 65 67 | 69 6e 7b 66 75 6e 63 64 |c}..\beg|in{funcd|
|000031a0| 65 73 63 7d 7b 41 62 73 | 74 72 61 63 74 57 72 69 |esc}{Abs|tractWri|
|000031b0| 74 65 72 7d 7b 7d 0a 41 | 20 77 72 69 74 65 72 20 |ter}{}.A| writer |
|000031c0| 77 68 69 63 68 20 63 61 | 6e 20 62 65 20 75 73 65 |which ca|n be use|
|000031d0| 64 20 69 6e 20 64 65 62 | 75 67 67 69 6e 67 20 66 |d in deb|ugging f|
|000031e0| 6f 72 6d 61 74 74 65 72 | 73 2c 20 62 75 74 20 6e |ormatter|s, but n|
|000031f0| 6f 74 20 6d 75 63 68 0a | 65 6c 73 65 2e 20 20 45 |ot much.|else. E|
|00003200| 61 63 68 20 6d 65 74 68 | 6f 64 20 73 69 6d 70 6c |ach meth|od simpl|
|00003210| 79 20 61 63 63 6f 75 6e | 63 65 73 20 69 74 73 65 |y accoun|ces itse|
|00003220| 6c 66 20 62 79 20 70 72 | 69 6e 74 69 6e 67 20 69 |lf by pr|inting i|
|00003230| 74 73 20 6e 61 6d 65 20 | 61 6e 64 0a 61 72 67 75 |ts name |and.argu|
|00003240| 6d 65 6e 74 73 20 6f 6e | 20 73 74 61 6e 64 61 72 |ments on| standar|
|00003250| 64 20 6f 75 74 70 75 74 | 2e 0a 5c 65 6e 64 7b 66 |d output|..\end{f|
|00003260| 75 6e 63 64 65 73 63 7d | 0a 0a 5c 62 65 67 69 6e |uncdesc}|..\begin|
|00003270| 7b 66 75 6e 63 64 65 73 | 63 7d 7b 44 75 6d 62 57 |{funcdes|c}{DumbW|
|00003280| 72 69 74 65 72 7d 7b 5c | 6f 70 74 69 6f 6e 61 6c |riter}{\|optional|
|00003290| 7b 66 69 6c 65 5c 63 6f | 64 65 7b 20 3d 20 4e 6f |{file\co|de{ = No|
|000032a0| 6e 65 7d 5c 6f 70 74 69 | 6f 6e 61 6c 7b 5c 2c 20 |ne}\opti|onal{\, |
|000032b0| 6d 61 78 63 6f 6c 5c 63 | 6f 64 65 7b 20 3d 20 37 |maxcol\c|ode{ = 7|
|000032c0| 32 7d 7d 7d 7d 0a 53 69 | 6d 70 6c 65 20 77 72 69 |2}}}}.Si|mple wri|
|000032d0| 74 65 72 20 63 6c 61 73 | 73 20 77 68 69 63 68 20 |ter clas|s which |
|000032e0| 77 72 69 74 65 73 20 6f | 75 74 70 75 74 20 6f 6e |writes o|utput on|
|000032f0| 20 74 68 65 20 66 69 6c | 65 20 6f 62 6a 65 63 74 | the fil|e object|
|00003300| 20 70 61 73 73 65 64 20 | 69 6e 0a 61 73 20 5c 63 | passed |in.as \c|
|00003310| 6f 64 65 7b 66 69 6c 65 | 7d 20 6f 72 2c 20 69 66 |ode{file|} or, if|
|00003320| 20 5c 63 6f 64 65 7b 66 | 69 6c 65 7d 20 69 73 20 | \code{f|ile} is |
|00003330| 6f 6d 69 74 74 65 64 2c | 20 6f 6e 20 73 74 61 6e |omitted,| on stan|
|00003340| 64 61 72 64 20 6f 75 74 | 70 75 74 2e 20 20 54 68 |dard out|put. Th|
|00003350| 65 0a 6f 75 74 70 75 74 | 20 69 73 20 73 69 6d 70 |e.output| is simp|
|00003360| 6c 79 20 77 6f 72 64 2d | 77 72 61 70 70 65 64 20 |ly word-|wrapped |
|00003370| 74 6f 20 74 68 65 20 6e | 75 6d 62 65 72 20 6f 66 |to the n|umber of|
|00003380| 20 63 6f 6c 75 6d 6e 73 | 20 73 70 65 63 69 66 69 | columns| specifi|
|00003390| 65 64 20 62 79 0a 5c 63 | 6f 64 65 7b 6d 61 78 63 |ed by.\c|ode{maxc|
|000033a0| 6f 6c 7d 2e 20 20 54 68 | 69 73 20 63 6c 61 73 73 |ol}. Th|is class|
|000033b0| 20 69 73 20 73 75 69 74 | 61 62 6c 65 20 66 6f 72 | is suit|able for|
|000033c0| 20 72 65 66 6c 6f 77 69 | 6e 67 20 61 20 73 65 71 | reflowi|ng a seq|
|000033d0| 75 65 6e 63 65 20 6f 66 | 0a 70 61 72 61 67 72 61 |uence of|.paragra|
|000033e0| 70 68 73 2e 0a 5c 65 6e | 64 7b 66 75 6e 63 64 65 |phs..\en|d{funcde|
|000033f0| 73 63 7d 0a | |sc}. | |
+--------+-------------------------+-------------------------+--------+--------+