This is my patch patch.1n for perl5.001.
[p5sagit/p5-mst-13.2.git] / pod / perlpod.pod
CommitLineData
a0d0e21e 1=head1 NAME
2
3pod - plain old documentation
4
5=head1 DESCRIPTION
6
7A pod-to-whatever translator reads a pod file paragraph by paragraph,
8and translates it to the appropriate output format. There are
9three kinds of paragraphs:
10
11=over 4
12
13=item *
14
15A verbatim paragraph, distinguished by being indented (that is,
16it starts with space or tab). It should be reproduced exactly,
17with tabs assumed to be on 8-column boundaries. There are no
18special formatting escapes, so you can't italicize or anything
19like that. A \ means \, and nothing else.
20
21=item *
22
23A command. All command paragraphs start with "=", followed by an
24identifier, followed by arbitrary text that the command can
25use however it pleases. Currently recognized commands are
26
27 =head1 heading
28 =head2 heading
29 =item text
30 =over N
31 =back
32
33=item *
34
35An ordinary block of text. It will be filled, and maybe even
36justified. Certain interior sequences are recognized both
37here and in commands:
38
39 I<text> italicize text, used for emphasis or variables
40 B<text> embolden text, used for switches and programs
41 S<text> text contains non-breaking spaces
42 C<code> literal code
43 L<name> A link (cross reference) to name
44 L<name> manpage
45 L<name/ident> item in manpage
46 L<name/"sec"> section in other manpage
47 L<"sec"> section in this manpage
48 (the quotes are optional)
49 F<file> Used for filenames
50 Z<> A zero-width character
51
52That's it. The intent is simplicity, not power. I wanted paragraphs
53to look like paragraphs (block format), so that they stand out
54visually, and so that I could run them through fmt easily to reformat
55them (that's F7 in my version of B<vi>). I wanted the translator (and not
56me) to worry about whether " or ' is a left quote or a right quote
57within filled text, and I wanted it to leave the quotes alone dammit in
58verbatim mode, so I could slurp in a working program, shift it over 4
59spaces, and have it print out, er, verbatim. And presumably in a
60constant width font.
61
62In particular, you can leave things like this verbatim in your text:
63
64 Perl
65 FILEHANDLE
66 $variable
67 function()
68 manpage(3r)
69
70Doubtless a few other commands or sequences will need to be added along
71the way, but I've gotten along surprisingly well with just these.
72
73Note that I'm not at all claiming this to be sufficient for producing a
74book. I'm just trying to make an idiot-proof common source for nroff,
75TeX, and other markup languages, as used for online documentation.
76Both B<pod2html> and B<pod2man> translators exist.
77
78=head1 Author
79
80Larry Wall
81