Upgrade to Pod::LaTeX 0.57
[p5sagit/p5-mst-13.2.git] / lib / Pod / t / basic.man
1 .SH "NAME"
2 basic.pod \- Test of various basic POD features in translators.
3 .SH "HEADINGS"
4 .IX Header "HEADINGS"
5 Try a few different levels of headings, with embedded formatting codes and
6 other interesting bits.
7 .ie n .SH "This ""is"" a ""level 1"" heading"
8 .el .SH "This \f(CWis\fP a ``level 1'' heading"
9 .IX Header "This is a level 1 heading"
10 .Sh "``Level'' ""2 \fIheading\fP"
11 .IX Subsection "``Level'' ""2 heading"
12 \fILevel 3 \f(BIheading \f(BIwith \f(CB\*(C`weird \f(CBstuff "" (double quote)\f(CB\*(C'\f(BI\f(BI\fI\fR
13 .IX Subsection "Level 3 heading with weird stuff """" (double quote)"
14 .PP
15 Level "4 \f(CW\*(C`heading\*(C'\fR
16 .IX Subsection "Level ""4 heading"
17 .PP
18 Now try again with \fBintermixed\fR \fItext\fR.
19 .ie n .SH "This ""is"" a ""level 1"" heading"
20 .el .SH "This \f(CWis\fP a ``level 1'' heading"
21 .IX Header "This is a level 1 heading"
22 Text.
23 .Sh "``Level'' 2 \fIheading\fP"
24 .IX Subsection "``Level'' 2 heading"
25 Text.
26 .PP
27 \fILevel 3 \f(BIheading \f(BIwith \f(CB\*(C`weird \f(CBstuff\f(CB\*(C'\f(BI\f(BI\fI\fR
28 .IX Subsection "Level 3 heading with weird stuff"
29 .PP
30 Text.
31 .PP
32 Level "4 \f(CW\*(C`heading\*(C'\fR
33 .IX Subsection "Level ""4 heading"
34 .PP
35 Text.
36 .SH "LINKS"
37 .IX Header "LINKS"
38 These are all taken from the Pod::Parser tests.
39 .PP
40 Try out \fI\s-1LOTS\s0\fR of different ways of specifying references:
41 .PP
42 Reference the \*(L"section\*(R" in manpage
43 .PP
44 Reference the \*(L"section\*(R" in manpage
45 .PP
46 Reference the \*(L"section\*(R" in manpage
47 .PP
48 Reference the \*(L"section\*(R" in manpage
49 .PP
50 Reference the \*(L"manpage/section\*(R"
51 .PP
52 Reference the \*(L"section\*(R" in \*(L"manpage\*(R"
53 .PP
54 Reference the \*(L"section\*(R" in manpage
55 .PP
56 Reference the \*(L"section\*(R" in manpage
57 .PP
58 Reference the \*(L"section\*(R" in manpage
59 .PP
60 Now try it using the new \*(L"|\*(R" stuff ...
61 .PP
62 Reference the thistext|
63 .PP
64 Reference the thistext |
65 .PP
66 Reference the thistext|
67 .PP
68 Reference the thistext |
69 .PP
70 Reference the thistext|
71 .PP
72 Reference the thistext |
73 .PP
74 Reference the thistext|
75 .PP
76 Reference the thistext|
77 .PP
78 Reference the thistext |
79 .PP
80 And then throw in a few new ones of my own.
81 .PP
82 foo
83 .PP
84 foo
85 .PP
86 \&\*(L"bar\*(R" in foo
87 .PP
88 \&\*(L"baz boo\*(R" in foo
89 .PP
90 \&\*(L"bar\*(R"
91 .PP
92 \&\*(L"baz boo\*(R"
93 .PP
94 \&\*(L"baz boo\*(R"
95 .PP
96 \&\*(L"baz boo\*(R" in foo bar
97 .PP
98 \&\*(L"baz boo\*(R" in foo bar
99 .PP
100 \&\*(L"boo\*(R" in foo bar baz
101 .PP
102 \&\*(L"boo var baz\*(R"
103 .PP
104 \&\*(L"bar baz\*(R"
105 .PP
106 \&\*(L"boo bar baz / baz boo\*(R"
107 .PP
108 \&\*(L"boo\*(R", \*(L"bar\*(R", and \*(L"baz\*(R"
109 .PP
110 foo\&bar
111 .PP
112 Testing \fIitalics\fR
113 .PP
114 "\fIItalic\fR text" in foo
115 .PP
116 "Section \f(CW\*(C`with\*(C'\fR \fI\f(BIother\fI markup\fR" in foo|bar\&
117 .PP
118 Nested <http://www.perl.org/>
119 .SH "OVER AND ITEMS"
120 .IX Header "OVER AND ITEMS"
121 Taken from Pod::Parser tests, this is a test to ensure that multiline
122 =item paragraphs get indented appropriately.
123 .IP "This is a test." 4
124 .IX Item "This is a test."
125 .PP
126 There should be whitespace now before this line.
127 .PP
128 Taken from Pod::Parser tests, this is a test to ensure the nested =item
129 paragraphs get indented appropriately.
130 .IP "1" 2
131 .IX Item "1"
132 First section.
133 .RS 2
134 .IP "a" 2
135 .IX Item "a"
136 this is item a
137 .IP "b" 2
138 .IX Item "b"
139 this is item b
140 .RE
141 .RS 2
142 .RE
143 .IP "2" 2
144 .IX Item "2"
145 Second section.
146 .RS 2
147 .IP "a" 2
148 .IX Item "a"
149 this is item a
150 .IP "b" 2
151 .IX Item "b"
152 this is item b
153 .IP "c" 2
154 .IX Item "c"
155 .PD 0
156 .IP "d" 2
157 .IX Item "d"
158 .PD
159 This is item c & d.
160 .RE
161 .RS 2
162 .RE
163 .PP
164 Now some additional weirdness of our own.  Make sure that multiple tags
165 for one paragraph are properly compacted.
166 .ie n .IP """foo""" 4
167 .el .IP "``foo''" 4
168 .IX Item "foo"
169 .PD 0
170 .IP "\fBbar\fR" 4
171 .IX Item "bar"
172 .ie n .IP """baz""" 4
173 .el .IP "\f(CWbaz\fR" 4
174 .IX Item "baz"
175 .PD
176 There shouldn't be any spaces between any of these item tags; this idiom
177 is used in perlfunc.
178 .IP "Some longer item text" 4
179 .IX Item "Some longer item text"
180 Just to make sure that we test paragraphs where the item text doesn't fit
181 in the margin of the paragraph (and make sure that this paragraph fills a
182 few lines).
183 .Sp
184 Let's also make it multiple paragraphs to be sure that works.
185 .PP
186 Test use of =over without =item as a block \*(L"quote\*(R" or block paragraph.
187 .Sp
188 .RS 4
189 This should be indented four spaces but otherwise formatted the same as
190 any other regular text paragraph.  Make sure it's long enough to see the
191 results of the formatting.....
192 .RE
193 .PP
194 Now try the same thing nested, and make sure that the indentation is reset
195 back properly.
196 .RS 4
197 .Sp
198 .RS 4
199 This paragraph should be doubly indented.
200 .RE
201 .RE
202 .RS 4
203 .Sp
204 This paragraph should only be singly indented.
205 .IP "\(bu" 4
206 This is an item in the middle of a block\-quote, which should be allowed.
207 .IP "\(bu" 4
208 We're also testing tagless item commands.
209 .RE
210 .RS 4
211 .Sp
212 Should be back to the single level of indentation.
213 .RE
214 .PP
215 Should be back to regular indentation.
216 .PP
217 Now also check the transformation of * into real bullets for man pages.
218 .IP "\(bu" 4
219 An item.  We're also testing using =over without a number, and making sure
220 that item text wraps properly.
221 .IP "\(bu" 4
222 Another item.
223 .PP
224 and now test the numbering of item blocks.
225 .IP "1." 4
226 First item.
227 .IP "2." 4
228 Second item.
229 .SH "FORMATTING CODES"
230 .IX Header "FORMATTING CODES"
231 Another test taken from Pod::Parser.
232 .PP
233 This is a test to see if I can do not only \f(CW$self\fR and \f(CW\*(C`method()\*(C'\fR, but
234 also \f(CW\*(C`$self\->method()\*(C'\fR and \f(CW\*(C`$self\->{FIELDNAME}\*(C'\fR and
235 \&\f(CW\*(C`$Foo <=> $Bar\*(C'\fR without resorting to escape sequences. If 
236 I want to refer to the right-shift operator I can do something
237 like \f(CW\*(C`$x >> 3\*(C'\fR or even \f(CW\*(C`$y >> 5\*(C'\fR.
238 .PP
239 Now for the grand finale of \f(CW\*(C`$self\->method()\->{FIELDNAME} = {FOO=>BAR}\*(C'\fR.
240 And I also want to make sure that newlines work like this
241 \&\f(CW\*(C`$self\->{FOOBAR} >> 3 and [$b => $a]\->[$a <=> $b]\*(C'\fR
242 .PP
243 Of course I should still be able to do all this \fIwith\fR escape sequences
244 too: \f(CW\*(C`$self\->method()\*(C'\fR and \f(CW\*(C`$self\->{FIELDNAME}\*(C'\fR and
245 \&\f(CW\*(C`{FOO=>BAR}\*(C'\fR.
246 .PP
247 Dont forget \f(CW\*(C`$self\->method()\->{FIELDNAME} = {FOO=>BAR}\*(C'\fR.
248 .PP
249 And make sure that \f(CW0\fR works too!
250 .PP
251 Now, if I use << or >> as my delimiters, then I have to use whitespace.
252 So things like \f(CW\*(C`<$self\-\*(C'\fR\fImethod()\fR>> and \f(CW\*(C`<$self\-\*(C'\fR{\s-1FIELDNAME\s0}>> wont end
253 up doing what you might expect since the first > will still terminate
254 the first < seen.
255 .PP
256 Lets make sure these work for empty ones too, like  and \f(CW\*(C`>>\*(C'\fR
257 (just to be obnoxious)
258 .PP
259 The statement: \f(CW\*(C`This is dog kind's \f(CIfinest\f(CW hour!\*(C'\fR is a parody of a
260 quotation from Winston Churchill.
261 .PP
262 The following tests are added to those:
263 .PP
264 Make sure that a few oth\&er odd \fI\&things\fR still work.  This should be
265 a vertical bar:  |.  Here's a test of a few more special escapes
266 that have to be supported:
267 .IP "&" 3
268 An ampersand.
269 .IP "'" 3
270 An apostrophe.
271 .IP "<" 3
272 A less-than sign.
273 .IP ">" 3
274 A greater-than sign.
275 .IP """" 3
276 A double quotation mark.
277 .IP "/" 3
278 A forward slash.
279 .PP
280 Try to get this bit of text over towards the edge so |that\ all\ of\ this\ text\ inside\ S<>\ won't| be wrapped.  Also test the
281 |same\ thing\ with\ non-breaking\ spaces.|
282 .PP
283 There is a soft hyphen in hyphen at hy\-phen.
284 .PP
285 This is a test of an index entry.
286 .IX Xref "index entry"
287 .SH "VERBATIM"
288 .IX Header "VERBATIM"
289 Throw in a few verbatim paragraphs.
290 .PP
291 .Vb 8
292 \&    use Term::ANSIColor;
293 \&    print color 'bold blue';
294 \&    print "This text is bold blue.\en";
295 \&    print color 'reset';
296 \&    print "This text is normal.\en";
297 \&    print colored ("Yellow on magenta.\en", 'yellow on_magenta');
298 \&    print "This text is normal.\en";
299 \&    print colored ['yellow on_magenta'], "Yellow on magenta.\en";
300 .Ve
301 .PP
302 .Vb 2
303 \&    use Term::ANSIColor qw(uncolor);
304 \&    print uncolor '01;31', "\en";
305 .Ve
306 .PP
307 But this isn't verbatim (make sure it wraps properly), and the next
308 paragraph is again:
309 .PP
310 .Vb 2
311 \&    use Term::ANSIColor qw(:constants);
312 \&    print BOLD, BLUE, "This text is in bold blue.\en", RESET;
313 .Ve
314 .PP
315 .Vb 1
316 \&    use Term::ANSIColor qw(:constants); $Term::ANSIColor::AUTORESET = 1; print BOLD BLUE "This text is in bold blue.\en"; print "This text is normal.\en";
317 .Ve
318 .PP
319 (Ugh, that's obnoxiously long.)  Try different spacing:
320 .PP
321 .Vb 7
322 \&        Starting with a tab.
323 \&Not
324 \&starting
325 \&with
326 \&a
327 \&tab.  But this should still be verbatim.
328 \& As should this.
329 .Ve
330 .PP
331 This isn't.
332 .PP
333 .Vb 2
334 \& This is.  And this:    is an internal tab.  It should be:
335 \&                    |--| <= lined up with that.
336 .Ve
337 .PP
338 (Tricky, but tabs should be expanded before the translator starts in on
339 the text since otherwise text with mixed tabs and spaces will get messed
340 up.)
341 .PP
342 .Vb 5
343 \&    And now we test verbatim paragraphs right before a heading.  Older
344 \&    versions of Pod::Man generated two spaces between paragraphs like this
345 \&    and the heading.  (In order to properly test this, one may have to
346 \&    visually inspect the nroff output when run on the generated *roff
347 \&    text, unfortunately.)
348 .Ve
349 .SH "CONCLUSION"
350 .IX Header "CONCLUSION"
351 That's all, folks!