Hiding text in LaTeX
2012-11-04T22:24:00
When writing my dissertation, I like to leave some text that I won't use at that particular moment but know I will need in the (near) future. To remember to correct it later, I surrounded it with the (pseudo-randomly chosen) \ldots command, like this:
This is the actual text.
\dots
This is some text I'll need later.
\ldots
This is more of the actual text.
That solved my problem, I could just grep the files and find the parts that needed refactoring. The problem is they ended up on the PDF, which is not the end of the world, but it disrupted the reading and didn't look so good. I finally decided to google the problem, and found a nice solution, using the if command:
This is the actual text
\iffalse
This is some text I'll need latex.
\fi
This is more of the actual text.
Now I can still grep for \iffalse, and it doesn't pollute the PDF. And it even advertises my blog. Yay!