Pod::PseudoPod::LaTeX - convert Pod::PseudoPod documents into LaTeX
This module is a Pod::PseudoPod subclass, itself a Pod::Simple subclass. This means that this is a full-fledged POD parser. Anything those modules can do, this can do.
Pod::PseudoPod
Pod::Simple
Perhaps a little code snippet.
use Pod::PseudoPod::LaTeX; my $parser = Pod::PseudoPod::LaTeX->new(); $parser->emit_environments( sidebar => 'sidebar' ); $parser->output_fh( $some_fh ); $parser->parse_file( 'some_document.pod' ); ...
The generated LaTeX code needs some packages to be loaded to work correctly. Currently it needs
\usepackage{fancyvrb} % for Screen and Verbatim environments \usepackage{url} % for L<> URLs \usepackage{titleref} % for A<> generated code
The standard font in LaTeX (Computer Modern) does not support bold and italic variants of its monospace font, an alternative is
\usepackage[T1]{fontenc} \usepackage{textcomp} \usepackage[scaled]{beramono}
Currently we support:
keep_ligatures
LaTeX usually joins some pairs of letters (ff, fi and fl), named ligatures. By default the module splits them. If you prefer to render them with ligatures, use:
my $parser = Pod::PseudoPod::LaTeX->new( keep_ligatures => 1 );
captions_below
Set this flag to a true value if you prefer that figure and table captions are placed below the object and not above (the default).
full
Create a standalone document which can immediately be run through latex or pdflatex.
latex
pdflatex
The emit_environments method accepts a hashref whose keys are POD environments and values are LaTeX environments. Use this method if you would like Pod::PseudoPod::LaTeX to emit a simple \begin{foo}...\end{foo} environment rather than emit specific formatting codes. You must define any environments you use in this way in your LaTeX prelude.
emit_environments
Pod::PseudoPod::LaTeX
\begin{foo}...\end{foo}
You can define your own environments easily. First you need to define the =begin...=end environment with:
=begin...=end
$parser->acept_target_as_text('my_environment');
Then, you can use the emit_environments method to tell Pod::PseudoPod::LaTeX what LaTeX environment to emit:
$parser->emit_environments('my_environment' => 'latex_env');
Also, if my_environment is used in POD with a title, it is passed as the first argument to the LaTeX environment. That is,
my_environment
=begin my_environment Some title
Will generate
\begin{latex_env}{Some title}
chromatic, <chromatic at wgz.org>
<chromatic at wgz.org>
Please report any bugs or feature requests to bug-pod-pseudopod-tex at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Pod-PseudoPod-LaTeX. I'll hear about it and you'll hear about any progress on your bug as I make changes.
bug-pod-pseudopod-tex at rt.cpan.org
Read this documentation with the perldoc command:
$ B<perldoc Pod::PseudoPod::LaTeX>
You can also look for information at:
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Pod-PseudoPod-LaTeX
CPAN Ratings
http://cpanratings.perl.org/d/Pod-PseudoPod-LaTeX
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Pod-PseudoPod-LaTeX
Search CPAN
http://search.cpan.org/dist/Pod-PseudoPod-LaTeX
Based on Allison Randal's Pod::PseudoPod module.
See also perlpod, Pod::Simple and Pod::TeX. I did not reuse the latter because I need to support the additional POD directives found in PseudoPod.
Thanks to multiple contributors, including (but not limited to) Dean Serenevy, Moritz Lenz, Alberto Simões, and Jerome Quelin.
Thanks to Onyx Neon Press (http://www.onyxneon.com/) for sponsoring this work under free software guidelines.
Copyright (c) 2006, 2009 - 2019, chromatic.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl 5.30.
To install Pod::PseudoPod::LaTeX, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Pod::PseudoPod::LaTeX
CPAN shell
perl -MCPAN -e shell install Pod::PseudoPod::LaTeX
For more information on module installation, please visit the detailed CPAN module installation guide.