General ⇒ Show/Hide Specific Content Based on Audience and Output
Show/Hide Specific Content Based on Audience and Output
Is there a way to inlcude all the content in the document and only render certain paragraphs or sections when the document is compiled? Thanks in advance,
Jason
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
Re: Show/Hide Specific Content Based on Audience and Output
If you don't mind typesetting the document for each group before you distribute it, I would try using,
\begin{comment}
Super secret text
\end{comment}
This way you can maintain the document in its entirety and just comment out proprietary content before you typeset it. I can't recall for sure if this is true, but I think you also need to load the verbatim package in your preamble to get it to work.
Show/Hide Specific Content Based on Audience and Output
This should create and set a boolean value to true or false. You then create a command that can take two arguments. The first would be what you want displayed if showToPublic is true, then other if set to false:
Code: Select all
\usepackage{ifthen}
\newboolean{showToPublic}
\setboolean{showToPublic}{true}
\newcommand{\todocmd}[2]{{{#1}}{{#2}}}
\newcommand{\todo}[2]{\ifthenelse {\boolean{showToPublic}} {\todocmd{#1}}{\todocmd{#2}}}
Code: Select all
\todo{Here's what the public would see.}{Here's the private copy.}