\href 跨越页面边界导致第二列的链接混乱

\href 跨越页面边界导致第二列的链接混乱

我正在使用\href(来自hyperref 包)将一些链接放入正在使用两种语言排版的文档中paracol 包装XeTeX

为了编译它,我使用

texify -p --engine=xetex paramin.tex

如果在第一列中,我有一个跨越页面边界的链接,则命令链接到跨越页面边界\switchcolumn的目标后,包含链接的第一段。\href

下面是一个例子(我尽量把它写得简单些):

\documentclass[12pt]{article}
\usepackage{paracol}
\usepackage{hyperref}
\begin{document}
\begin{paracol}{2}
I see a strange phenomenon regarding the behaviour of \verb+\href+ and page breaks when using the \textit{paracol} package. This document is designed to show the behaviour. This paragraph contains a \href{http://tex.stackexchange.com}{link} to some website, this one works as expected.
\switchcolumn
This paragraph contains a link at the end that should actually point to the same website as the one in the left column, but it gets messed up by the link in column one which crosses a page boundary. Updating the MiKTeX packaged didn't help. \href{http://tex.stackexchange.com}{link}.
\switchcolumn
Here's a few empty lines to save me writing more text. As an example, I include a link to \href{http://www.brockhaus.de/}{my favourite search engine}.

~

~

~

~

~

~

~

~

~

~

~

~

~

~

~

~

~

~

~

~

~

~

~

~

Now we're all set I think. The link contained in this paragraph \href{http://www.error.com/}{is slightly longer than normal and crosses a page boundary}. This will result in it being repeated in the wrong place in column two on page one.
\switchcolumn
This again points to \href{http://www.brockhaus.de/}{my favourite search engine}. As only the first link in a column gets messed up, this one behaves as it should.
\end{paracol}
\end{document}

以下是最终文档的精心绘制的屏幕截图:

生成文档的屏幕截图

知道如何修复此问题吗?我对内容有一定的控制权,因此可以避免链接内出现分页符。

在这个例子中,只需添加或删除一个空行就可以修复生成的文档,因此,我很确定链接内的分页符与 paracol 的组合是罪魁祸首。

相关内容