如何设置 latex que paper 中问号的等长

如何设置 latex que paper 中问号的等长

我想让每道题的标记均匀地分布在试卷的右侧。如何在 latex 问答试卷中设置问号的等长?

\documentclass[aps,pra,floatfix,amsmath,preprint,showpacs,12pt]{revtex4}
\usepackage{graphicx}
\usepackage{amssymb}
%\usepackage{dsfont}
\usepackage{ulem}
\usepackage{float}
\restylefloat{figure}
\linespread{1}
\thispagestyle{empty}
\pagestyle{empty}
\topmargin=0.5cm \oddsidemargin=-0.9cm
\renewcommand{\baselinestretch}{1.05}
\begin{document}
\baselineskip=1.0\baselineskip

All questions are compulsory. \\
\begin{enumerate}
\item[Q. 1 (a)] My Question prove that ...? [Mark here]
\end{enumerate}
\end{document}

答案1

以下内容或许是一个好的开始:

在此处输入图片描述

\documentclass{article}
\usepackage{geometry,enumitem}
\geometry{margin=1cm}
\pagestyle{empty}
\newcommand{\marksA}[1]{\hfill\makebox[0pt][l]{~[#1]}}
\newcommand{\marksB}[1]{\hfill\makebox[0pt][r]{[#1]}}

\newcounter{newquestion}
\setlist[enumerate]{before={\stepcounter{newquestion}},label={Q.\ \thenewquestion (\alph*)},align=left}

\begin{document}
All questions are compulsory.

\begin{enumerate}
  \item My question prove that ...? [Mark here]
\end{enumerate}

\begin{enumerate}
  \item My question prove that ...? \marksA{10}
  \item My question prove that ...? \marksA{5}
  \item My question prove that ...? \marksA{1}
\end{enumerate}

\begin{enumerate}
  \item My question prove that ...? \marksB{10}
  \item My question prove that ...? \marksB{5}
  \item My question prove that ...? \marksB{1}
\end{enumerate}
\end{document}

\marksA或者\marksB将标记放在边缘的左/右对齐处。效果会最好,因为如果需要的话,\marksA它可以让您的问题位于整个块内。\textwidth

你会注意到我使用了article布局设置geometryenumitem用于列表处理。

相关内容