具有一致空白列的多列布局

具有一致空白列的多列布局

因此,我希望创建一个标准化测试,其中数学问题在页面左侧,在页面右侧留有计算空间。我的目标是获得干净的代码,这样我就不必为每一页拆分文本。这是我尝试执行的操作的示例图像。

如果我要使用多列环境,我必须每四个问题就拆分文本,然后在每一页上重新开始。有没有更简单的方法可以做到这一点?长表是否可以工作,我可以在左侧单元格中填满所有问题,并在每一页上标上“使用此空间进行图解”的标题?或者也许是绝对定位节点?

在此处输入图片描述

梅威瑟:

\documentclass[letterpaper,twoside,openright]{memoir}
\usepackage{lipsum}
\usepackage{multicol}
\usepackage[bmargin=1in]{geometry}


%---------          Preamble
\newsavebox{\fmbox}
\newenvironment{fmpage}[1]
{\begin{lrbox}{\fmbox}\begin{minipage}{#1}}
{\end{minipage}\end{lrbox}\fbox{\usebox{\fmbox}}} %

\newcommand{\psechead}[1]
              {\vspace*{1in}
              {\noindent
              {\center 
              {\textbf{#1}}}}}


%---------          Document
\begin{document}
\psechead{SECTION 2 \\ Time - 35 Minutes \\ 37 Questions \\}



%---------          Directions

\begin{fmpage}{\textwidth}
\underline{\textbf{Directions:}} In this section there are four possible answers after each question. Choose which one is best. You may use the blank space at the right of the page for figuring problems.

\medskip

\underline{\textbf{Note:}} Figures are not drawn to scale.
\end{fmpage}

%---------          Questions

\end{document}

答案1

您可以尝试使用该paracol包来代替multicol

这样,你可以把所有的问题写在第一栏,然后,在发出

\switchcolumn

您可以在第二列开始为每个页面编写代码,例如

{\hfill USE THIS SPACE FOR FIGURING}\vfill{\hfill\small GO ON THE NEXT PAGE}

对于所有页面和

{\hfill USE THIS SPACE FOR FIGURING}

最后一页。

MWE(请注意,我稍微修改了你的fmpage环境以免溢出右边距):

\documentclass[letterpaper,twoside,openright]{memoir}
\usepackage{lipsum}
\usepackage{paracol}
\usepackage[bmargin=1in]{geometry}


%---------          Preamble
\newsavebox{\fmbox}
\newenvironment{fmpage}[1]
{\noindent\begin{lrbox}{\fmbox}\begin{minipage}{\dimexpr#1-2\fboxrule-2\fboxsep}}
{\end{minipage}\end{lrbox}\fbox{\usebox{\fmbox}}\vspace*{.2in}} %

\newcommand{\psechead}[1]
              {\vspace*{1in}
              {\noindent
              {\centering
              {\textbf{#1}}}}}


%---------          Document
\begin{document}
\psechead{SECTION 2 \\ Time - 35 Minutes \\ 37 Questions \\}



%---------          Directions

\begin{fmpage}{\textwidth}
\underline{\textbf{Directions:}} In this section there are four possible answers after each question. Choose which one is best. You may use the blank space at the right of the page for figuring problems.

\medskip

\underline{\textbf{Note:}} Figures are not drawn to scale.
\end{fmpage}

%---------          Questions
\begin{paracol}{2}
\begin{enumerate}
    \item This is a question. Choose the appropriate answer.
      \begin{enumerate}
        \item Answer.
        \item Answer.
        \item Answer.
        \item Answer.
      \end{enumerate}
\end{enumerate}
\begin{enumerate}
    \item This is a question. Choose the appropriate answer.
      \begin{enumerate}
        \item Answer.
        \item Answer.
        \item Answer.
        \item Answer.
      \end{enumerate}
\end{enumerate}
\begin{enumerate}
    \item This is a question. Choose the appropriate answer.
      \begin{enumerate}
        \item Answer.
        \item Answer.
        \item Answer.
        \item Answer.
      \end{enumerate}
\end{enumerate}
\begin{enumerate}
    \item This is a question. Choose the appropriate answer.
      \begin{enumerate}
        \item Answer.
        \item Answer.
        \item Answer.
        \item Answer.
      \end{enumerate}
\end{enumerate}
\newpage
\begin{enumerate}
    \item This is a question. Choose the appropriate answer.
      \begin{enumerate}
        \item Answer.
        \item Answer.
        \item Answer.
        \item Answer.
      \end{enumerate}
\end{enumerate}
\begin{enumerate}
    \item This is a question. Choose the appropriate answer.
      \begin{enumerate}
        \item Answer.
        \item Answer.
        \item Answer.
        \item Answer.
      \end{enumerate}
\end{enumerate}
\begin{enumerate}
    \item This is a question. Choose the appropriate answer.
      \begin{enumerate}
        \item Answer.
        \item Answer.
        \item Answer.
        \item Answer.
      \end{enumerate}
\end{enumerate}
\begin{enumerate}
    \item This is a question. Choose the appropriate answer.
      \begin{enumerate}
        \item Answer.
        \item Answer.
        \item Answer.
        \item Answer.
      \end{enumerate}
\end{enumerate}
\begin{enumerate}
    \item This is a question. Choose the appropriate answer.
      \begin{enumerate}
        \item Answer.
        \item Answer.
        \item Answer.
        \item Answer.
      \end{enumerate}
\end{enumerate}
\begin{enumerate}
    \item This is a question. Choose the appropriate answer.
      \begin{enumerate}
        \item Answer.
        \item Answer.
        \item Answer.
        \item Answer.
      \end{enumerate}
\end{enumerate}
\newpage
\begin{enumerate}
    \item This is a question. Choose the appropriate answer.
      \begin{enumerate}
        \item Answer.
        \item Answer.
        \item Answer.
        \item Answer.
      \end{enumerate}
\end{enumerate}
\begin{enumerate}
    \item This is a question. Choose the appropriate answer.
      \begin{enumerate}
        \item Answer.
        \item Answer.
        \item Answer.
        \item Answer.
      \end{enumerate}
\end{enumerate}

\switchcolumn

\vspace*{\baselineskip}
{\hfill USE THIS SPACE FOR FIGURING}\vfill{\hfill\small GO ON THE NEXT PAGE}
\newpage
{\hfill USE THIS SPACE FOR FIGURING}\vfill{\hfill\small GO ON THE NEXT PAGE}
\newpage
{\hfill USE THIS SPACE FOR FIGURING}
\end{paracol}

\end{document} 

输出:

在此处输入图片描述

答案2

我很好奇是否可以用 来实现这一点flowfram。这比longtable我以前粗暴地使用 好多了。(根据 karkoeller 的回答,它是否有任何可取之处,我留给读者练习。)

flowfram允许您将文档主体分成不同的框架,并指定文本应如何在其中流动(或不流动)。在这种情况下,我们本质上想要的是在第一页上有一个特殊的框架,用于考试标题和说明,在左侧有一个框架,问题可以从一页流到另一页,在右侧有一个框架,只包含使用空间进行计算的标准说明。第一页之后,我们不需要特殊标题,所以我们只需要两个框架占据文本的整个高度。

所以基本上我们需要定义 5 个框架:

  1. examheadstatic仅出现在第一页的框架;
  2. firstqnsflow第一页的框架不会侵蚀标题;
  3. firstfiguringstatic第一页的框架,它不会占用标题,除非我们将文本放在那里,否则文本也无法流入其中;
  4. mainqnsflow为所有后续页面提供框架,问题可以通过该框架流转;
  5. mainfiguringstatic所有后续页面的框架,除非我们将文本放在那里,否则文本无法流入其中。

请注意,由于文本会穿过左侧的框架,因此如果您不想出现这种情况,则必须防止问题跨页。我已经使用\framebreak下面的注释调用说明了如何做到这一点。

结果如下:

使用 <code>flowfram</code> 进行检查

代码如下:

\documentclass[letterpaper,twoside,openright]{memoir}
\usepackage{kantlipsum}
\usepackage[bmargin=1in]{geometry}
\usepackage{enumitem}
\setlist[enumerate,1]{labelindent=0em,align=left,label=\arabic*.}
\setlist[enumerate,2]{label=(\Alph*)}
\usepackage{flowfram}
\newstaticframe[1]{\textwidth}{.25\textheight}{0pt}{.8\textheight}[examhead]
\newflowframe[1]{.5\textwidth}{.75\textheight}{0pt}{0pt}[firstqns]
\newflowframe[>1]{.5\textwidth}{\textheight}{0pt}{0pt}[mainqns]
\newstaticframe[1]{.5\textwidth}{.75\textheight}{.5\textwidth}{0pt}[firstfiguring]
\newstaticframe[>1]{.5\textwidth}{\textheight}{.5\textwidth}{0pt}[mainfiguring]
\setstaticcontents*{firstfiguring}{%
   \centering USE THIS SPACE FOR FIGURING.\vspace*{\fill} }
\setstaticcontents*{mainfiguring}{ \centering USE THIS SPACE FOR FIGURING.\vspace*{\fill} }
\makeoddfoot{headings}{}{}{CONTINUED ON NEXT PAGE.}
\makeevenfoot{headings}{}{}{CONTINUED ON NEXT PAGE.}

%---------          Preamble
\newsavebox{\fmbox}
\newenvironment{fmpage}[1]
{\begin{lrbox}{\fmbox}\begin{minipage}{#1}}
{\end{minipage}\end{lrbox}\fbox{\usebox{\fmbox}}} %

\newcommand{\psechead}[1]
              {\vspace*{1in}
              {\noindent
              {\center
              {\textbf{#1}}}}}

\begin{staticcontents*}{examhead}

\psechead{SECTION 2 \\ Time - 35 Minutes \\ 37 Questions \\}

\begin{fmpage}{\textwidth}
\underline{\textbf{Directions:}} In this section there are four possible answers after each question. Choose which one is best. You may use the blank space at the right of the page for figuring problems.

\medskip

\underline{\textbf{Note:}} Figures are not drawn to scale.
\end{fmpage}
\end{staticcontents*}



%---------          Document
\begin{document}

%---------          Questions
\raggedright
\begin{enumerate}[series=myqns]
  \item This is the first question. It is about aardvarks and shampoo.
    \begin{enumerate}
      \item This is an answer.
      \item This answer is wrong.
      \item This answer is weird.
      \item This answer is just like the others.
    \end{enumerate}
   \item This is the second question. This question needs no answer.
     \begin{enumerate}
       \item This answer needs no question.
       \item This answer needs a particular question.
       \item This answer needs a pedantic question.
       \item This answer needs no question today.
      \end{enumerate}
   \item This is the fourth question. This question needs a new home.
     \begin{enumerate}
       \item This answer needs happy question.
       \item This answer needs a great question.
       \item This answer needs furry question.
       \item This answer needs sad question.
      \end{enumerate}
   \item This is the third question. It is misplaced and has wandered.
     \begin{enumerate}
       \item This answer needs a question.
       \item This answer needs some question.
       \item This answer needs no question.
       \item This answer needs any question.
      \end{enumerate}
%     \framebreak% uncomment this if you don't want the next question broken across pages
   \item This is the fifth question. This question needs no answer.
     \begin{enumerate}
       \item This answer needs a better question.
       \item This answer needs every question.
       \item This answer needs nobody's question.
       \item This answer needs someone's question.
      \end{enumerate}
    \item \kant[1-2]
     \begin{enumerate}
       \item Kant.
       \item Not Kant.
       \item Maybe Kant.
       \item Who's Kant?
      \end{enumerate}
\end{enumerate}
\makeoddfoot{headings}{}{}{}% we don't want continuation text on the last page whether it is odd or even!
\makeevenfoot{headings}{}{}{}

\end{document}

这样做的一个好处是,您不需要知道有多少页,也不需要手动分页(如果您不介意问题跨页的话)。而且您不必担心在每一页上都放置 USE SPACE... 指令 - 您只需为第 1 页设置一次,为第 1 页之后的所有页面设置一次,然后就忘掉它了。

相关内容