How to exclude text portions by simply setting a variable or option?
You want the comment package. This provides the \includecomment
and \excludecomment
macros:
\documentclass{article}
\usepackage{comment}
\excludecomment{confidential}
\begin{document}
Some text
\begin{confidential}
Some secret text
\end{confidential}
\end{document}