Pod::Simple::Texinfo - format Pod as Texinfo
# From the command like
perl -MPod::Simple::Texinfo -e Pod::Simple::Texinfo::go thingy.pod
# From perl
my $new = Pod::Simple::Texinfo->new;
$new->texinfo_sectioning_style('unnumbered');
my $from = shift @ARGV;
my $to = $from;
$to =~ s/\.(pod|pm)$/.texi/i;
$new->parse_from_file($from, $to);
This class is for making a Texinfo rendering of a Pod document.
This is a subclass of Pod::Simple::PullParser and inherits all its methods (and options).
It supports producing a standalone manual per Pod (the default) or render the Pod as a chapter, see "texinfo_sectioning_base_level".
@documentencoding
is not output, which is consistent with outputting Texinfo in UTF-8 in the caller.
Initialize a parser object.
Run the parser. In general, you should not use this method directly, but instead use parse_file
or similar methods from Pod::Simple.
You can set these attributes on the parser object before you call parse_file
(or a similar method) on it:
If set (the default case), a sectioning command is added at the beginning of the output for the whole document, using the module name, at the level above the level set by "texinfo_sectioning_base_level". So there will be a @part
if the level is equal to 1, a @chapter
if the level is equal to 2 and so on and so forth. If the base level is 0, a @top
command is output instead.
The argument should be a reference on an array containing the short titles (usually the module names) of all the Pod documents that are converted together and should be internal in the Texinfo document obtained by including all those Pod documents. References to those documents use the internal reference commands formatting in Texinfo. The formatting commands should not be present in the short titles.
Corresponds to "texinfo_sectioning_base_level" set to anything else than 0.
Sectioning style for the main command appearing at the beginning of the output file if "texinfo_sectioning_base_level" is anything else than 0. Unset in the default case. If unset, use "texinfo_sectioning_style", except for style heading
, for which the numbered
style is used in the default case.
String used as a prefix for man page urls. Default is http://man.he.net/man
.
If set, add @node
and not @anchor
for each sectioning command.
Sets the level of the head1 commands. 1 is for the @chapter/@unnumbered level. If set to 0, the head1 commands level is still 1, but the output manual is considered to be a standalone manual. If not 0, the Pod file is rendered as a fragment of a Texinfo manual.
Default is numbered
, using the numbered sectioning Texinfo @-commands (@chapter, @section...). Giving unnumbered
leads to using unnumbered sectioning command variants (@unnumbered
...), giving heading
leads to using headings that are not associated with document structuring (@heading
...) and any other value would lead to using appendix sectioning command variants (@appendix
...).
If set, used as short title. Otherwise, set to the module name with Pod::Simple::PullParser->get_short_title. Can be accessed to get the module name associated with a Pod::Simple::Texinfo
parser.
Pod::Simple. Pod::Simple::PullParser. The Texinfo manual.
Copyright (C) 2011-2022 Free Software Foundation, Inc.
This library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
_url_escape
is general_url_escape
from Pod::Simple::HTML.
Patrice Dumas <[email protected]>. Parts from Pod::Simple::HTML.