tikzlings 中的 \tikz\panda 可用作方程式的标签,但如果我在方程式中插入 \label,就会出现错误。MWE:
\documentclass[11pt,american]{beamer}
\usepackage{tikzlings-pandas}
\begin{document}
\begin{frame}{Pandas}
\begin{equation}\text{The apple-eating Panda}\tag{\tikz\panda[scale=0.15,body=gray];}\label{pandas}
\end{equation}
\end{frame}
\begin{frame}{More Pandas}
As we saw in \eqref{pandas}:
\begin{equation}\text{The not-eating Panda}\end{equation}
\end{frame}
\end{document}
错误:
! Undefined control sequence.
\tikz@deactivatthings ->\def ;
{\tikz@nonactivesemicolon }\def :{\tikz@nonact...
是否有某种方法可以使 \label-\eqref 机制与 tikzlings 作为 \tag 一起工作?
答案1
必须保护濒危物种:
\documentclass[11pt,american]{beamer}
\usepackage{tikzlings-pandas}
\begin{document}
\begin{frame}{Pandas}
\begin{equation}\text{The apple-eating Panda}\tag{\protect\tikz\protect\panda[scale=0.15,body=gray];}\label{pandas}
\end{equation}
\end{frame}
\begin{frame}{More Pandas}
As we saw in \eqref{pandas}:
\begin{equation}\text{The not-eating Panda}\end{equation}
\end{frame}
\end{document}