I made a new math symbol by rotating an existing math symbol. Now I would like to use it in the caption of a table. However, it does not compile. Here a minimal working example:
\documentclass{article}
\usepackage{graphicx}
\newcommand{\nw}{\rotatebox[origin=c]{180}{$w$}}
\begin{document}
\begin{table}
\centering
\begin{tabular}{c|c}
some & table
\end{tabular}
\caption{$\nw$}
\end{table}
\end{document}
Did I mess something up? If not, what would be a good workaround?
graphicxto define\rotateboxassuming that was not the error in your real document, the example now runs without error in current latex, but on older releases you will need\protect\nw. Please always give the exact error message from the log file, not "won't compile" which is hard to debug. – David Carlisle May 06 '21 at 08:43% \changes{v1.2a}{2019/11/30}{Add \cs{protected} gh/208}– David Carlisle May 06 '21 at 09:14