chelobaka / simple-latex-filter

Simple LaTeX filter for OmegaT
GNU General Public License v3.0
4 stars 1 forks source link

Escaped percentage sign breaks filter? #3

Open marcocevoli opened 11 months ago

marcocevoli commented 11 months ago

Hi,

we have the following Latex code that compiles correctly to PDF:

\subsection*{Lorem Ipsum}

The LOREM\textquoteright X Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem 0\% keyword\index{0% keyword@0\% keyword} Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. 

However, when I open the file that includes that sentence in OmegaT with Simple-latex-filter enabled, the sentence stops after "0% keyword" and all text up to the next line feed is ignored.

I think it's caused by this sequence: @0\%

Luckily enough, this only occurs once in our project, but you might want to take a look.

Thanks in advance,

Marco

chelobaka commented 11 months ago

I believe there is a typo in your source document. Unescaped % symbol marks a beginning of a comment. So \index{0 should be the last thing treated as content.

Nevertheless there is a bug in the plugin, and I get the same result as you. Thanks for reporting it.