I want to generate a PDF of user-submitted text using LaTeX. To handle crazy user input, I first thought about using the verbatim package, but of course it doesn't break up too long lines. Is there some package that works similar to verbatim (i.e., accept any input) but formats the text nicely?
|
|
|||||
|
migrated from stackoverflow.com Mar 27 '11 at 9:45
|
The
If the user text is in an external file you can also use:
|
||||
|
The |
||||
|
|
|
Depending on what you exactly need, this might be sufficient: we reset all special characters to catcode other, in particular \, { and } lose their meaning. This will make it pretty hard to inject LaTeX code.
|
|||
|
|
|
You can use To format the text nicely, you can use the
Will print the text in a Sans-seriF font family. Though (I'm sorry!) the |
|||
|
|
