# [OS X TeX] Invisible text

Alain Schremmer schremmer.alain at gmail.com
Sun May 27 13:53:27 EDT 2007

1) I often switch between two environments, for instance:

\newboolean{FormattedVersusEnumerated}

\newenvironment{Formatted}[2]%
{\textbf{#1}\par\textit{#2}}%
{\par}

\newenvironment{Enumerated}[2]
{\begin{enumerate}\item #1\item #2}%
{\end{enumerate}}

\newenvironment{Xxxx}
{%
\ifthenelse{\boolean{FormattedVersusEnumerated}}
{\begin{Formatted}}%
{\begin{Enumerated}}%
}%
{%
\ifthenelse{\boolean{FormattedVersusEnumerated}}%
{\end{Formatted}}%
{\end{Enumerated}}%
}%

and then in the document

\setboolean{FormattedVersusEnumerated}{true}

\begin{Xxxx}
{First test phrase}
{Second test phrase}
\end{Xxxx}

Where I ran into trouble of course is when, instead of "Formatted", I
needed an environment that would do nothing. I then tried

\newenvironment{Invisible}[2]%
{\invisible{#1}}%
{\\invisible{#2}}

but even though Lamport mentions \invisible on page 161 of the
Addendum to the Second Preliminary Ed. (July 13, 1998), Companion 2ed
does not mention it and all I found via Google was, at http://
trick" which I didn;t understand and didn't work for me:

\mbox{} - used to create invisible text

2) The only way I have found is, instead of the above, do the
ifthenelse in the document with \newenvironment{Naught}{ }{ } but,
while it works, as I have a lot of nested ifthenelse, that turns into
a nightmare.

Very hopeful regards
--schremmer