TeX - LaTeX Asked on November 28, 2020
Following-up this question and considering the two-column MWE below, I would like to
1- understand why the inter-line spacing inside minipage
is bigger than that of both tabular
and paracol
2- know what is missing for paracol
to make it have the same question layout (column width and figure vertical alignment) of the first two approaches of tabular
and minipage
documentclass{exam}
usepackage[a4paper, top=1.9cm, left=2cm, right=2cm, bottom=2.2cm]{geometry}
usepackage{mathtools,paracol}
usepackage{graphbox}
usepackage{caption}
setcolumnwidth{0.65linewidth,0.34linewidth}
begin{document}
begin{questions}
setlength{rightpointsmargin}{2.5cm}
pointsdroppedatright
marginpointname{%}
bigskip
question
begin{parts}
part
setlength{tabcolsep}{0mm}
begin{tabular}[t]{p{0.65linewidth}@{hspace{0.01linewidth}}p{0.34linewidth}}
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.65linewidth}
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.34linewidth}
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}
Both itemsep and parskip take on different values in the three examples, with the change occurring in begin{subparts}. This does not occur when using a parbox instead. Nor can I find the code responsible for the change.
I included the following to try to equalize both the horizontal and vertical spacing for the three solutions.
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.01textwidth
begin{document}
begin{questions}
setlength{rightpointsmargin}{2.5cm}
pointsdroppedatright
marginpointname{%}
bigskip
question
begin{parts}
part
setlength{tabcolsep}{0mm}
begin{tabular}[t]{@{}p{0.65linewidth}@{hspace{columnsep}}p{0.34linewidth}@{}}
Figure ref{test1} shows a pyramid $ABCD-E$. Suppose that $AE=13$, $AC=10$. Find the followings:theparskip
begin{subparts}
subpart[1] Height $ME$.theparskipdroppoints
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.65linewidth}{%
Figure ref{test3} shows a pyramid $ABCD-E$. Suppose that $AE=13$, $AC=10$. Find the followings:
%par parskip=theparskippar itemsep=theitemsep
begin{subparts}%rlap{parskip=theparskip{ }itemsep=theitemsep}
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.34linewidth}
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.34linewidth}
begin{paracol}{2}
Figure ref{test2} shows a pyramid $ABCD-E$. Suppose that $AE=13$, $AC=10$. Find the followings:theparskip
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}
Correct answer by John Kormylo on November 28, 2020
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP