1POD2TEXT(1)            Perl Programmers Reference Guide            POD2TEXT(1)
2
3
4

NAME

6       pod2text - Convert POD data to formatted ASCII text
7

SYNOPSIS

9       pod2text [-aclostu] [--code] [-i indent] [-q quotes]
10           [--stderr] [-w width] [input [output ...]]
11
12       pod2text -h
13

DESCRIPTION

15       pod2text is a front-end for Pod::Text and its subclasses.  It uses them
16       to generate formatted ASCII text from POD source.  It can optionally
17       use either termcap sequences or ANSI color escape sequences to format
18       the text.
19
20       input is the file to read for POD source (the POD can be embedded in
21       code).  If input isn't given, it defaults to "STDIN".  output, if
22       given, is the file to which to write the formatted output.  If output
23       isn't given, the formatted output is written to "STDOUT".  Several POD
24       files can be processed in the same pod2text invocation (saving module
25       load and compile times) by providing multiple pairs of input and output
26       files on the command line.
27

OPTIONS

29       -a, --alt
30           Use an alternate output format that, among other things, uses a
31           different heading style and marks "=item" entries with a colon in
32           the left margin.
33
34       --code
35           Include any non-POD text from the input file in the output as well.
36           Useful for viewing code documented with POD blocks with the POD
37           rendered and the code left intact.
38
39       -c, --color
40           Format the output with ANSI color escape sequences.  Using this
41           option requires that Term::ANSIColor be installed on your system.
42
43       -i indent, --indent=indent
44           Set the number of spaces to indent regular text, and the default
45           indentation for "=over" blocks.  Defaults to 4 spaces if this
46           option isn't given.
47
48       -h, --help
49           Print out usage information and exit.
50
51       -l, --loose
52           Print a blank line after a "=head1" heading.  Normally, no blank
53           line is printed after "=head1", although one is still printed after
54           "=head2", because this is the expected formatting for manual pages;
55           if you're formatting arbitrary text documents, using this option is
56           recommended.
57
58       -m width, --left-margin=width, --margin=width
59           The width of the left margin in spaces.  Defaults to 0.  This is
60           the margin for all text, including headings, not the amount by
61           which regular text is indented; for the latter, see -i option.
62
63       -o, --overstrike
64           Format the output with overstrike printing.  Bold text is rendered
65           as character, backspace, character.  Italics and file names are
66           rendered as underscore, backspace, character.  Many pagers, such as
67           less, know how to convert this to bold or underlined text.
68
69       -q quotes, --quotes=quotes
70           Sets the quote marks used to surround C<> text to quotes.  If
71           quotes is a single character, it is used as both the left and right
72           quote; if quotes is two characters, the first character is used as
73           the left quote and the second as the right quoted; and if quotes is
74           four characters, the first two are used as the left quote and the
75           second two as the right quote.
76
77           quotes may also be set to the special value "none", in which case
78           no quote marks are added around C<> text.
79
80       -s, --sentence
81           Assume each sentence ends with two spaces and try to preserve that
82           spacing.  Without this option, all consecutive whitespace in non-
83           verbatim paragraphs is compressed into a single space.
84
85       --stderr
86           By default, pod2text puts any errors detected in the POD input in a
87           POD ERRORS section in the output manual page.  If --stderr is
88           given, errors are sent to standard error instead and the POD ERRORS
89           section is suppressed.
90
91       -t, --termcap
92           Try to determine the width of the screen and the bold and underline
93           sequences for the terminal from termcap, and use that information
94           in formatting the output.  Output will be wrapped at two columns
95           less than the width of your terminal device.  Using this option
96           requires that your system have a termcap file somewhere where
97           Term::Cap can find it and requires that your system support
98           termios.  With this option, the output of pod2text will contain
99           terminal control sequences for your current terminal type.
100
101       -u, --utf8
102           By default, pod2text tries to use the same output encoding as its
103           input encoding (to be backward-compatible with older versions).
104           This option says to instead force the output encoding to UTF-8.
105
106           Be aware that, when using this option, the input encoding of your
107           POD source must be properly declared unless it is US-ASCII or
108           Latin-1.  POD input without an "=encoding" command will be assumed
109           to be in Latin-1, and if it's actually in UTF-8, the output will be
110           double-encoded.  See perlpod(1) for more information on the
111           "=encoding" command.
112
113       -w, --width=width, -width
114           The column at which to wrap text on the right-hand side.  Defaults
115           to 76, unless -t is given, in which case it's two columns less than
116           the width of your terminal device.
117

DIAGNOSTICS

119       If pod2text fails with errors, see Pod::Text and Pod::Simple for
120       information about what those errors might mean.  Internally, it can
121       also produce the following diagnostics:
122
123       -c (--color) requires Term::ANSIColor be installed
124           (F) -c or --color were given, but Term::ANSIColor could not be
125           loaded.
126
127       Unknown option: %s
128           (F) An unknown command line option was given.
129
130       In addition, other Getopt::Long error messages may result from invalid
131       command-line options.
132

ENVIRONMENT

134       COLUMNS
135           If -t is given, pod2text will take the current width of your screen
136           from this environment variable, if available.  It overrides
137           terminal width information in TERMCAP.
138
139       TERMCAP
140           If -t is given, pod2text will use the contents of this environment
141           variable if available to determine the correct formatting sequences
142           for your current terminal device.
143

SEE ALSO

145       Pod::Text, Pod::Text::Color, Pod::Text::Overstrike, Pod::Text::Termcap,
146       Pod::Simple, perlpod(1)
147
148       The current version of this script is always available from its web
149       site at <http://www.eyrie.org/~eagle/software/podlators/>.  It is also
150       part of the Perl core distribution as of 5.6.0.
151

AUTHOR

153       Russ Allbery <rra@stanford.edu>.
154
156       Copyright 1999, 2000, 2001, 2004, 2006, 2008 Russ Allbery
157       <rra@stanford.edu>.
158
159       This program is free software; you may redistribute it and/or modify it
160       under the same terms as Perl itself.
161
162
163
164perl v5.12.4                      2011-11-04                       POD2TEXT(1)
Impressum