-1

For example

\begin{align*}
\Omega \phantom{\Omega..}(A\phantom{\Omega..})
\end{align*}

Prints: O (A ) I want it to print O(A) without resorting to

\begin{align*}
\Omega 
%\Omega..
(A
%\Omega..
)
\end{align*}

which is just terrible

  • 2
    Are you referring to the difficulty of adding proper comments to your code without resorting to "terrible" layouts? You can use \gobble instead of \phantom where you have \makeatletter\let\gobble\@gobble\makeatother in the preamble. – Werner Sep 15 '21 at 05:41
  • OH MY!!!! Ty!!!! – TheGreatJRB Sep 15 '21 at 05:53
  • 2
    note gobble could be more directly defined without using latex internals by as \newcommand\gobble[1]{} – David Carlisle Sep 15 '21 at 06:44

1 Answers1

2

Instead of \phantom, consider something like \gobble where you add

\makeatletter
\let\gobble\@gobble
\makeatother

in your preamble. Note that the use of \gobble inside math mode is probably fine as spacing is corrected based on the surrounding elements. However, using \gobble as-is in text mode might result in unwanted/spurious spaces in the output if not used properly.

Werner
  • 603,163