I'm looking for a way to turn toggle the "comment" status of certain comments within a latex document. The idea is that throughout the document, including the preamble, there are specific commented-out lines that I can effectively toggle on and off, from comment to printed line. The following MWE shows my attempt to instigate this using a command, but unfortunately it just prints the % character:
% Compiles with XeLaTeX
\documentclass{memoir}
\usepackage{polyglossia}
\setmainlanguage{english}
\newcommand{\tcom}{\%} % I was hoping changing this as needed would work.
\tcom comment in preamble that can be toggled.
\begin{document}
% comment that should remain hidden.
\tcom comment that can be toggled.
\end{document}
\newif? After\newif\iffooyou can use\iffoo .. \else ..\fiand set the switch to true (\footrue) or false (\foofalse). – Christian Lindig Jun 19 '15 at 20:05commentpackage; and perhaps the topics conditional compilation and editorial. – jon Jun 19 '15 at 20:05\begin{document};-) – Jun 19 '15 at 20:32%is removed – Jun 19 '15 at 20:39