Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

In most cases, TeX does not distinguish between spaces and newlines. However, inside some macros and environments this distinction matters a lot. Time for a big list? Please edit the CW answer.

This occurred when pondering about Forward-inverse search using SyncTeX with the precison of a single word; this "expert knowledge" is however also relevant for any tool that tries to preprocess (La)TeX code, such as latexdiff.

share|improve this question
    
As everyone can define its own verbatim-like environment e.g. with the help of fancyvrb or listings I don't see how you should ever been able to get a complete list. –  Ulrike Fischer Jun 14 '12 at 14:58
    
@UlrikeFischer: Yes, indeed this adds even more complexity. But still not impossible, just makes the list bigger and... dynamic :-) –  krlmlr Jun 14 '12 at 22:08
add comment

1 Answer 1

up vote 1 down vote accepted

Environments

  • verbatim

  • lstlisting, plus custom environments defined through \lstnewenvironment (listings package)

  • Verbatim, plus custom environments defined through \DefineVerbatimEnvironment (fancyvrb package)

Commands

  • \index

  • \verb

  • \obeylines

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.