将点与右边距对齐

将点与右边距对齐

我想知道是否有人能帮我将标记对齐到右边距。提前谢谢!

\documentclass{exam}
\usepackage[utf8]{inputenc}
\usepackage[left=1cm, right=4cm, top=2cm]{geometry}




\renewcommand\questionlabel{Question \thequestion} 

\pointsinrightmargin

\begin{document}


\begin{questions}
\question[20] Why is there air?
\question What if there were no air?
\begin{parts}
\part[10]Describe the effect on the balloon industry.
\part[10]Describe the effect on the aircraft industry.

\end{parts}
\end{questions}


\end{document}

在此处输入图片描述

答案1

一个非常简单的解决方案,无需过多考虑exam其工作原理,就是使用\partshook并更改\rightpointsmargin,这样所有内容就对齐了。不是很优雅,也是因为我通过反复试验找到了边距,但有效:

\renewcommand{\partshook}{\setlength{\rightpointsmargin}{-.212cm}}

梅威瑟:

\documentclass{exam}
\usepackage[utf8]{inputenc}
\usepackage[left=1cm, right=4cm, top=2cm]{geometry}

\renewcommand{\partshook}{\setlength{\rightpointsmargin}{-.212cm}}

\renewcommand\questionlabel{Question \thequestion}

\pointsinrightmargin

\begin{document}


\begin{questions}
\question[20] Why is there air?
\question What if there were no air?
\begin{parts}
\part[10]Describe the effect on the balloon industry.
\part[10]Describe the effect on the aircraft industry.

\end{parts}
\end{questions}


\end{document}

MWE 结果

subparts只要您仅在环境中使用它们,这也应该可以正常工作parts。否则,您可以对 执行相同操作\subpartshook

相关内容