兩欄:一欄用於提問;另一個尋求答案

兩欄:一欄用於提問;另一個尋求答案

我正在使用該類別exam

\documentclass{12pt,a3paper,landscape}{exam}

我想將我的論文分成兩欄。一欄應該用於問題,在該問題的對面將給出問題#和解決它的空間。

我已閱讀問題如何獲得空白列?,但不確定如何新增問題&

這可能嗎?

答案1

可能需要進行一些調整來滿足您的需求,但我認為以下內容可能會有所幫助。我定義了一個名為qanda(「問題和答案」)的「兩部分」環境,由一個名為 的命令分割\nextpart,用於每對問題和答案。您可以使用\mbox{}\vspace{...}after來微調分配給每個答案的空間\nextpart

在此輸入影像描述

\documentclass[12pt,landscape]{article}

\usepackage[showframe,a4paper]{geometry} % change to a3paper if needed
\usepackage{etoolbox}
\usepackage{enumitem}

\newtoggle{morethanoneparagraph}
\togglefalse{morethanoneparagraph}

\newcommand{\mycolumnwidth}{0.45\textwidth}

\newenvironment{qanda}{% Q&A
    \newcommand\nextpart{%
        \end{enumerate}
        \end{minipage}
        \begin{minipage}[t]{\mycolumnwidth}
        \iftoggle{morethanoneparagraph}{%
            \begin{enumerate}[label=\roman*.,resume*=q] 
                \item
        }{%
            \global\toggletrue{morethanoneparagraph}
            \begin{enumerate}[label=\roman*.,series=q] 
                \item
        }
    }
    \begin{minipage}[t]{\mycolumnwidth}
    \iftoggle{morethanoneparagraph}{
        \begin{enumerate}[label=\arabic*.,resume*=a] 
            \item 
    }{
        \begin{enumerate}[label=\arabic*.,series=a] 
            \item 
    }
}{
    \end{enumerate}
    \end{minipage}
    \vspace{\baselineskip}
}

\setlength{\parindent}{0pt}
\begin{document}

\begin{qanda}
Prove or disprove $P=NP$
\nextpart \mbox{}\vspace{5cm}
\end{qanda}


\begin{qanda}
Solve
\[
    x^2-x+1=0\,.
\]
\nextpart
\mbox{}\vspace{6cm}
\end{qanda}

\begin{qanda}
Disprove Fermat's Last Theorem.
\nextpart
``Mrs Wiles\ldots please get your husband on the phone\ldots''
\end{qanda}

\end{document}

相關內容