5
votes
1answer
401 views

Escaping special LaTeX characters in user-defined input text

Background Users can provide text, which is transformed using XSL into a LaTeX document. The XSL template that transforms the XML document (containing user-defined text) currently resembles: ...
6
votes
1answer
164 views

Percent signs disappearing from verbatim block (ltxdoc class)

Is the following expected: \documentclass{ltxdoc} \begin{document} \begin{verbatim} % why is my percent sign gone? \relax % not here \end{verbatim} \end{document}
12
votes
1answer
304 views

Escaped characters in typewriter font

I know a number of ways to fix this (e.g. \usepackage[T1]{fontenc}), but I want to understand what's happening in the following example. \documentclass{article} \begin{document} \noindent \$ \% ...
4
votes
1answer
462 views

How to handle % character in LaTeX?

I am working on special character handling and my text is having % as one the special character which is treated as comment and anything after that is not printed. I m using verb as suggested in my ...
4
votes
1answer
533 views

How to handle special characters in LaTeX?

I am working on one file which has some special chacters. König IR : KA}unig ,K ~ A}unig % : Comment in latex (so no text after this %) - : escape I get different output ...
3
votes
1answer
194 views

checking for whitespace inside verbatim environment

I would like to determine whether a line inside a verbatim environment starts with 3 spaces. I'm using pdflatex and the \pdfmatch primitive. I see that the verbatim environment sets the category ...
4
votes
2answers
580 views

Include binary data

How do I include binary data (e.g. the contents of a binary file) in a LaTeX generated PDF-document? If I just copy and paste them into a verbatim environment it results in garbage.