
在下面的程式碼中,在 的位置*step 2*
,我想準確顯示。有人知道該怎麼做?
\begin{block}{title}
\begin{enumerate}
\item ... %Step 1
\item ... %Step 2
\item ... Go back to *Step 2*
\end{enumerate}
\end{block}
答案1
這個想法是使用\label
,機制,但定義一個命令來將由陰影球\ref
產生的字串括起來,就像 所使用的那樣:\ref
beamer
\documentclass{beamer}
\usetheme{Warsaw}
\usepackage{tikz}
\newcommand\ballref[1]{%
\tikz \node[circle, shade,ball color=structure.fg,inner sep=0pt,%
text width=8pt,font=\tiny,align=center] {\color{white}\ref{#1}};
}
\begin{document}
\begin{frame}
\begin{enumerate}
\item ... %Step 1
\item\label{ite:second} ... %Step 2
\item ... Go back to Step~\ballref{ite:second}
\end{enumerate}
\end{frame}
\end{document}
由於french
選項babel
會產生;
活躍的角色,因此必須採取額外的預防措施:
\documentclass{beamer}
\usetheme{Warsaw}
\usepackage[french]{babel}
\usepackage{tikz}
\newcommand\ballref[1]{%
\shorthandoff{;}\tikz \node[circle, shade,ball color=structure.fg,inner sep=0pt,%
text width=8pt,font=\tiny,align=center] {\color{white}\ref{#1}};
\shorthandon{;}
}
\begin{document}
\begin{frame}
\begin{block}{title}
\begin{enumerate}
\item ... %Step 1
\item\label{ite:second} ... %Step 2
\item ... Go back to Step~\ballref{ite:second}
\end{enumerate}
\end{block}
\end{frame}
\end{document}