在考试类别中将所有标记/点对齐到右侧

在考试类别中将所有标记/点对齐到右侧

我想学习如何对齐标记(向右)并始终在新行上开始问题。

我的 MWE:

\documentclass[a4paper,12pt]{exam}
\usepackage{amsmath}
\pointsinrightmargin

\renewcommand\choicelabel{(\Alph{choice})} 
\renewcommand{\choiceshook}{%
    \setlength{\leftmargin}{25mm}% 
    \setlength{\labelwidth}{\labelsep }%
    }

\renewcommand{\questionlabel}{ \textbf{Question \thequestion}:}

\begin{document}
\begin{questions}
    
    \question[1]  Start this line on a new line and align the marks with the rest of the paper.
    \begin{choices} \choice 1 \choice 2 \choice 2 \choice 3 \end{choices}
    
    \question[2]  Drop and align this one too.
    \begin{choices} \choice 6 \choice 3 \choice 2 \choice 0 \end{choices}
    
    \question[3]
    Drop and align this sentence too!
    
    \question Drop and align this sentence one too!
    
    \begin{parts} % Keep this part as it is.
        \part[4] Keep as it is.
        \part[5] Keep as it is.
        \part
        Consider this and that:
        \begin{subparts}
            \subpart[6] This one is aligned with the parts.
            \subpart[7] So is this one.
        \end{subparts}
    \end{parts}
\end{questions}
\end{document}

我尝试使用

\setlength{\rightpointsmargin}{15mm}

但它只是转移了所有的标记,但我感兴趣的是那些已经越过页面的标记。

理想情况下,这就是我希望一直发生的事情(无论我是否修改问题/部分/选择标签/震动)。

预期结果

编辑:更新代码

\documentclass[a4paper,12pt]{exam}
\usepackage{amsmath}
\usepackage[showframe=true]{geometry}
\pointsinrightmargin
\pointname{}
\pointformat{\textbf{\thepoints}}

\qformat{{\textbf{Question \thequestion}}\hfill\textbf{\thepoints}\hspace{-1.5cm}}

\renewcommand\choicelabel{(\Alph{choice})} 
\renewcommand{\choiceshook}{%
    \setlength{\leftmargin}{25mm}% 
    \setlength{\labelwidth}{\labelsep}%
    }


\begin{document}
\begin{questions}
    
    \question[1]  Start this line on a new line and align the marks with the rest of the paper.
    \begin{choices} \choice 1 \choice 2 \choice 2 \choice 3 \end{choices}
    
    \question[2]  Drop and align this one too.
    \begin{choices} \choice 6 \choice 3 \choice 2 \choice 0 \end{choices}
    
    \question[3]
    Drop and align this sentence too!
    
    \question Drop and align this sentence one too!
    
    \begin{parts} % Keep this part as it is.
        \part[4] Keep as it is.
        \part[5] Keep as it is.
        \part
        Consider this and that:
        \begin{subparts}
            \subpart[6] This one is aligned with the parts.
            \subpart[7] So is this one.
        \end{subparts}
    \end{parts}
\end{questions}
\end{document}

答案1

丑陋的补丁:

\documentclass[a4paper,12pt]{exam}
\usepackage{amsmath}
\usepackage[showframe=true]{geometry}
\pointsinrightmargin
\pointname{}
\pointformat{\textbf{\thepoints}}

\qformat{{\textbf{Question \thequestion}}\hfill%
\rlap{\hspace*{14.5mm}\textbf{\thepoints}}
}

\renewcommand\choicelabel{(\Alph{choice})} 
\renewcommand{\choiceshook}{%
    \setlength{\leftmargin}{25mm}% 
    \setlength{\labelwidth}{\labelsep}%
    }


\begin{document}
\begin{questions}
    
    \question[1]  Start this line on a new line and align the marks with the rest of the paper.
    \begin{choices} \choice 1 \choice 2 \choice 2 \choice 3 \end{choices}
    
    \question[2]  Drop and align this one too.
    \begin{choices} \choice 6 \choice 3 \choice 2 \choice 0 \end{choices}
    
    \question[3]
    Drop and align this sentence too!
    
    \question Drop and align this sentence one too!
    
    \begin{parts} % Keep this part as it is.
        \part[4] Keep as it is.
        \part[5] Keep as it is.
        \part
        Consider this and that:
        \begin{subparts}
            \subpart[6] This one is aligned with the parts.
            \subpart[7] So is this one.
        \end{subparts}
    \end{parts}
\end{questions}
\end{document}

相关内容