Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / sam-t2 / devtools / v9 / man / man3 / Pod::LaTeX.3
CommitLineData
920dae64
AT
1.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
2.\"
3.\" Standard preamble:
4.\" ========================================================================
5.de Sh \" Subsection heading
6.br
7.if t .Sp
8.ne 5
9.PP
10\fB\\$1\fR
11.PP
12..
13.de Sp \" Vertical space (when we can't use .PP)
14.if t .sp .5v
15.if n .sp
16..
17.de Vb \" Begin verbatim text
18.ft CW
19.nf
20.ne \\$1
21..
22.de Ve \" End verbatim text
23.ft R
24.fi
25..
26.\" Set up some character translations and predefined strings. \*(-- will
27.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
28.\" double quote, and \*(R" will give a right double quote. | will give a
29.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to
30.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C'
31.\" expand to `' in nroff, nothing in troff, for use with C<>.
32.tr \(*W-|\(bv\*(Tr
33.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
34.ie n \{\
35. ds -- \(*W-
36. ds PI pi
37. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
38. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
39. ds L" ""
40. ds R" ""
41. ds C` ""
42. ds C' ""
43'br\}
44.el\{\
45. ds -- \|\(em\|
46. ds PI \(*p
47. ds L" ``
48. ds R" ''
49'br\}
50.\"
51.\" If the F register is turned on, we'll generate index entries on stderr for
52.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
53.\" entries marked with X<> in POD. Of course, you'll have to process the
54.\" output yourself in some meaningful fashion.
55.if \nF \{\
56. de IX
57. tm Index:\\$1\t\\n%\t"\\$2"
58..
59. nr % 0
60. rr F
61.\}
62.\"
63.\" For nroff, turn off justification. Always turn off hyphenation; it makes
64.\" way too many mistakes in technical documents.
65.hy 0
66.if n .na
67.\"
68.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
69.\" Fear. Run. Save yourself. No user-serviceable parts.
70. \" fudge factors for nroff and troff
71.if n \{\
72. ds #H 0
73. ds #V .8m
74. ds #F .3m
75. ds #[ \f1
76. ds #] \fP
77.\}
78.if t \{\
79. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
80. ds #V .6m
81. ds #F 0
82. ds #[ \&
83. ds #] \&
84.\}
85. \" simple accents for nroff and troff
86.if n \{\
87. ds ' \&
88. ds ` \&
89. ds ^ \&
90. ds , \&
91. ds ~ ~
92. ds /
93.\}
94.if t \{\
95. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
96. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
97. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
98. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
99. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
100. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
101.\}
102. \" troff and (daisy-wheel) nroff accents
103.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
104.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
105.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
106.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
107.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
108.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
109.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
110.ds ae a\h'-(\w'a'u*4/10)'e
111.ds Ae A\h'-(\w'A'u*4/10)'E
112. \" corrections for vroff
113.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
114.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
115. \" for low resolution devices (crt and lpr)
116.if \n(.H>23 .if \n(.V>19 \
117\{\
118. ds : e
119. ds 8 ss
120. ds o a
121. ds d- d\h'-1'\(ga
122. ds D- D\h'-1'\(hy
123. ds th \o'bp'
124. ds Th \o'LP'
125. ds ae ae
126. ds Ae AE
127.\}
128.rm #[ #] #H #V #F C
129.\" ========================================================================
130.\"
131.IX Title "Pod::LaTeX 3"
132.TH Pod::LaTeX 3 "2001-09-21" "perl v5.8.8" "Perl Programmers Reference Guide"
133.SH "NAME"
134Pod::LaTeX \- Convert Pod data to formatted Latex
135.SH "SYNOPSIS"
136.IX Header "SYNOPSIS"
137.Vb 2
138\& use Pod::LaTeX;
139\& my $parser = Pod::LaTeX->new ( );
140.Ve
141.PP
142.Vb 1
143\& $parser->parse_from_filehandle;
144.Ve
145.PP
146.Vb 1
147\& $parser->parse_from_file ('file.pod', 'file.tex');
148.Ve
149.SH "DESCRIPTION"
150.IX Header "DESCRIPTION"
151\&\f(CW\*(C`Pod::LaTeX\*(C'\fR is a module to convert documentation in the Pod format
152into Latex. The \fBpod2latex\fR command uses
153this module for translation.
154.IX Xref "pod2latex"
155.PP
156\&\f(CW\*(C`Pod::LaTeX\*(C'\fR is a derived class from Pod::Select.
157.SH "OBJECT METHODS"
158.IX Header "OBJECT METHODS"
159The following methods are provided in this module. Methods inherited
160from \f(CW\*(C`Pod::Select\*(C'\fR are not described in the public interface.
161.Sh "Data Accessors"
162.IX Subsection "Data Accessors"
163The following methods are provided for accessing instance data. These
164methods should be used for accessing configuration parameters rather
165than assuming the object is a hash.
166.PP
167Default values can be supplied by using these names as keys to a hash
168of arguments when using the \f(CW\*(C`new()\*(C'\fR constructor.
169.IP "\fBAddPreamble\fR" 4
170.IX Item "AddPreamble"
171Logical to control whether a \f(CW\*(C`latex\*(C'\fR preamble is to be written.
172If true, a valid \f(CW\*(C`latex\*(C'\fR preamble is written before the pod data is written.
173This is similar to:
174.Sp
175.Vb 4
176\& \edocumentclass{article}
177\& \eusepackage[T1]{fontenc}
178\& \eusepackage{textcomp}
179\& \ebegin{document}
180.Ve
181.Sp
182but will be more complicated if table of contents and indexing are required.
183Can be used to set or retrieve the current value.
184.Sp
185.Vb 2
186\& $add = $parser->AddPreamble();
187\& $parser->AddPreamble(1);
188.Ve
189.Sp
190If used in conjunction with \f(CW\*(C`AddPostamble\*(C'\fR a full latex document will
191be written that could be immediately processed by \f(CW\*(C`latex\*(C'\fR.
192.Sp
193For some pod escapes it may be necessary to include the amsmath
194package. This is not yet added to the preamble automaatically.
195.IP "\fBAddPostamble\fR" 4
196.IX Item "AddPostamble"
197Logical to control whether a standard \f(CW\*(C`latex\*(C'\fR ending is written to the output
198file after the document has been processed.
199In its simplest form this is simply:
200.Sp
201.Vb 1
202\& \eend{document}
203.Ve
204.Sp
205but can be more complicated if a index is required.
206Can be used to set or retrieve the current value.
207.Sp
208.Vb 2
209\& $add = $parser->AddPostamble();
210\& $parser->AddPostamble(1);
211.Ve
212.Sp
213If used in conjunction with \f(CW\*(C`AddPreaamble\*(C'\fR a full latex document will
214be written that could be immediately processed by \f(CW\*(C`latex\*(C'\fR.
215.IP "\fBHead1Level\fR" 4
216.IX Item "Head1Level"
217The \f(CW\*(C`latex\*(C'\fR sectioning level that should be used to correspond to
218a pod \f(CW\*(C`=head1\*(C'\fR directive. This can be used, for example, to turn
219a \f(CW\*(C`=head1\*(C'\fR into a \f(CW\*(C`latex\*(C'\fR \f(CW\*(C`subsection\*(C'\fR. This should hold a number
220corresponding to the required position in an array containing the
221following elements:
222.Sp
223.Vb 6
224\& [0] chapter
225\& [1] section
226\& [2] subsection
227\& [3] subsubsection
228\& [4] paragraph
229\& [5] subparagraph
230.Ve
231.Sp
232Can be used to set or retrieve the current value:
233.Sp
234.Vb 2
235\& $parser->Head1Level(2);
236\& $sect = $parser->Head1Level;
237.Ve
238.Sp
239Setting this number too high can result in sections that may not be reproducible
240in the expected way. For example, setting this to 4 would imply that \f(CW\*(C`=head3\*(C'\fR
241do not have a corresponding \f(CW\*(C`latex\*(C'\fR section (\f(CW\*(C`=head1\*(C'\fR would correspond to
242a \f(CW\*(C`paragraph\*(C'\fR).
243.Sp
244A check is made to ensure that the supplied value is an integer in the
245range 0 to 5.
246.Sp
247Default is for a value of 1 (i.e. a \f(CW\*(C`section\*(C'\fR).
248.IP "\fBLabel\fR" 4
249.IX Item "Label"
250This is the label that is prefixed to all \f(CW\*(C`latex\*(C'\fR label and index
251entries to make them unique. In general, pods have similarly titled
252sections (\s-1NAME\s0, \s-1DESCRIPTION\s0 etc) and a \f(CW\*(C`latex\*(C'\fR label will be multiply
253defined if more than one pod document is to be included in a single
254\&\f(CW\*(C`latex\*(C'\fR file. To overcome this, this label is prefixed to a label
255whenever a label is required (joined with an underscore) or to an
256index entry (joined by an exclamation mark which is the normal index
257separator). For example, \f(CW\*(C`\elabel{text}\*(C'\fR becomes \f(CW\*(C`\elabel{Label_text}\*(C'\fR.
258.Sp
259Can be used to set or retrieve the current value:
260.Sp
261.Vb 2
262\& $label = $parser->Label;
263\& $parser->Label($label);
264.Ve
265.Sp
266This label is only used if \f(CW\*(C`UniqueLabels\*(C'\fR is true.
267Its value is set automatically from the \f(CW\*(C`NAME\*(C'\fR field
268if \f(CW\*(C`ReplaceNAMEwithSection\*(C'\fR is true. If this is not the case
269it must be set manually before starting the parse.
270.Sp
271Default value is \f(CW\*(C`undef\*(C'\fR.
272.IP "\fBLevelNoNum\fR" 4
273.IX Item "LevelNoNum"
274Control the point at which \f(CW\*(C`latex\*(C'\fR section numbering is turned off.
275For example, this can be used to make sure that \f(CW\*(C`latex\*(C'\fR sections
276are numbered but subsections are not.
277.Sp
278Can be used to set or retrieve the current value:
279.Sp
280.Vb 2
281\& $lev = $parser->LevelNoNum;
282\& $parser->LevelNoNum(2);
283.Ve
284.Sp
285The argument must be an integer between 0 and 5 and is the same as the
286number described in \f(CW\*(C`Head1Level\*(C'\fR method description. The number has
287nothing to do with the pod heading number, only the \f(CW\*(C`latex\*(C'\fR sectioning.
288.Sp
289Default is 2. (i.e. \f(CW\*(C`latex\*(C'\fR subsections are written as \f(CW\*(C`subsection*\*(C'\fR
290but sections are numbered).
291.IP "\fBMakeIndex\fR" 4
292.IX Item "MakeIndex"
293Controls whether \f(CW\*(C`latex\*(C'\fR commands for creating an index are to be inserted
294into the preamble and postamble
295.Sp
296.Vb 2
297\& $makeindex = $parser->MakeIndex;
298\& $parser->MakeIndex(0);
299.Ve
300.Sp
301Irrelevant if both \f(CW\*(C`AddPreamble\*(C'\fR and \f(CW\*(C`AddPostamble\*(C'\fR are false (or equivalently,
302\&\f(CW\*(C`UserPreamble\*(C'\fR and \f(CW\*(C`UserPostamble\*(C'\fR are set).
303.Sp
304Default is for an index to be created.
305.IP "\fBReplaceNAMEwithSection\fR" 4
306.IX Item "ReplaceNAMEwithSection"
307This controls whether the \f(CW\*(C`NAME\*(C'\fR section in the pod is to be translated
308literally or converted to a slightly modified output where the section
309name is the pod name rather than \*(L"\s-1NAME\s0\*(R".
310.Sp
311If true, the pod segment
312.Sp
313.Vb 1
314\& =head1 NAME
315.Ve
316.Sp
317.Vb 1
318\& pod::name - purpose
319.Ve
320.Sp
321.Vb 1
322\& =head1 SYNOPSIS
323.Ve
324.Sp
325is converted to the \f(CW\*(C`latex\*(C'\fR
326.Sp
327.Vb 1
328\& \esection{pod::name\elabel{pod_name}\eindex{pod::name}}
329.Ve
330.Sp
331.Vb 1
332\& Purpose
333.Ve
334.Sp
335.Vb 2
336\& \esubsection*{SYNOPSIS\elabel{pod_name_SYNOPSIS}%
337\& \eindex{pod::name!SYNOPSIS}}
338.Ve
339.Sp
340(dependent on the value of \f(CW\*(C`Head1Level\*(C'\fR and \f(CW\*(C`LevelNoNum\*(C'\fR). Note that
341subsequent \f(CW\*(C`head1\*(C'\fR directives translate to subsections rather than
342sections and that the labels and index now include the pod name (dependent
343on the value of \f(CW\*(C`UniqueLabels\*(C'\fR).
344.Sp
345The \f(CW\*(C`Label\*(C'\fR is set from the pod name regardless of any current value
346of \f(CW\*(C`Label\*(C'\fR.
347.Sp
348.Vb 2
349\& $mod = $parser->ReplaceNAMEwithSection;
350\& $parser->ReplaceNAMEwithSection(0);
351.Ve
352.Sp
353Default is to translate the pod literally.
354.IP "\fBStartWithNewPage\fR" 4
355.IX Item "StartWithNewPage"
356If true, each pod translation will begin with a \f(CW\*(C`latex\*(C'\fR
357\&\f(CW\*(C`\eclearpage\*(C'\fR.
358.Sp
359.Vb 2
360\& $parser->StartWithNewPage(1);
361\& $newpage = $parser->StartWithNewPage;
362.Ve
363.Sp
364Default is false.
365.IP "\fBTableOfContents\fR" 4
366.IX Item "TableOfContents"
367If true, a table of contents will be created.
368Irrelevant if \f(CW\*(C`AddPreamble\*(C'\fR is false or \f(CW\*(C`UserPreamble\*(C'\fR
369is set.
370.Sp
371.Vb 2
372\& $toc = $parser->TableOfContents;
373\& $parser->TableOfContents(1);
374.Ve
375.Sp
376Default is false.
377.IP "\fBUniqueLabels\fR" 4
378.IX Item "UniqueLabels"
379If true, the translator will attempt to make sure that
380each \f(CW\*(C`latex\*(C'\fR label or index entry will be uniquely identified
381by prefixing the contents of \f(CW\*(C`Label\*(C'\fR. This allows
382multiple documents to be combined without clashing
383common labels such as \f(CW\*(C`DESCRIPTION\*(C'\fR and \f(CW\*(C`SYNOPSIS\*(C'\fR
384.Sp
385.Vb 2
386\& $parser->UniqueLabels(1);
387\& $unq = $parser->UniqueLabels;
388.Ve
389.Sp
390Default is true.
391.IP "\fBUserPreamble\fR" 4
392.IX Item "UserPreamble"
393User supplied \f(CW\*(C`latex\*(C'\fR preamble. Added before the pod translation
394data.
395.Sp
396If set, the contents will be prepended to the output file before the translated
397data regardless of the value of \f(CW\*(C`AddPreamble\*(C'\fR.
398\&\f(CW\*(C`MakeIndex\*(C'\fR and \f(CW\*(C`TableOfContents\*(C'\fR will also be ignored.
399.IP "\fBUserPostamble\fR" 4
400.IX Item "UserPostamble"
401User supplied \f(CW\*(C`latex\*(C'\fR postamble. Added after the pod translation
402data.
403.Sp
404If set, the contents will be prepended to the output file after the translated
405data regardless of the value of \f(CW\*(C`AddPostamble\*(C'\fR.
406\&\f(CW\*(C`MakeIndex\*(C'\fR will also be ignored.
407.SH "NOTES"
408.IX Header "NOTES"
409Compatible with \f(CW\*(C`latex2e\*(C'\fR only. Can not be used with \f(CW\*(C`latex\*(C'\fR v2.09
410or earlier.
411.PP
412A subclass of \f(CW\*(C`Pod::Select\*(C'\fR so that specific pod sections can be
413converted to \f(CW\*(C`latex\*(C'\fR by using the \f(CW\*(C`select\*(C'\fR method.
414.PP
415Some \s-1HTML\s0 escapes are missing and many have not been tested.
416.SH "SEE ALSO"
417.IX Header "SEE ALSO"
418Pod::Parser, Pod::Select, pod2latex
419.SH "AUTHORS"
420.IX Header "AUTHORS"
421Tim Jenness <tjenness@cpan.org>
422.PP
423Bug fixes and improvements have been received from: Simon Cozens
424<simon@cozens.net>, Mark A. Hershberger
425<mah@everybody.org>, Marcel Grunauer
426<marcel@codewerk.com>, Hugh S Myers
427<hsmyers@sdragons.com>, Peter J Acklam
428<jacklam@math.uio.no>, Sudhi Herle <sudhi@herle.net>,
429Ariel Scolnicov <ariels@compugen.co.il>,
430Adriano Rodrigues Ferreira <ferreira@triang.com.br> and
431R. de Vries <r.de.vries@dutchspace.nl>.
432.SH "COPYRIGHT"
433.IX Header "COPYRIGHT"
434Copyright (C) 2000\-2004 Tim Jenness. All Rights Reserved.
435.PP
436This program is free software; you can redistribute it and/or modify
437it under the same terms as Perl itself.