完整的 MWE:

完整的 MWE:

我的 中第一个多项选择题的间距有问题MWE。我不知道发生了什么。我以前遇到过这种问题,但那是因为换行不当。然而,这些问题在这里不存在。发生了什么?如果可能的话,我肯定也想知道详细的解释。

问题如图所示: 在此处输入图片描述

\documentclass{memoir}
\usepackage{multicol,tabularx,enumitem}

\setlist[enumerate]{itemsep=0pt}
\setenumerate[1]{label={(\Alph*)}}
\setlength{\columnseprule}{0.5pt}
\setlength{\columnsep}{15pt}
\newlist{choicelist}{enumerate}{2}
\setlist[choicelist]{label=(\Alph*),leftmargin=5mm}


\begin{document}


\begin{multicols}{2}
\begin{tabularx}{0.9\linewidth}{cX}
1.  &       MICROBE: \\
&   \begin{choicelist}
        \item       large marine animal
        \item       in order of time
        \item       tiny creature
        \item       no government
    \end{choicelist}
\end{tabularx}
%------------------------------------------------------------
\begin{tabularx}{\linewidth}{cX}
2.  &       INSCRIBE: \\
&   \begin{choicelist}
        \item   someone who tells stories
        \item       to write on something
        \item       indiscriminate
        \item       delete
    \end{choicelist}
\end{tabularx}
%------------------------------------------------------------
\begin{tabularx}{\linewidth}{cX}
3.  &       GEODE: \\
&   \begin{choicelist}
        \item   rock with a crystal inside
        \item       study of life
        \item       across nations
        \item       reptilian
    \end{choicelist}
\end{tabularx}
%------------------------------------------------------------
\begin{tabularx}{\linewidth}{cX}
\columnbreak
4.  &       PROPEL: \\
&   \begin{choicelist}
        \item       to push forward
        \item       to agree with something
        \item       proper
        \item       overly enthusiastic
    \end{choicelist}
\end{tabularx}
%------------------------------------------------------------
\begin{tabularx}{\linewidth}{cX}
5.  &       AUTONOMY: \\
&   \begin{choicelist}
        \item       charitable act
        \item       book written by more than one person
        \item       government that rules itself
        \item       recurring
    \end{choicelist}
\end{tabularx}
%------------------------------------------------------------
\begin{tabularx}{\linewidth}{cX}
6.  &       TRANSGRESS: \\
&   \begin{choicelist}
        \item       disagree
        \item       cross line of property
        \item       eliminate
        \item       cause an accident
    \end{choicelist}
\end{tabularx}
%------------------------------------------------------------
\begin{tabularx}{\linewidth}{cX}
\columnbreak
7.  &       AMORAL: \\
&   \begin{choicelist}
        \item       unable to decide
        \item       uncomfortable
        \item       a vague amount
        \item       having no morals
    \end{choicelist}
\end{tabularx}
%------------------------------------------------------------
\begin{tabularx}{\linewidth}{cX}
8.  &       COMINGLE: \\
&   \begin{choicelist}
        \item       direct
        \item       incorrect
        \item       repeating action
        \item       mix together
    \end{choicelist}
\end{tabularx}
%------------------------------------------------------------
\begin{tabularx}{\linewidth}{cX}
9.  &       ANARCHY: \\
&   \begin{choicelist}
        \item       a government that rules itself
        \item       a book written about yourself
        \item       no government
        \item       a type of bridge
    \end{choicelist}
\end{tabularx}

\end{multicols}
\end{document}    

答案1

第一个多项选择题是段落的开头。其余问题不是单独的段落,而是第一段的一部分,因此没有缩进。

您可以将其放置\noindent在第一个问题之前,或者(因为您说您喜欢第一个问题的外观)您可以\par在每个环境之后放置或换行符tabularx

我建议你为你的问题定义一个环境。比如,

\newcounter{myquestioncounter}
\newenvironment{myquestion}[1]
    {%
      \tabularx{\linewidth}{cX}%
      \stepcounter{myquestioncounter}\themyquestioncounter.\ 
      & #1: \\ & 
    }
    {%   
      \endtabularx
      \par
     }

它将更好地自动化您要完成的许多任务。您将能够编写:

\begin{myquestion}{MICROBE}
  \begin{choicelist}
    \item       large marine animal
    \item       in order of time
    \item       tiny creature
    \item       no government
  \end{choicelist}
\end{myquestion}

或者如果你加载environ包,你可以更有效地完成这件事,

\NewEnviron{varquestion}[1]
    {
      \begin{tabularx}{\linewidth}{cX}%
      \stepcounter{myquestioncounter}\themyquestioncounter.\ 
      & #1: \\ & 
      \begin{choicelist}
      \BODY
      \end{choicelist}
      \end{tabularx}\par
    }

然后将你的问题格式化为

\begin{varquestion}{INSCRIBE}
    \item someone who tells stories
    \item to write on something
    \item indiscriminate
    \item delete
\end{varquestion}

问题参数可以包含需要换行的文本,但你可能不希望:在句子末尾出现。因此,你可以将环境重新定义为

\NewEnviron{varquestion}[2][:]
    {
      \begin{tabularx}{\dimexpr\linewidth-1em}{cX}%
      \stepcounter{myquestioncounter}\themyquestioncounter.\ 
      & #2#1 \\ & 
      \begin{choicelist}
      \BODY
      \end{choicelist}
      \end{tabularx}\hspace*{1em}\par
    }

其中第一个参数是可选的,并假定您将以 结束问题:,但您可以这样调用它:

\begin{varquestion}[]{This is just a random question that may span more
than one line of the final document. }
    \item someone who tells stories
    \item to write on something
    \item indiscriminate
    \item delete
\end{varquestion}

另外,我改变了环境的宽度tabularx,否则文本就会直接碰到\columnseprule

完整的 MWE:

\documentclass{memoir}
\usepackage{multicol}
\usepackage[margin=1in]{geometry}
%..%
\usepackage{enumitem}
\setlist[enumerate]{itemsep=0pt}
\setenumerate[1]{label={(\Alph*)}}
\setlength{\columnseprule}{0.5pt}
\setlength{\columnsep}{15pt}
\newlist{choicelist}{enumerate}{2}
\setlist[choicelist]{label=(\Alph*),leftmargin=5mm,topsep=-3ex}
%..%
\usepackage{tabularx}
\usepackage{environ}
\newcounter{myquestioncounter}
\NewEnviron{testquestion}[2][:]
    {%
      \begin{tabularx}{\dimexpr\linewidth-1em}{cX}%
      \stepcounter{myquestioncounter}\themyquestioncounter.\ 
      & #2#1 \\ & 
      \begin{choicelist}
      \BODY
      \end{choicelist}
      \end{tabularx}\hspace*{1em}\par
    }
\begin{document}

\begin{multicols}{2}
\begin{testquestion}{MICROBE}
    \item       large marine animal
    \item       in order of time
    \item       tiny creature
    \item       no government
\end{testquestion}
%------------------------------------------------------------
\begin{testquestion}{INSCRIBE}
    \item someone who tells stories
    \item to write on something
    \item indiscriminate
    \item delete
\end{testquestion}
%------------------------------------------------------------
\begin{testquestion}[]{This is just a random question that may span more
than one line of the final document. }
    \item someone who tells stories
    \item to write on something
    \item indiscriminate
    \item delete
\end{testquestion}
%------------------------------------------------------------
\begin{testquestion}{GEODE}
        \item rock with a crystal inside
        \item study of life
        \item across nations
        \item reptilian
\end{testquestion}
%------------------------------------------------------------
\begin{testquestion}{PROPEL}
        \item to push forward
        \item to agree with something
        \item proper
        \item overly enthusiastic
\end{testquestion}
%------------------------------------------------------------
\begin{testquestion}{AUTONOMY}
        \item       charitable act
        \item       book written by more than one person
        \item       government that rules itself
        \item       recurring
\end{testquestion}
%------------------------------------------------------------
\begin{testquestion}{TRANSGRESS}
        \item       disagree
        \item       cross line of property
        \item       eliminate
        \item       cause an accident
\end{testquestion}
%------------------------------------------------------------
\begin{testquestion}{AMORAL}
        \item       unable to decide
        \item       uncomfortable
        \item       a vague amount
        \item       having no morals
\end{testquestion}
%------------------------------------------------------------
\begin{testquestion}{COMINGLE}
        \item       direct
        \item       incorrect
        \item       repeating action
        \item       mix together
\end{testquestion}
%------------------------------------------------------------
\begin{testquestion}{ANARCHY}
        \item       a government that rules itself
        \item       a book written about yourself
        \item       no government
        \item       a type of bridge
\end{testquestion}

\end{multicols}
\end{document} 

答案2

\documentclass{memoir}
\usepackage{multicol,tabularx,enumitem}

\setlist[enumerate]{itemsep=0pt}
\setenumerate[1]{label={(\Alph*)}}
\setlength{\columnseprule}{0.5pt}
\setlength{\columnsep}{15pt}
\newlist{choicelist}{enumerate}{2}
\setlist[choicelist]{label=(\Alph*),leftmargin=5mm}


\begin{document}

\noindent
\begin{multicols}{2}\noindent % \noindent here
\begin{tabularx}{0.9\linewidth}{cX}
1.  &       MICROBE: \\
&   \begin{choicelist}
        \item       large marine animal
        \item       in order of time
        \item       tiny creature
        \item       no government
    \end{choicelist}
\end{tabularx}
%------------------------------------------------------------
\begin{tabularx}{\linewidth}{cX}
2.  &       INSCRIBE: \\
&   \begin{choicelist}
        \item   someone who tells stories
        \item       to write on something
        \item       indiscriminate
        \item       delete
    \end{choicelist}
\end{tabularx}
%------------------------------------------------------------
\begin{tabularx}{\linewidth}{cX}
3.  &       GEODE: \\
&   \begin{choicelist}
        \item   rock with a crystal inside
        \item       study of life
        \item       across nations
        \item       reptilian
    \end{choicelist}
\end{tabularx}
%------------------------------------------------------------
\begin{tabularx}{\linewidth}{cX}
\columnbreak
4.  &       PROPEL: \\
&   \begin{choicelist}
        \item       to push forward
        \item       to agree with something
        \item       proper
        \item       overly enthusiastic
    \end{choicelist}
\end{tabularx}
%------------------------------------------------------------
\begin{tabularx}{\linewidth}{cX}
5.  &       AUTONOMY: \\
&   \begin{choicelist}
        \item       charitable act
        \item       book written by more than one person
        \item       government that rules itself
        \item       recurring
    \end{choicelist}
\end{tabularx}
%------------------------------------------------------------
\begin{tabularx}{\linewidth}{cX}
6.  &       TRANSGRESS: \\
&   \begin{choicelist}
        \item       disagree
        \item       cross line of property
        \item       eliminate
        \item       cause an accident
    \end{choicelist}
\end{tabularx}
%------------------------------------------------------------
\begin{tabularx}{\linewidth}{cX}
\columnbreak
7.  &       AMORAL: \\
&   \begin{choicelist}
        \item       unable to decide
        \item       uncomfortable
        \item       a vague amount
        \item       having no morals
    \end{choicelist}
\end{tabularx}
%------------------------------------------------------------
\begin{tabularx}{\linewidth}{cX}
8.  &       COMINGLE: \\
&   \begin{choicelist}
        \item       direct
        \item       incorrect
        \item       repeating action
        \item       mix together
    \end{choicelist}
\end{tabularx}
%------------------------------------------------------------
\begin{tabularx}{\linewidth}{cX}
9.  &       ANARCHY: \\
&   \begin{choicelist}
        \item       a government that rules itself
        \item       a book written about yourself
        \item       no government
        \item       a type of bridge
    \end{choicelist}
\end{tabularx}

\end{multicols}
\end{document}    

相关内容