LaTeX 考试包:更改 \pointstorightmargin 长问题的标记位置

LaTeX 考试包:更改 \pointstorightmargin 长问题的标记位置

我正在做一份考卷,除了超过两行的长题的标记位置外,一切都很好。

我使用\pointstorightmarin将标记放在特定位置。当问题较短(一行)时,这样做没问题,但当问题超过 2 行时,标记放在第一行(如考试包所述),就会出现问题。

您能帮忙添加几行以便我可以\pointstorightmargin在整份试卷上使用,但我可以改变某些长问题的位置吗?(就像图片显示的那样)

非常感谢。

此致

约翰尼

\documentclass[11pt, addpoints]{exam}

\usepackage{amsmath,amsthm,amssymb,multicol,enumerate}

%PRINT ANSWERS

%\printanswers

\bracketedpoints

\pointsinrightmargin

\setlength{\rightpointsmargin}{1.4cm}

\begin{document} 

\begin{questions}

\question  Consider the equation

$$
\frac{\sqrt{\sqrt{2}-1}}{\sin x}+\frac{\sqrt{\sqrt{2}+1}}{\cos x}=2 \sqrt[4]{8}, \quad 0<x<\frac{\pi}{2} \text {. }$$

\begin{parts}

    \part [2] Given that $\sin \left(\frac{\pi}{8}\right)=\frac{1}{2} \sqrt{2-\sqrt{2}}$ and $\cos \left(\frac{\pi}{8}\right)=\frac{1}{2} \sqrt{2+\sqrt{2}}$, verify that $x=\frac{\pi}{8}$ is a solution to the equation.\textbf{I want the marks right after the question but not in the first line.} 

    \part [5] Hence find the other solution to the equation.

\end{parts}

\end{questions}

\end{document}

在此处输入图片描述

答案1

像这样:

在此处输入图片描述

代码:

\documentclass[11pt, addpoints]{exam}

\usepackage{amsmath,amsthm,amssymb,multicol,enumerate}

%PRINT ANSWERS

%\printanswers

\bracketedpoints

\pointsinrightmargin

\setlength{\rightpointsmargin}{1.4cm}
\pointsdroppedatright %<-- line added (page 20 of doc)
\begin{document} 
    
    \begin{questions}
        
        \question  Consider the equation
        
        $$
        \frac{\sqrt{\sqrt{2}-1}}{\sin x}+\frac{\sqrt{\sqrt{2}+1}}{\cos x}=2 \sqrt[4]{8}, \quad 0<x<\frac{\pi}{2} \text {. }$$
        
        \begin{parts}
            
            \part  [2]  Given that $\sin \left(\frac{\pi}{8}\right)=\frac{1}{2} \sqrt{2-\sqrt{2}}$ and $\cos \left(\frac{\pi}{8}\right)=\frac{1}{2} \sqrt{2+\sqrt{2}}$, verify that $x=\frac{\pi}{8}$ is a solution to the equation. \droppoints % <--code added
            
            \part [5] Hence find the other solution to the equation.We make this question longer to have at last two lines.\droppoints % <--code added
            
        \end{parts}
        
    \end{questions}
    
\end{document}

相关内容