0

I work with a lot of OCRed text and almost always there are symbols that require escaping/marking to be interpreted correctly in latex. E.g. the & symbol.

I would like to be able to see the output (pdf) without having to fix all errors.

Is it possible to make xelatex ignore all problematic tokens/words and continue typesetting the document with only the correct tokens?

1
  • xelatex -interaction=nonstopmode? Commented Feb 9, 2017 at 21:01

1 Answer 1

1

when reading plain text you can make all characters normal

If your plain OCR'ed text is in foo.txt then

{\lowercase{
\catcode`\&=12
\catcode`\%=12
\cactcode`\\=12
\catcode`\~=12
\catcode`\_=12
\catcode`\^=12
\catcode`\{=12
\catcode`\}=12
}
\input{foo.txt}
}
}

Will input the file with even \ acting as a normal character, normal tex rules will be restored at the end of the file.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .