1

Possible Duplicate:
Suppressing remarks when not needed

Is there a way that I can define a new environment in my manuscript which will only be typeset when a flag is activated? Otherwise these blocks should be suppressed.

What I am trying to do is include references to my personal notebooks and files in my Thesis that will only print in a copy for my own reference and not in the final draft.

I also use a Makefile to typeset various draft options. Is there a way to turn on such an option flag with a pdflatex command line argument?

Mike
  • 889
  • 1
    see comment package – David Carlisle Oct 09 '12 at 22:26
  • This question is very similar to http://tex.stackexchange.com/questions/45702/suppressing-remarks-when-not-needed. Please take a look at it as the information there might help you. If so, that's great, and we'll probably close this question as a duplicate just to keep the place tidy and to help people find answers quickly. If not, please edit your question here to explain why so that people can better focus their attention to help you. – doncherry Oct 09 '12 at 22:27
  • The linked question answers how to define this environment. To answer your second part of the question you can use a command line such as pdflatex "\def\ShowSpecialBlocks{} \input{file.tex}" to process the file file.tex. Then in your preamble check that this flag was set and use it to enable/disable whatever you are using to switch between showing/hiding your special blocks: \ifdefined\ShowSpecialBlocks flag=true \else flag=false \fi. The actual code will depend on how you are doing your conditionals. – Peter Grill Oct 09 '12 at 22:34
  • I also just came across http://tex.stackexchange.com/questions/17816/commenting-out-large-sections – Mike Oct 09 '12 at 22:38
  • @Mike Glad you found more helpful material. So it's ok to close this question? – doncherry Oct 09 '12 at 22:40
  • @doncherry The linked question does point to the comment package which I think is all I need. This would not have been an easy answer for me to find though. I wonder how the language can be improved to help search for something like this. – Mike Oct 09 '12 at 22:42
  • @Mike I found it by searching for tags. Once you kind of know which tags we use around here, using them often is more efficient than searching for words. Here, I used [environments][comments] as the search term. But that's really why proper tagging is extremely important. And that's also the reason why we tend to not delete questions as duplicates: So that we have "different wordings" of the same question around, which increases users' chances of finding what they need. – doncherry Oct 09 '12 at 22:43
  • 1
    @doncherry Thanks for the tip, looks like [comments] was the key. The keywords I tried all came up dry. You can close this question. – Mike Oct 09 '12 at 22:45

0 Answers0