考试:paracol \setcolumnwidth 对于双列部分无法按预期工作

考试:paracol \setcolumnwidth 对于双列部分无法按预期工作

0.34\linewidth为什么第二列的图像没有按照预期填充宽度?

在此处输入图片描述

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

\begin{document}
    \begin{questions}
        
        \setlength{\rightpointsmargin}{2.5cm}
        \pointsdroppedatright
        \marginpointname{\%}
        
        \question
        \begin{parts}
            \setcolumnwidth{0.65\linewidth,0.34\linewidth}
            \part
            \begin{paracol}{2}
                Figure \ref{test3} shows a pyramid $ABCD-E$. Suppose that $AE=13$, $AC=10$. Find the followings:\the\parskip
                \begin{subparts}
                    \subpart[1] Height $ME$.\droppoints
                \end{subparts}
                \switchcolumn
                    \includegraphics[width=\linewidth]{example-image-c}
                    \captionof{figure}{paracol approach}\label{test3}
            \end{paracol}
        \end{parts}
    \end{questions}
\end{document}

答案1

由于 是paracol在部分内开始的,因此缩进 ( \@totalleftmargin) 适用于两列。另请注意\linewidth=\columnwidth-\@totalleftmargin

与 tabular 或 minipage 不同,paracol 占用整个\textwidth,而不仅仅是剩余的\linewidth。缩进已应用里面列。图形环境会忽略缩进,就像在普通列中一样。

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

\makeatletter
\definecolumnpreamble{1}{\hskip-\@totalleftmargin}
\makeatother

\begin{document}
    \begin{questions}
        
        \setlength{\rightpointsmargin}{2.5cm}
        \pointsdroppedatright
        \marginpointname{\%}
        
        \question
        \begin{parts}
            \setcolumnwidth{0.65\linewidth}% The second column entry is ignored for a two column paracol
            \part
            \begin{paracol}{2}
                Figure \ref{test3} shows a pyramid $ABCD-E$. Suppose that $AE=13$, $AC=10$. Find the followings:\the\parskip
                \begin{subparts}
                    \subpart[1] Height $ME$.\droppoints
                \end{subparts}
                \switchcolumn
                    \includegraphics[width=\columnwidth]{example-image-c}
                    \captionof{figure}{paracol approach}\label{test3}
            \end{paracol}
        \end{parts}
    \end{questions}
\end{document}

相关内容