![问题右侧的分数标签](https://linux22.com/image/298660/%E9%97%AE%E9%A2%98%E5%8F%B3%E4%BE%A7%E7%9A%84%E5%88%86%E6%95%B0%E6%A0%87%E7%AD%BE.png)
我想在问题的右侧标注分数,但我不知道该使用什么命令。下图是我想要的结果。我希望 [5] 与问题对齐并位于右侧。有人能帮助我吗?
答案1
以下是使用类的示例代码exam
。
\documentclass[10pt,addpoints,answers]{exam}
\begin{document}
\uplevel{\centering\bfseries\underline{PART -- A} \\Answer all questions}
\begin{questions}
\pointsinrightmargin
\pointsdroppedatright
\marksnotpoints
%\marginpointname{mark}
\pointpoints{mark}{marks}
\pointformat{\themarginpoints}
\bracketedpoints
\question[4]
Some question here you would like to ask your students.
\droppoints
\question[4]
Some question here you would like to ask your students.
\droppoints
\uplevel{\centering OR}
\question
What are
\begin{parts}
\part[5]
marks
\droppoints
\part[5]
good answers
\droppoints
\end{parts}
\end{questions}
\end{document}
答案2
是的。使用 \text 的代码如下:
\documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation*} \text{$3. Using ~{} the~{} substitution$ $x$ $$=$$ $2sec~\sl{t},$}\\ \text{~{}show that} \\ \text{~{}$\int_{2}^{4} \frac{\sqrt{x^2-4}}{x^4}dx$ $=$ $\frac{\sqrt{3}}{32}$ $\qquad \qquad$ $(5) $} \end{equation*} \end{document
答案3
你可以得到如下所示的解决方案
代码:
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}
3.~{}By~{} using~{} the~{} substitution~{} x &= 2sec~\sl{t},\\
show that \\
\int_{2}^{4} \frac{\sqrt{x^2-4}}{x^4}dx &= \frac{\sqrt{3}}{32} \qquad \qquad (5)
\end{align*}
\end{document}
输出: