I defined \+
and \-
macros for conveniently entering notation. Surprisingly, I noticed that in table and figure captions \-
does not work while \+
works. (The same problem appears also in the content of figures if they're made with TikZ.) Is there any explanation for this strange behavior? Perhaps, this is related to the fact that \-
is normally used for hyphenation. But why should that matter after I redefined it?
Here is a minimal working example:
\documentclass{article}
\usepackage{amssymb}
\newcommand{\+}{\boxplus}
\renewcommand{\-}{\boxminus}
\begin{document}
Plus $\+$ and minus $\-$ work here.
\begin{figure}
\caption{Why does $\-$ not work in a caption while $\+$ works?}
\end{figure}
\begin{table}
\caption{Why does $\-$ not work in a caption while $\+$ works?}
\end{table}
\end{document}
\-