在LaTeX中布局平行列?

问题描述 投票:0回答:1

我正在寻求如下布置段落:1。在介绍中,我将在所有列中包含段落。然后平行地跟随两列反对意见。它不同于两列布局,两列将是平行的,左侧的内容将始终保留在左侧,右侧的内容始终位于多个页面的右侧。即使左列的参数量较短,右列的参数也不应浮动到左列。

以下是HTML中的示例:https://www.biblegateway.com/passage/?search=1+Corinthians+15&version=CCB;KJ21用于比较不同的翻译。

以下是我尝试达到的效果。

\documentclass{report}
\usepackage[english]{babel}
\usepackage{blindtext}
\begin{document}
\section{Introduction}
Here are the normal paragraph crossing colmuns.

\blindtext

\begin{minipage}[t]{0.5\textwidth}
  \section{Argument on the Left}
  Because I am on the left, so must I be not right?

\end{minipage}\begin{minipage}[t]{0.5\textwidth}
  \section{Argument on the Right}
  Because I am on the right, so I must be right!

  \blindtext
\end{minipage}
\end{document}

它几乎达到了效果,除了两列之间没有间隙。

以下是结果的屏幕截图:enter image description here

什么是更好的解决方案?

如何通过导出到PDF(通过LaTex)在组织模式下实现相同的目标?

latex org-mode
1个回答
1
投票

要分隔列,使用较小的小型数并在它们之间添加空格就足够了。小型邮件是盒子,您可以使用固定空间(~~~或\ hspace {}),但橡胶空间\ hfill更好。

\usepackage[english]{babel}
\usepackage{blindtext}
\begin{document}
\section{Introduction}
Here are the normal paragraph crossing colmuns.

\blindtext

\noindent\begin{minipage}[t]{0.48\textwidth}
  \section{Argument on the Left}
  Because I am on the left, so must I be not right?
\end{minipage}%
\hfill%
\begin{minipage}[t]{0.48\textwidth}
  \section{Argument on the Right}
  Because I am on the right, so I must be right!

  \blindtext
\end{minipage}
\end{document}

enter image description here

\noindent避免正常的段落间距和\hfill“推动左边和右边缘的minipage towrads。

但它不是最好的解决方案。您将无法正确管理分页符,并且有一个特定的程序包可以完全按照您的要求进行操作。

paracol定义了一个具有2个(或更多)列的并行环境,并提供了一种通过在col之间切换来“同步”它们的方法。它负责分页,绝对是你想要的。

这是paracol的一个例子

\documentclass{report}
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage{paracol}
\begin{document}
\section{Introduction}
Here are the normal paragraph crossing colmuns.

\blindtext

\begin{paracol}{2}
  \section{Argument on the\\ Left}
  Because I am on the left, so must I be not right?

  \switchcolumn
  \section{Argument on the\\ Right}
  Because I am on the right, so I must be right!

  \blindtext
\end{paracol}
\end{document}

enter image description here

正如您所看到的,列之间的节编号是一致的,但如果您不愿意,可以通过多种方式自定义包。看看documentation另外请注意,我必须添加一个手动换行符以使节标题格式正确,但这是一个小缺点。

关于org-mode,我使用它,但我没有出口经验,也无法真正帮助你。但是,通过paracol的灵活性,您可以找到一些方法来定义满足您需求的宏。也许如果您提供组织模式导出,人们可以尝试找到解决方案。

© www.soinside.com 2019 - 2024. All rights reserved.