我的问题中需要这些命令并进行以下对齐..即输出应该是这样的

我的问题中需要这些命令并进行以下对齐..即输出应该是这样的
\documentclass[12pt,a4paper]{exam}
\renewcommand{\baselinestretch}{1.2}
\oddsidemargin 0in \evensidemargin 0in \topmargin 0in \textheight
9.2in \textwidth 6.5in
%\hoffset -1in
%\voffset -1in
%\evensidemargin 14pt
\usepackage{amsmath,amsthm,amsfonts,amssymb,dsfont}
\pagestyle{headandfoot} \extraheadheight{.5in} \lhead[]{}
\chead[ \vskip .1in  MATHEMATICS\\
STANDARD X(CBSE)\\
      %\hrule
    \textbf{PAIR OF LINEAR EQUATIONS IN TWO VARIABLES} \linebreak
       \textbf{Time: 1 Hour}   \hskip 1.3in  \textsf{ }
       \hfill{\textbf{Max. Marks:30}}\vskip.05in \vskip -.5in]{}
\rhead[]{} \lfoot{David 7502878908} \cfoot{HOME TUITIONS}
\rfoot{\iflastpage{$\maltese\maltese\maltese \maltese
\maltese$}{Continued...\ldots}} \pointsinrightmargin
\newcommand{\ntt}{\normalfont\ttfamily}
%    command name
\newcommand{\cn}[1]{{\protect\ntt\bslash#1}}
\hfuzz1pc % Don't bother to report overfull boxes if overage is < 1pc

\newcommand{\thmref}[1]{Theorem~\ref{#1}}
\newcommand{\secref}[1]{\S\ref{#1}}
\newcommand{\lemref}[1]{Lemma~\ref{#1}}
%\newcommand{\bysame}{\mbox{\rule{3em}{.4pt}}\,}
\newcommand{\sqt}[1]{\sqrt{\smash[b] {#1}}}

%    \interval is used to provide better spacing after a [ that
%    is used as a closing delimiter.
\newcommand{\interval}[1]{\mathinner{#1}}

%    Notation for an expression evaluated at a particular condition. The
%    optional argument can be used to override automatic sizing of the
%    right vert bar, e.g. \eval[\biggr]{...}_{...}
\newcommand{\eval}[2][\right]{\relax
  \ifx#1\right\relax \left.\fi#2#1\rvert}

%    Enclose the argument in vert-bar delimiters:
\newcommand{\envert}[1]{\left\lvert#1\right\rvert}
\let\abs=\envert

%    Enclose the argument in double-vert-bar delimiters:
\newcommand{\enVert}[1]{\left\lVert#1\right\rVert}
\let\norm=\enVert
\newcommand{\pad}[2]{\frac{\der #1}{\der #2}}
\newcommand{\IC}{{\mathbb C}}
\newcommand{\IN}{{\mathbb N}}
\newcommand{\IR}{{\mathbb R}}
\newcommand{\gol}{\mbox{$\,${\rm Log}$\,$}}
\newcommand{\Log}{\ln}
\newcommand{\ov}[1]{\overline{\smash[b] {#1}}}
\newcommand{\Ndash}{\nobreakdash--}
\newcommand{\IE}{{\mathds{R}^n}}
\newcommand{\IF}{{\mathds{R}^m}}
\begin{document}

\hrule 

\vskip .1cm
{\hskip 2.5in \textbf{Part A} \hfill{}}

 \underline{Answer all the questions:}
  \begin{questions}
 \question Which subject you like very much?
 \choice mathematics
\choice physics
\cchoice chemisty %cchoice means that correct choice
\choic biology 

\end{questions}
\cfoot{$\maltese\maltese\maltese \maltese \maltese$} \rfoot{}
\end{document}

我的问题中需要这些命令并进行以下对齐..即输出应该是这样的。

1.Which subject you like very much?

(a) mathematics                      (b) physics
(c) chemistry                        (d) biology

我该怎么办呢?如果选择很长,它必须自动对齐...请帮帮我...

答案1

multicols包中的环境可能multicol适合您。您可以使用columnbreak在任意两个答案选项之间拆分列。如果答案的长度大致相同,则行可能会对齐,但如果答案的长度不同,则选项不会自动对齐。您可以使用选项\\[length]末尾的结构来增加空间,如第二个问题所示。但是,这不是自动的。

\documentclass{exam}
\usepackage{multicol}
\usepackage{lipsum}
\begin{document}
\begin{questions}

\question
Which subject you like very much?

\begin{multicols}{2}
\begin{choices}
    \choice Mathematics
    \choice Physics
    \columnbreak
    \choice Chemistry
    \correctchoice Biology
\end{choices}
\end{multicols}

\question
Do you like questions that require you to read long answers?

\begin{multicols}{2}
\begin{choices}
    \choice Yes, I do.
    \correctchoice No, I don't.\\[24pt]
    \columnbreak
    \choice Not if it is a hard subject that requires lots of concentration. Please do not make me have to read a very long answer. 
    \correctchoice Doesn't matter. I had the answers in advance. I don't have to read anything. So I do not really care how long the answer is.
\end{choices}
\end{multicols}

\end{questions}
\end{document}

在此处输入图片描述

相关内容