我想減少考試課中複選框的縮進

我想減少考試課中複選框的縮進

複選框的縮排太大。我希望它與問題的第一個字母保持一致。

\documentclass[11pt,a4paper,addpoints]{exam} 
\usepackage[utf8]{inputenc} 
\usepackage{amsmath} 
\usepackage{geometry} 
\geometry{margin=1in} 
\usepackage[dutch]{babel}
\usepackage{amssymb} 
\pointpoints{punt}{punten}
\pointsinmargin 
\boxedpoints
\begin{document}
\checkboxchar{$\Box$}
\begin{questions}
\question[1] Een brekingsindex wordt uitgedrukt in
\begin{checkboxes}
\choice Graden
\choice Graden/meter
\CorrectChoice Heeft geen eenheid
\end{checkboxes}
\end{questions}
\end{document}

在此輸入影像描述

答案1

exam提供了一個進入環境的鉤子,checkboxes稱為\checkboxeshook.這允許您在呼叫環境之前插入對checkboxes環境的更改,而無需重新定義整個環境。下面我刪除了新增到左邊距的\labelsep水平2.5em跳過,使其縮排相當遠。也許這個刪除就夠了:

在此輸入影像描述

\documentclass{exam}
\usepackage{amsmath,amssymb}
\usepackage[margin=1in]{geometry}

\pointpoints{punt}{punten}
\pointsinmargin 
\boxedpoints

\renewcommand{\checkboxeshook}{%
  \settowidth{\leftmargin}{W.}% Included an additional \labelsep + 2.5em skip (now removed)
  \labelwidth\leftmargin\advance\labelwidth-\labelsep%
}

\begin{document}
\checkboxchar{$\Box$}
\begin{questions}
  \question[1] Een brekingsindex wordt uitgedrukt in
  \begin{checkboxes}
    \choice Graden
    \choice Graden/meter
    \CorrectChoice Heeft geen eenheid
  \end{checkboxes}
\end{questions}
\end{document}

相關內容