5

I know that etoolbox provides a robustify command and I've been executing \robustify\( in my headers forever now. But, answers like this one also suggest loading fix fixltx2e to make it robust.

However, CTAN now says that package does nothing but produce a warning and when I go through the logs describing changes to latex the entry for 2019-10-01 says that many previously fragile commands have been made robust but doesn't mention \( and \) explicitly.

So are \( and \) now defined to be robust?

1 Answers1

8

With an up-to-date LaTeX \show\( produces

> \(=macro:
->\x@protect \(\protect \(  .
l.10 \show\(

which looks very robust.

And indeed a look at source2e, §E.1.2, p. 494 in version 2020-10-01PL4 shows that since 2015/01/01 we have had

\DeclareRobustCommand\({%
  \relax\ifmmode\@badmath\else$\fi}%
\DeclareRobustCommand\){%
  \relax\ifmmode\ifinner$\else\@badmath\fi\else \@badmath\fi}%

\IncludeInRelease{2015/01/01}{(}{Make ( robust}% followed by the new robust definition quoted above. Below that the fragile definition.

In ltnews 22 from January 2015 we find that all fixes from fixltx2e are now enabled by default in the LaTeX kernel, so in particular the kernel now defines \( and \) as robust commands. In issue 26 from January 2017 of ltnews we find that all changes from fixltx2e that were added to the kernel in LaTeX version 2015-01-01 are guarded by \IncludeInRelease{2015/01/01}, so can be rolled back with latexrelease.

Hence, if you want to test with the old fragile behaviour, you can roll back your LaTeX version with latexrelease to a date before 2015/01/01, e.g.

\RequirePackage[2014/01/01]{latexrelease}
\documentclass{article}

\begin{document} \tableofcontents \section{(x)} \end{document}

moewe
  • 175,683