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.

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_debug

Debug level. Mainly or only used to turn on Texinfo parsing debugging, when Texinfo obtained from Pod is parsed as Texinfo code to be normalized or modified and to report associated Texinfo processing errors. More information output with higher levels. Default 0, no debugging information output.

texinfo_external_pod_as_url

If set to 0, generate a @ref with an external manual argument for a reference to an external Pod page. In the default case, an @url linking to a website collecting CPAN documentation is output for external Pod pages.

texinfo_generate_setfilename

If set, generate a @setfilename line in standalone manuals. Ignored unless "texinfo_sectioning_base_level" is 0.

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. Formatting commands should not be present in these short titles.

Relevant if "texinfo_sectioning_base_level" is not set to 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" not 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_perldoc_url_prefix

String used as a prefix for external Pod if texinfo_external_pod_as_url is set. Default is "perldoc_url_prefix" in Pod::Simple::XHTML.

texinfo_section_nodes

If set, add @node and not @anchor for each sectioning command. Set to 0 in the default case.

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. Default is 0.

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