使用下面提到的代码:我可以圈出问题编号:
\documentclass{exam}
\usepackage{tikz}
\newcommand*\circled[1]{\tikz[baseline=(char.base)]{
\node[shape=circle,fill,inner sep=1.5pt, text=white] (char) {#1};}}
\renewcommand{\questionlabel}{\circled{\thequestion}}
\begin{document}
\begin{questions}
\question[4] Choose the correct reponse:
\begin{choices} \choice Option A
\choice Option B
\choice Option C
\choice Option D
\end{choices}
\end{questions}
\end{document}
但随着问题编号从一位数增加到两位数,圆圈的大小也会发生变化。
您能否建议我们如何才能为所有数字创建一个恒定大小的圆?[1-100]
答案1
minimum size
用这种方法给带圈数字的节点点赞。
\documentclass{exam}
\usepackage{tikz}
\newcommand*\circled[1]{%
\tikz[baseline=(char.base)]
\node[
shape=circle,
fill,
inner sep=1.5pt,
text=white,
minimum size=1.5em
] (char) {#1};
}
\renewcommand{\questionlabel}{\circled{\thequestion}}
\begin{document}
\begin{questions}
\setcounter{question}{8} % only to show the effect
\question[4] Choose the correct reponse:
\begin{choices} \choice Option A
\choice Option B
\choice Option C
\choice Option D
\end{choices}
\question[4] Choose the correct reponse:
\begin{choices} \choice Option A
\choice Option B
\choice Option C
\choice Option D
\end{choices}
\question[4] Choose the correct reponse:
\begin{choices} \choice Option A
\choice Option B
\choice Option C
\choice Option D
\end{choices}
\end{questions}
\end{document}