两个小页面相邻:右侧垂直移动

两个小页面相邻:右侧垂直移动

嗨,这是我第一次在这里发帖。希望我能做得很好。我在设置两个相邻的迷你页面时遇到了问题。右边的那个总是垂直向下移动。这是我的示例代码:

\documentclass[a4paper,12pt]{scrartcl}
% --- Language Settings: ------------------------------------------------------

\usepackage{bbm, amssymb, amsmath, amsfonts}%fonttypes, mathtypes, etc.
\usepackage[german,ngerman,english]{babel}  %English and German for fancyref


% --- Textformat: -------------------------------------------------------------
\usepackage[utf8x]{inputenc}            %use of utf8x code
\usepackage[T1]{fontenc}                %Paket for umlauts
\usepackage{ulem}                       %Paket for underline text
\usepackage{enumitem}                   %Paket for enumerations
\usepackage[singlespacing]{setspace}    %for singlepspacecing
\usepackage{framed}                     %draws a frame around the text

\begin{document}

\hrule
\begin{minipage}[t]{0.5\textwidth}
    \begin{singlespace}
        \begin{enumerate}[label={\alph*}.]
                \item Questionnaire Number/ID: \dots
                \item Name of Community: \dots
                \item Date of Interview: \dots / 09 / 2014
                \item Time Interview started: \dots
                \item Enumerator´s Name: \dots
        \end{enumerate}
    \end{singlespace}
\end{minipage}
\begin{minipage}[t]{0.5\textwidth}
    \begin{singlespace}
        \begin{enumerate}[label=]
                \item
                \item Community Code/ID: \dots
                \item
                \item Time Interview ended: \dots
                \item Enumerator Code/ID: \dots
        \end{enumerate}
    \end{singlespace}
\end{minipage}
\medskip
\hrule
\smallskip

\end{document}

我尝试使用 \nointend,并尝试删除所有不必要的空白。我希望两个小页面彼此相邻,以便“社区名称”和“社区代码/ID”行位于同一行。

背景:这是一份调查问卷,线条应该“对齐”才能好看。

答案1

如果要对齐条目,请使用tabular

\documentclass[a4paper,12pt]{scrartcl}

\usepackage{booktabs}

\begin{document}

\noindent
\begin{tabular*}{\textwidth}{
  r@{ }l
  @{\extracolsep{\stretch{2}}}
  l
  @{\extracolsep{\stretch{1}}}
  l@{}
}
\toprule
a. & Questionnaire Number/ID: \dots       &&\\
b. & Name of Community: \dots             & Community Code/ID: \dots & \\
c. & Date of Interview: \dots / 09 / 2014 &&\\
d. & Time Interview started: \dots        & Time Interview ended: \dots & \\
e. & Enumerator´s Name: \dots             & Enumerator Code/ID: \dots & \\
\bottomrule
\end{tabular*}

\end{document}

\stretch这里播放第二列和第三列之间的空间是第三列和模拟第四列之间的空间。

在此处输入图片描述

答案2

添加几个\struts:

\documentclass[a4paper,12pt]{scrartcl}
% --- Language Settings: ------------------------------------------------------

\usepackage{bbm, amssymb, amsmath, amsfonts}%fonttypes, mathtypes, etc.
\usepackage[german,ngerman,english]{babel}  %English and German for fancyref


% --- Textformat: -------------------------------------------------------------
\usepackage[utf8x]{inputenc}            %use of utf8x code
\usepackage[T1]{fontenc}                %Paket for umlauts
\usepackage{ulem}                       %Paket for underline text
\usepackage{enumitem}                   %Paket for enumerations
\usepackage[singlespacing]{setspace}    %for singlepspacecing
\usepackage{framed}                     %draws a frame around the text
\begin{document}
\noindent
\hrule
\begin{minipage}[t]{0.5\textwidth}
    \begin{singlespace}
        \begin{enumerate}[label={\alph*}.]
                \item \strut Questionnaire Number/ID: \dots
                \item Name of Community: \dots
                \item \strut Date of Interview:                            ... / 09 / 2014
                \item Time Interview started: \dots
                \item Enumerator´s Name: \dots
        \end{enumerate}
    \end{singlespace}
\end{minipage}%
\begin{minipage}[t]{0.5\textwidth}
    \begin{singlespace}
        \begin{enumerate}[label={}]
                \item \strut
                \item Community Code/ID: \dots
                \item \strut
                \item Time Interview ended: \dots
                \item Enumerator Code/ID: \dots
        \end{enumerate}
    \end{singlespace}
\end{minipage}
\medskip
\hrule
\smallskip

\end{document}

在此处输入图片描述

您可能想添加两个sleftmargin=*,nosep的选项。enumerateminipage

相关内容