考试:两栏题目

考试:两栏题目

后续行动这个问题考虑到下面的两列 MWE,我想

1-理解为什么里面的行间距minipage比和的都tabularparacol

2- 知道缺少什么,以paracol使其具有与前两种方法相同的问题布局(列宽和图形垂直对齐)tabularminipage

在此处输入图片描述

\documentclass{exam}
\usepackage[a4paper, top=1.9cm, left=2cm, right=2cm, bottom=2.2cm]{geometry}
\usepackage{mathtools,paracol}
\usepackage{graphbox}
\usepackage{caption}

\setcolumnwidth{0.65\linewidth,0.34\linewidth}

\begin{document}
    \begin{questions}
        \setlength{\rightpointsmargin}{2.5cm}
        \pointsdroppedatright
        \marginpointname{\%}
        \bigskip
        \question
        \begin{parts}
            \part
            \setlength{\tabcolsep}{0mm}
            \begin{tabular}[t]{p{0.65\linewidth}@{\hspace{0.01\linewidth}}p{0.34\linewidth}}
                Figure \ref{test1} shows a pyramid $ABCD-E$. Suppose that $AE=13$, $AC=10$. Find the followings:
                \begin{subparts}
                    \subpart[1] Height $ME$.\droppoints
                    \subpart[2] Area of base square $ABCD$.\droppoints
                    \subpart[2] Volume of pyramid $ABCD-E$.\droppoints
                \end{subparts} & \includegraphics[width=\linewidth,align=t]{example-image-a}
                \captionof{figure}{tabular approach}\label{test1}
            \end{tabular}
        \end{parts}
        %
        \question
        \begin{parts}
            \part
            \begin{minipage}[t]{0.65\linewidth}
                Figure \ref{test3} shows a pyramid $ABCD-E$. Suppose that $AE=13$, $AC=10$. Find the followings:
                \begin{subparts}
                    \subpart[1] Height $ME$.\droppoints
                    \subpart[2] Area of base square $ABCD$.\droppoints
                    \subpart[2] Volume of pyramid $ABCD-E$.\droppoints
                \end{subparts}
            \end{minipage}%
            \hfill
            \begin{minipage}[t]{0.34\linewidth}
                \includegraphics[width=\linewidth,align=t]{example-image-b}
                \captionof{figure}{minipage approach}\label{test3}
            \end{minipage}
        \end{parts}
        %
        \question
        \begin{parts}
            \part
            \begin{paracol}{2} 
                Figure \ref{test2} shows a pyramid $ABCD-E$. Suppose that $AE=13$, $AC=10$. Find the followings:
                \begin{subparts}
                    \subpart[1] Height $ME$.\droppoints
                    \subpart[2] Area of base square $ABCD$.\droppoints
                    \subpart[2] Volume of pyramid $ABCD-E$.\droppoints
                \end{subparts}
                \switchcolumn
                \begin{figure}[ht]
                    \includegraphics[width=\linewidth]{example-image-c}
                    \caption{paracol approach}\label{test2}
                \end{figure}
            \end{paracol}
        \end{parts}
    \end{questions}
\end{document}

答案1

在三个示例中,\itemsep 和 \parskip 的值都不同,变化发生在 \begin{subparts} 中。使用 \parbox 时不会发生这种情况。我也找不到导致变化的代码。

我纳入了以下内容,尝试均衡三种解决方案的水平和垂直间距。

\documentclass{exam}
\usepackage[a4paper, top=1.9cm, left=2cm, right=2cm, bottom=2.2cm,showframe]{geometry}
\usepackage{mathtools,paracol}
\usepackage{graphbox}
\usepackage{caption}

\columnsep=0.01\textwidth

\begin{document}
    \begin{questions}
        \setlength{\rightpointsmargin}{2.5cm}
        \pointsdroppedatright
        \marginpointname{\%}
        \bigskip
        \question
        \begin{parts}
            \part
            \setlength{\tabcolsep}{0mm}
            \begin{tabular}[t]{@{}p{0.65\linewidth}@{\hspace{\columnsep}}p{0.34\linewidth}@{}}
                Figure \ref{test1} shows a pyramid $ABCD-E$. Suppose that $AE=13$, $AC=10$. Find the followings:\the\parskip
                \begin{subparts}
                    \subpart[1] Height $ME$.\the\parskip\droppoints
                    \subpart[2] Area of base square $ABCD$.\droppoints
                    \subpart[2] Volume of pyramid $ABCD-E$.\droppoints
                \end{subparts} & \includegraphics[width=\linewidth,align=t]{example-image-a}
                \captionof{figure}{tabular approach}\label{test1}
            \end{tabular}
        \end{parts}
        %
        \question
        \begin{parts}
            \part
            \parbox[t]{0.65\linewidth}{%
                Figure \ref{test3} shows a pyramid $ABCD-E$. Suppose that $AE=13$, $AC=10$. Find the followings:
                %\par parskip=\the\parskip\par itemsep=\the\itemsep
                \begin{subparts}%\rlap{parskip=\the\parskip{ }itemsep=\the\itemsep}
                    \subpart[1] Height $ME$.\droppoints
                    \subpart[2] Area of base square $ABCD$.\droppoints
                    \subpart[2] Volume of pyramid $ABCD-E$.\droppoints
                \end{subparts}
            }\hfill
            \begin{minipage}[t]{0.34\linewidth}
                \includegraphics[width=\linewidth,align=t]{example-image-b}
                \captionof{figure}{minipage approach}\label{test3}
            \end{minipage}
        \end{parts}
        %
        \question
        
        \begin{parts}
            \part
            \setcolumnwidth{\dimexpr \textwidth-\columnsep-0.34\linewidth}
            \begin{paracol}{2} 
                Figure \ref{test2} shows a pyramid $ABCD-E$. Suppose that $AE=13$, $AC=10$. Find the followings:\the\parskip
                \begin{subparts}
                    \subpart[1] Height $ME$.\droppoints
                    \subpart[2] Area of base square $ABCD$.\droppoints
                    \subpart[2] Volume of pyramid $ABCD-E$.\droppoints
                \end{subparts}
                \switchcolumn
                \begin{figure}[ht]
                    \includegraphics[width=\linewidth]{example-image-c}
                    \caption{paracol approach}\label{test2}
                \end{figure}
            \end{paracol}
        \end{parts}
    \end{questions}
\end{document}

相关内容