1

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?

David Carlisle
  • 757,742
  • 3
    your example did not load graphicx to define \rotatebox assuming 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
  • Which vintage of which TeX distribution do you employ? The reason I ask is that your sample code does not appear to generate any issues under TeXLive2021. – Mico May 06 '21 at 08:58
  • @DavidCarlisle Thanks a lot. That indeed answers my question. Apparently I did not Google well enough. I also apologize for not giving the error log and messing up the minimal example. I am new to this. Thanks a bunch for helping out! – Luuk Stehouwer May 06 '21 at 09:04
  • And also good to know that your version matters a lot – Luuk Stehouwer May 06 '21 at 09:05
  • 1
    @Mico a release before I did this: % \changes{v1.2a}{2019/11/30}{Add \cs{protected} gh/208} – David Carlisle May 06 '21 at 09:14

0 Answers0