如何让 LaTeX 自动将第一页的所有文本放在一列中,并将其余部分放在两列中?

如何让 LaTeX 自动将第一页的所有文本放在一列中,并将其余部分放在两列中?

正如标题所述,我希望文档的第一页为单列,其余为双列。这听起来很简单,但我希望有一种方法可以让 LaTeX 自动进行此断点,而不是(就像我到目前为止所做的那样)手动设置断点,可以使用mulitcol\onecolumn \twocolumn

因此,第一页看起来应该是这样的 在此处输入图片描述

其余部分看起来就像 在此处输入图片描述

我尝试进行firstpagestyle一些改变,但不知道如何做到这一点,而不必创建新的环境,在新环境中我仍然需要手动将文本分成两部分。

为了完整起见,这里有一个(非常)MWE

\documentclass[twocolumn]{article}
\usepackage[utf8]{inputenc}

\usepackage{lipsum}

\title{test}
\author{Thomas Jorna}
\date{July 2020}

\begin{document}
\maketitle
\section{Lorem}
\lipsum[1-30]
\end{document}

我该如何做到这一点同时保持文档文本不变?

答案1

向 John Kormylo 致歉;我花了很长时间撰写这篇文章,而您的评论在我完成之前就出现了,但我还是发布了我的答案。

TeX 逐段排版,并在每段末尾检查段落中是否应该有分页符。如果是,则排版段落的第一部分,插入分页符并移动段落的其余部分无需重新排版到下一页。这意味着,如果两页的页面样式不同,段落的底部将保留第一页的格式,而不会更改为第二页的格式。

该类memoir提供了一个命令\parnopar,可以无形地强制创建一个新段落。它的定义基于TeXbook练习14.15是:

\newcommand{\parnopar}{\parfillskip=0pt\par\parskip=0pt\noindent}

如果将其(括在括号中)放在第一页的最后一个单词之后,则以下文本将根据其布局排版在下一页上。

.... bottom line on the page {\parnopar}
first line for the next page ...

我不知道有什么方法可以自动完成此操作。处理您的文档并查看输出。然后编辑文档,{\parnopar}在难懂的段落中将 插入到适当的单词对之间。

下面的例子是为了表明段落分割在排版输出中是不可见的。

% useparnopar.tex
\documentclass{article}
\newcommand{\parnopar}{\parfillskip=0pt\par\parskip=0pt\noindent}

\begin{document}

This paragraph has many lines.
This paragraph includes many lines.
Many lines are typeset in this paragraph.
There are many lines in this paragraph.
This paragraph has many lines.
This paragraph includes many lines.
Many lines are typeset in this paragraph.
There are many lines in this paragraph. % {\parnopar}
This paragraph has many lines.
This paragraph includes many lines.
Many lines are typeset in this paragraph.
There are many lines in this paragraph.

Now for another paragraph with \verb|{\parnopar}|!

This paragraph has many lines.
This paragraph includes many lines.
Many lines are typeset in this paragraph.
There are many lines in this paragraph.
This paragraph has many lines.
This paragraph includes many lines.
Many lines are typeset in this paragraph.
There are many lines in this paragraph. {\parnopar}
This paragraph has many lines. 
This paragraph includes many lines.
Many lines are typeset in this paragraph.
There are many lines in this paragraph.

And something afterwards.

\end{document}

相关内容