使用 paracol 交錯列

使用 paracol 交錯列

我試圖創建本質上是時間性的「並行」文字。例如,第二作者寫了開頭,第一作者寫了第二部分,第四作者寫了第三部分,第三作者寫了第四部分,第四作者寫了第六部分,等等...文字不應對齊,但應允許讀者按順序在這些部分之間移動。我已經檢查了 paracol 文件並用谷歌搜尋了這個問題。如果我錯誤地指定了問題或忽略了資源,我深表歉意。我已經添加了 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}

已編譯程式碼的第一頁顯示第二列中的第一段、第一列中的第二段和第四列中的第三段

相關內容