I would like to insert a copyleft sign inside a \caption
. The following command, given here, works outside \caption
:
\reflectbox{\sffamily{\copyright}}
and does what I would like.
But this:
\caption{A caption \reflectbox{\sffamily{\copyright}}}
leads to an error. What surprises me most is that
\documentclass{article}
\usepackage{graphicx}
\newcommand{\copyleft}{\reflectbox{\sffamily{\copyright}}}
\begin{document}
\begin{figure}
\caption{A simple caption \copyleft}
\end{figure}
\end{document}
yields the error:
Undefined control sequence.
\Gscale@box #1[#2]#3->\leavevmode \def \Gscale@x
{#1}\def \Gscale@y {#2}\set...
l.9 \caption{A simple caption \copyleft}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
[...]
but this one works !
\documentclass{article}
\usepackage{graphicx}
\newcommand{\copyleft}{\reflectbox{\sffamily{\copyright}}}
\begin{document}
\copyleft
\begin{figure}
\caption{A simple caption \copyleft}
\end{figure}
\end{document}
Any ideas or suggestions? I just want to include a copyleft sign in a caption, using latex.
\DeclareRobustCommand{\copyleft}{...}
or place\protect
before\copyleft
when used in a caption.