我正在尝试创建具有时间性质的“平行”文本。例如,第二作者写了开头,第一作者写了第二部分,第四作者写了第三部分,第三作者写了第四部分,第四作者写了第五部分,第一作者写了第六部分,等等……文本不应该对齐,但应该允许读者按顺序在这些部分之间移动。我检查了 paracol 文档并在 Google 上搜索了这个问题。如果我错误地指定了问题或忽略了资源,请原谅。我已包含 MWE。TIA。
\documentclass{report}
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage{paracol}
\begin{document}
\centering Introduction \\
\raggedright
This is an introductory paragraph. \\
The document should be able to ``bounce'' back and forth between columns. For example, columns 2, 1, 4, 3, 2, 1, 4, 3, \dots
\begin{paracol}{4}
\textbf{This is the second paragraph and should align with the bottom of the first paragraph (second column).}
\switchcolumn*[1]
\textbf{This is the first paragraph.}
\blindtext
\switchcolumn*[0]
\textbf{This is the fourth paragraph and should align with the bottom of the third paragraph (fourth column).}
\blindtext
\switchcolumn*[3]
\textbf{This is the third paragraph and should align with the bottom of the second paragraph (first column).}
\blindtext
\switchcolumn*[2]
\end{paracol}
\end{document}
答案1
你可以这样做paracol
并且您的代码非常接近。
如果您查看汇编,您会发现段落在单独的列中交错排列,但只是向右跳一列,而不是跳到指定的列,并且指定的列号实际上正在排版。这是因为预期用途是\switchcolumn[i]*
(这对于 LaTeX 语法来说可以说是不寻常的)。
最重要的是,\switchcolumn
文本需要放在前面而不是后面(文本会立即排版,因此要根据前面的\switchcolumn
指令进行排版)。之后,文本要么需要按照正确的垂直/时间顺序排列,要么输入(连同一些参数以指示顺序)到一些宏中,这些宏可以根据需要存储和排序段落。前者自然要容易得多。
\documentclass{report}
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage{paracol}
\begin{document}
This is an introductory paragraph.
The document should be able to ``bounce'' back and forth between columns. For example, columns 2, 1, 4, 3, 2, 1, 4, 3, \dots
\begin{paracol}{4}
\switchcolumn[1]*
\textbf{This is the first paragraph.}
\blindtext
\switchcolumn[0]*
\textbf{This is the second paragraph and should align with the bottom of the first paragraph (second column).}
\switchcolumn[3]*
\textbf{This is the third paragraph and should align with the bottom of the second paragraph (first column).}
\blindtext
\switchcolumn[2]*
\textbf{This is the fourth paragraph and should align with the bottom of the third paragraph (fourth column).}
\blindtext
\end{paracol}
\end{document}