我正在制作考试类型的问题,其中我很难对齐文本。这是我的输出:
我希望文本与我绘制的线的右侧对齐,问题与左侧相隔 1cm,但当我开始使用问题的数字大于一位数时,问题就开始了。Latex 对我来说有点新,所以我想知道是否有人可以帮助我。我的代码是:
\documentclass[20pt]{exam}
\usepackage{relsize}
\usepackage{helvet}
\usepackage{setspace}
\usepackage{amsfonts, amsmath, amssymb}
\usepackage{enumitem}
\usepackage[document]{ragged2e}
\renewcommand{\familydefault}{\sfdefault}
\renewcommand{\thequestion}{\huge \arabic{question}}
\everymath={\displaystyle}
\renewcommand*{\choicelabel}{\large \thechoice)}
\renewcommand*{\choicelabel}{
\ifnum\value{choice}>1
\makebox[4em][r]{\LARGE \thechoice)}
\else
\LARGE \thechoice)
\fi
}
\makeatother
\makeatletter
% from exam.cls, line 4107:
\renewenvironment{choices}%
{\list{\choicelabel}%
{\usecounter{choice}\def\makelabel##1{\hss\llap{##1}}%
\setlength{\leftmargin}{15pt}%
\def\choice{%
\if@correctchoice
\color@endgroup
\endgroup
\fi
\item
\do@choice@pageinfo
} % choice
\def\CorrectChoice{%
\if@correctchoice
\color@endgroup
\endgroup
\fi
\ifprintanswers
\ifhmode \unskip\unskip\unvbox\voidb@x \fi
\begingroup \color@begingroup \@correctchoicetrue
\CorrectChoice@Emphasis
\fi
\item
\do@choice@pageinfo
} % CorrectChoice
\let\correctchoice\CorrectChoice
\labelwidth\leftmargin\advance\labelwidth-\labelsep
\topsep=0pt
\partopsep=0pt
\choiceshook
}%
}%
{\if@correctchoice \color@endgroup \endgroup \fi \endlist}
\makeatother
\begin{document}
\LARGE
\begin{spacing}{1.5}
\begin{questions}
\question Si $\mathlarger{a \in \mathbb{Z}^{-}}$ y $\mathlarger{b \in \mathbb{Z}^{+}}$, ¿Cuál(es) de las siguientes expresiones \textbf{siempre} es(son) menor(es) que cero?
\begin{enumerate}[label=\Roman*)]
\item $\mathlarger{a - b}$
\item $\mathlarger{a + b}$
\item $\mathlarger{a(a - b)}$
\end{enumerate}
\begin{choices}
\choice Solo I
\choice Solo II
\choice Solo III
\choice Solo I y III
\choice I, II y III
\end{choices}
\question
\question
\question
\question
\question
\question
\question
\question
\question
\question
\question Si $\mathlarger{a \in \mathbb{Z}^{-}}$ y $\mathlarger{b \in \mathbb{Z}^{+}}$, ¿Cuál(es) de las siguientes expresiones \textbf{siempre} es(son) menor(es) que cero?
\begin{enumerate}[label=\Roman*)]
\item $\mathlarger{a - b}$
\item $\mathlarger{a + b}$
\item $\mathlarger{a(a - b)}$
\end{enumerate}
\begin{choices}
\choice Solo I
\choice Solo II
\choice Solo III
\choice Solo I y III
\choice I, II y III
\end{choices}
\end{questions}
\end{spacing}
\end{document}