![LaTeX 考试包:更改 \pointstorightmargin 长问题的标记位置](https://linux22.com/image/461424/LaTeX%20%E8%80%83%E8%AF%95%E5%8C%85%EF%BC%9A%E6%9B%B4%E6%94%B9%20%5Cpointstorightmargin%20%E9%95%BF%E9%97%AE%E9%A2%98%E7%9A%84%E6%A0%87%E8%AE%B0%E4%BD%8D%E7%BD%AE.png)
我正在做一份考卷,除了超过两行的长题的标记位置外,一切都很好。
我使用\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}