Skip Menu |

This queue is for tickets about the LaTeX-Parser CPAN distribution.

Report information
The Basics
Id: 32877
Status: open
Priority: 0/
Queue: LaTeX-Parser

People
Owner: Nobody in particular
Requestors:
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.01
Fixed in: (no value)



Subject: Error on \% sequence
Try to parse LaTeX source containing \% sequence. For example, 100\% confident LaTeX::Parser treats % of \% as a comment and gives the error: A \ Command I don't understand at /usr/lib/perl5/LaTeX/Parser.pm line 115.
From: you [...] cpan.org
On Sat Feb 02 06:47:21 2008, YOU wrote: Show quoted text
> Try to parse LaTeX source containing \% sequence. For example, > > 100\% confident > > LaTeX::Parser treats % of \% as a comment and gives the error: > > A \ Command I don't understand at /usr/lib/perl5/LaTeX/Parser.pm line 115. >
Another bug related to comment (%) : LaTeX::Parser ignores any string from the % symbol and ignores % symbol itself, too. So, try to parse the following example: t% here goes a comment h% another comment i% more comments s is an example. Then iterate and print the parsed content: t h i s is an example. The comment symbol % should be retained. There are big differences. If you compile the former, you will get "this is an example.". But if you compile the latter, you will get "t h i s is an example." A solution: rewrite the 70th line of Parser.pm from s/%.*$/\1/; to s/([^\\]%).*$/\1/;