parcolumn nofirstindent 工作不正常?

parcolumn nofirstindent 工作不正常?

下面的代码在每个框的开始前留下了一些额外的空间......nofirstindent我想应该将其设置为 0,但事实并非如此:

\documentclass{article}
\usepackage{tikz}
\usepackage{parcolumns}
\scrollmode

\begin{document}
\newcommand{\drawrect}[1]{\begin{tikzpicture} \draw (-1.5,-1.5) rectangle (1.5,1.5); \node at (0,0) {#1}; \end{tikzpicture}}

\begin{parcolumns}[nofirstindent,rulebetween,distance=0pt]{3}
\colchunk{
\drawrect{1}\\
\drawrect{2}\\
\drawrect{3}\\
}
\colchunk{
\drawrect{4}\\
\drawrect{5}\\
\drawrect{6}\\
}
\colchunk{
\drawrect{7}\\
\drawrect{8}\\
\drawrect{9}\\
}
\colplacechunks
\end{parcolumns}


\end{document}

parcolumns如果能将其自身置于边缘之间就更好了。

答案1

您无需parcolumn.sty为此修改 。只需%在 后添加 即可\colchunk{

\documentclass{article}
\usepackage{tikz}
\usepackage{parcolumns}
\scrollmode

\begin{document}
\newcommand{\drawrect}[1]{\begin{tikzpicture} \draw (-1.5,-1.5) rectangle (1.5,1.5); \node at (0,0) {#1}; \end{tikzpicture}}

\begin{parcolumns}[nofirstindent,rulebetween,distance=0pt,]{3}
\colchunk{%
\centering
\drawrect{1}\\
\drawrect{2}\\
\drawrect{3}\\
}
\colchunk{%
\centering
\drawrect{4}\\
\drawrect{5}\\
\drawrect{6}\\
}
\colchunk{%
\centering
\drawrect{7}\\
\drawrect{8}\\
\drawrect{9}\\
}
\colplacechunks
\end{parcolumns}

\end{document}

要使矩形居中,只需使用\centering内部列块。

enter image description here

相关内容