我遇到了一个奇怪的问题,我的脚注中包含一个链接,但由于链接 URL 太长,它被拆分到下一页。这样就没问题了。奇怪的是,脚注被拆分成的下一页上的文本都可以使用拆分后的 URL 点击。
这可以修复吗?如何修复?
图片说明:
梅威瑟:
\documentclass[12pt,czech,]{article}
\usepackage{lmodern}
\usepackage{amssymb,amsmath}
\usepackage{ifxetex,ifluatex}
\usepackage{fixltx2e} % provides \textsubscript
\usepackage{fontspec}
\defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase}
\IfFileExists{microtype.sty}{%
\usepackage{microtype}
}{}
\usepackage[a4paper]{geometry}
\usepackage{bookmark}
\hypersetup{unicode=true,
pdftitle={Test},
pdfauthor={Václav Haisman},
pdfborder={0 0 0},
breaklinks=true}
\urlstyle{same} % don't use monospace font for urls
\usepackage{polyglossia}
\setmainlanguage[]{czech}
\IfFileExists{parskip.sty}{%
\usepackage{parskip}
}{% else
\setlength{\parindent}{0pt}
\setlength{\parskip}{6pt plus 2pt minus 1pt}
}
\setlength{\emergencystretch}{3em} % prevent overfull lines
% This makes sure that linked text's links shows as a footnote.
\makeatletter
\let\oldhref=\href
\renewcommand\href[2]{\oldhref{#1}{#2}\footnote{\url{#1}}}
\makeatother
\PassOptionsToPackage{backref}{hyperref}
% This allows line breaks in URL in more places.
\def\UrlBreaks{\do\/\do-\do.\do=\do_\do?\do\&\do\%\do\a\do\b\do\c\do\d\do\e\do\f\do\g\do\h\do\i\do\j\do\k\do\l\do\m\do\n\do\o\do\p\do\q\do\r\do\s\do\t\do\u\do\v\do\w\do\x\do\y\do\z\do\A\do\B\do\C\do\D\do\E\do\F\do\G\do\H\do\I\do\J\do\K\do\L\do\M\do\N\do\O\do\P\do\Q\do\R\do\S\do\T\do\U\do\V\do\W\do\X\do\Y\do\Z\do\0\do\1\do\2\do\3\do\4\do\5\do\6\do\7\do\8\do\9}
\usepackage{blindtext}
\title{Test}
\author{Václav Haisman}
\date{}
\begin{document}
\maketitle
{
\setcounter{tocdepth}{3}
\tableofcontents
}
\section{Test}\label{test-id}
\blindtext[2]
More text here more text here more text here more text here\footnote{\url{https://jjj.ilcyagb.pm/ernyvmbinar-cehmxhzl/prfv-n-ceiav-frk}}
až 10 \%\footnote{\url{http://www.example.com/prfv-znwv-ceiav-frk-cehzrear-i-17-yrgrpu-10-zynqvfgilpu-qbxbapr-b-qin-ebxl-qevir}}
more text here more text here more text here more text here more text here
more text here more text here more text here more text here more text here
more text here more text here more text here more text here more text here
more text here more text here more text here more text here more text here
more text here more text here more text here more text here more text here
more text here more text here more text here more text here more text here
more text here more text here more text here more text here more text here.
\end{document}
更新 1
以下是在 Overloaf 上的测试:https://www.overleaf.com/read/cmgygpypqzcb
有一件事,我正在使用 Evince。可能是 Acrobat Reader 没有问题而 Evince 有?在我测试过的所有查看器中,它都显示可点击的文本:Evince、Acrobat Reader 和 Firefox。
更新2
我发现如果我更改\setmainlanguage[]{czech}
为,\setmainlanguage[]{english}
那么换行结果就会改变,并且最后的脚注不会拆分到下一页。