NAME

Pod::Simple::Texinfo - format Pod as Texinfo

SYNOPSIS

# 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);

DESCRIPTION

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.

METHODS

new

Initialize a parser object.

run

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:

texinfo_add_upper_sectioning_command

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.

texinfo_internal_pod_manuals

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.

texinfo_main_command_sectioning_style

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.

texinfo_man_url_prefix

String used as a prefix for man page urls. Default is http://man.he.net/man.

texinfo_section_nodes

If set, add @node and not @anchor for each sectioning command.

texinfo_sectioning_base_level

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.

texinfo_sectioning_style

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...).

texinfo_short_title

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.

SEE ALSO

Pod::Simple. Pod::Simple::PullParser. The Texinfo manual.

COPYRIGHT AND LICENSE

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.

AUTHOR

Patrice Dumas <pertusus@free.fr>. Parts from Pod::Simple::HTML.