以下示例显示 multicols 将分页符视为单独的排序。
\documentclass{article}
\usepackage[margin=0.5in]{geometry}\geometry{a4paper}
\usepackage{multicol,tikz}
\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{multicols}{3}\raggedright
\drawrect{1}
\drawrect{2}
\drawrect{3}
\drawrect{4}
\drawrect{5}
\drawrect{6}
\drawrect{7}
\drawrect{8}
\drawrect{9}
\drawrect{10}
\drawrect{11}
\drawrect{12}
\end{multicols}
\renewcommand{\drawrect}[1]{\begin{tikzpicture} \draw (-2.5,-3.5) rectangle (2.5,3.5); \node at (0,0) {#1}; \end{tikzpicture}}
\begin{multicols}{3}\raggedright
\drawrect{1}
\drawrect{2}
\drawrect{3}
\drawrect{4}
\drawrect{5}
\drawrect{6}
\drawrect{7}
\drawrect{8}
\drawrect{9}
\drawrect{10}
\drawrect{11}
\drawrect{12}
\end{multicols}
\end{document}
我希望第二次排序与第一次完全一样。
使用 parcolumns 的示例:
\documentclass{article}
\usepackage[margin=0.5in]{geometry}\geometry{a4paper}
\usepackage{multicol,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]{3}
\colchunk{
\drawrect{1}
\drawrect{2}
\drawrect{3}
\drawrect{4}}
\colchunk{
\drawrect{5}
\drawrect{6}
\drawrect{7}
\drawrect{8}}
\colchunk{
\drawrect{9}
\drawrect{10}
\drawrect{11}
\drawrect{12}}
\end{parcolumns}
\renewcommand{\drawrect}[1]{\begin{tikzpicture} \draw (-2.5,-3.5) rectangle (2.5,3.5); \node at (0,0) {#1}; \end{tikzpicture}}
\begin{parcolumns}[nofirstindent]{3}
\colchunk{
\drawrect{1}
\drawrect{2}
\drawrect{3}
\drawrect{4}}
\colchunk{
\drawrect{5}
\drawrect{6}
\drawrect{7}
\drawrect{8}}
\colchunk{
\drawrect{9}
\drawrect{10}
\drawrect{11}
\drawrect{12}}
\end{parcolumns}
\end{document}
答案1
multicols
是一种将文本材料切分为“供阅读”的列的环境,阅读意味着在下一页重新开始该过程。所以您的示例准确地显示了它应该显示的内容。如果这不是您想要的,那么显然这multicols
不是适合您的解决方案。
您似乎想要制作一个表格或矩阵(也许是非文本材料?),并允许其跨页显示。您可以尝试这样做,longtable
或者supertabular
他们提供跨页结构,但输入是水平的,而您的排序仍然是垂直的(至少看起来如此)。