带有脚注和超链接的 Paracol 包导致无效链接

带有脚注和超链接的 Paracol 包导致无效链接

我想使用该paracol包来实现双列布局。除了脚注超链接之外,其他一切都运行良好。这些似乎在 paracol 环境中不起作用。

参见这个最小的例子:

\documentclass{article}

\usepackage{paracol}
\usepackage{hyperref}

\footnotelayout{m}

\begin{document}
    \begin{paracol}{2}
        This is a text with a footnote on the first page.\footnote{My first footnote.}
        \switchcolumn
        Another column without footnote.
    \end{paracol}
    \pagebreak
    \begin{paracol}{2}
        Next page with columns.
        \switchcolumn
        Just another column.
    \end{paracol}
    \pagebreak

    Now I have a text outside of paracol with a footnote.\footnote{Outside of paracol.}
    \begin{paracol}{2}
         Back in paracol another column.
        \switchcolumn
         This time the second column has the footnote.\footnote{Footnote in paracol.}
    \end{paracol}
\end{document}

paracol 环境之外的脚注的超链接可以正常工作,但其他的则不起作用。

在日志中我收到以下消息:

pdfTeX warning (dest): name{Hfootnote.3} has been referenced but does not exi
st, replaced by a fixed one

pdfTeX warning (dest): name{Hfootnote.1} has been referenced but does not exist
, replaced by a fixed one

这是不受支持还是我遗漏了什么? 编辑:paracol 版本是 2018/12/31 v1.35。

答案1

我怀疑这个组合从未经过测试/调试。看来锚点从未添加到脚注中。您可以使用以下命令手动添加它们。如果锚点之前存在,这将生成“重复锚点”消息。

也许可以进行全面修复,但这需要深入研究 paracol 和 hyperref 的间隙。

\documentclass{article}
\usepackage{hyperref}
\usepackage{paracol}
\footnotelayout{m}

\newcommand{\PcolFoot}{\raisebox{\ht\strutbox}{\hypertarget{Hfootnote.\theHfootnote}{}}}

\begin{document}
    \begin{paracol}{2}
        This is a text with a footnote on the first page.\footnote{\PcolFoot My first footnote.}
        \switchcolumn
        Another column without footnote.
    \end{paracol}
    \pagebreak
    \begin{paracol}{2}
        Next page with columns.
        \switchcolumn
        Just another column.
    \end{paracol}
    \pagebreak

    Now I have a text outside of paracol with a footnote.\footnote{Outside of paracol.}
    \begin{paracol}{2}
         Back in paracol another column.
        \switchcolumn
         This time the second column has the footnote.\footnote{\PcolFoot Footnote in paracol.}
    \end{paracol}
\end{document}

相关内容