I want to paste from the clipboard a plain text copied from a text editor (line wordpad++, vim, notepad etc), and I want TeX to respect the same line break formatting that the editor has. This works great between most text editors, however if I copy a text to a TeX editor and compile it, then it does not respect the line breaks.
Of course I can put \\
or \linebreak
or whatever other typesetting function, but I don't want that. Also simple ASCII symbols like the ampersand must also be escaped (\&
) I just want to have the text in my .pdf
the same way I have it in my editor, without further editing it in my TeX editor.
Is there any function|style setting that can help me?
Notice I also need word wrap for the quoted text.
Best Answer
The
listings
package also allows for setting content verbatim. Here's an example, usinglanguage=TeX
(which should be fine if you have plain text):