[texhax] The Listings package, with Perl
ghaverla at materialisations.com
Mon Feb 13 04:42:10 CET 2012
On February 12, 2012, Heiko Oberdiek wrote:
> On Sun, Feb 12, 2012 at 07:57:55PM -0700, Gordon Haverland
> > I am generating a document where I am encorporating source
> > code listings of Perl (with POD) in the document.
> > The preamble doesn't like printpod=... or podcomment=... at
> > all.
> A new language can be defined that sets these entries:
Why would I need to define a new language, if the listing package
documents the presence of printpod and podcomment variables?
> > In a section of POD in the code, as soon as a single quote
> > comes up, output goes screwy. Every space becomes that
> > square "U" to explicitly show a space. Yes, changing doesn't
> > to does not, and so on fixes the problems.
> Also the example above shows the problem.
> Perhaps a bug?
That was my thought.
> If you have a POD section without Perl code, you could use
> deletestring=[b]", deletestring=[b]'
No, all the POD is within the Perl source.
Double quotes weren't a problem, just regular single quotes. I
don't know that setting printpod or podcomment would have fixed
anything or not, all I know is that trying to set either generated
errors. I'm guessing the documentation is out of date with the
I can completely understand the fact that Perl keywords are bold
in the POD, as POD is legal Perl. But LaTeX parsing doesn't seem
to be up to what the Perl interpretter does.
I would entirely understand if Perl with POD is not something the
Listings package can do. A note to that effect is all that is
needed. But, manually adjusting the text looks reasonable enough
for my purposes.
More information about the texhax