josephwright / beamer

A LaTeX class for producing presentations and slides
Other
1.35k stars 139 forks source link

Overlay command creates spurious spacing for + infty #892

Open ysalmon opened 3 months ago

ysalmon commented 3 months ago

A picture is worth a thousand words :

\documentclass{beamer}

\begin{document}
$\invisible<article>{+\infty}$

$+\infty$

$\invisible<article>{{+\infty}}$
\end{document}

gives (in beamer mode) Screenshot_20240408_144700

I think that \invisible produces something that is not visible per se but makes LaTeX interpret the + as a binary rather than unary operator, and adjust spacing accordingly.

The workaround is not bad, and logical once one understands what's happening. But maybe there is a better way ?

I could not find a reference for this in the documentation (that's hard to search for !) ; if the current behaviour is expected or not worth modifying, I would suggest adding a sentence to that effect containing eg. the words \infty, unary , binary and spacing, so it can be searched for.