Last active
October 13, 2018 05:40
-
-
Save aminophen/8168ca9dd366e68f52c9fe82256ed5e1 to your computer and use it in GitHub Desktop.
ページをまたがるリンク
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass[dvipdfmx]{article} | |
\usepackage[colorlinks=true]{hyperref} | |
\makeatletter | |
% \@makecol をこのように修正すれば, | |
% 「脚注内にリンクが無い」という条件さえ満たせば,正常になる | |
\usepackage{etoolbox} | |
\patchcmd{\@makecol}{% | |
\color@begingroup | |
\normalcolor | |
\footnoterule | |
\unvbox \footins | |
\color@endgroup | |
}{% | |
\color@begingroup | |
\normalcolor | |
\special{pdf:nolink}% | |
\footnoterule | |
\unvbox \footins | |
\special{pdf:link}% | |
\color@endgroup | |
}{}{} | |
\makeatother | |
\begin{document} | |
% このソースでは脚注にもリンクがある | |
A\footnote{CTAN web: \href{https://ctan.org/}{CTAN} here!} | |
\vspace*{42\baselineskip} | |
\href{https://tug.org/}{TUG TUG TUG TUG TUG TUG TUG TUG TUG TUG TUG TUG TUG TUG TUG TUG} | |
\end{document} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://oku.edu.mie-u.ac.jp/tex/mod/forum/discuss.php?d=2312 にあるように
ここには問題が二つあり,
[2] については,実は dvipdfmx ならマクロレベルで対処可能(dvipdfm のマニュアルに載っている pdf:nolink (suspend) と pdf:link (resume) を使えば回避できる)。pdfTeX にはこのような機能がなさそうなので,マクロだけでは対処不可と思われる(要 pdfTeX の改修)。
[1] については dvipdfmx を改修するする必要がある。だが,dvispc を改良すればいけるかも?