假设由于外部原因与风格有关,但与 (La)TeX 无关我不想在这里讨论,我希望允许cleveref
在“第 xxx 节”内换行?即,我很高兴
...[一些很长的公式]... 在第节
4.10.7 你会找到完整的证明。
“引理 xxx”、“定义 xxx”以及所有类似情况也是如此。我如何允许cleveref
引入换行符?
答案1
该软件包crossreftools
(当前版本为 0.6,可在 CTAN 上使用)提供了两个名为\crthypercref
and的宏,\crthyperCref
它们的作用基本类似于\cref
and \Cref
(带有nameinlink
选项),允许中断交叉引用并像cleveref
以前一样显示,但仅限于标准格式,即它不考虑某些\crefformat
设置(但这在我的软件包的 TODO 列表中!)
如果不需要超链接,请改用\crtcref
和\crtCref
。
\documentclass{article}
\usepackage{hyperref}
\usepackage[nameinlink]{cleveref}% nameinlink is not really necessary
\usepackage{crossreftools}
\begin{document}
% Just for testing:
\parindent=0em
\section{A very long, long, long, long, long, long, long, long, long, long, long, long, long, long, long, long, long, long , long, long, long, long, long, long section title} \label{foosection}
Using \verb!\crthypercref!
Now some dummy text in order to force breaking at the end of the line: \crthypercref{foosection} we see...
Using \verb!\crthyperCref!
Now some dummy text in order to force breaking at the end of the line: \crthyperCref{foosection} we see...
Using \verb!\crtcref!
Now some dummy text in order to force breaking at the end of the line: \crtcref{foosection} we see...
Using \verb!\crtCref!
Now some dummy text in order to force breaking at the end of the line: \crtCref{foosection} we see...
Using \verb!\cref!
Now some dummy text in order to force breaking at the end of the line: \cref{foosection} we see...
Using \verb!\Cref!
Now some dummy text in order to force breaking at the end of the line: \Cref{foosection} we see...
Using \verb!\cref! again with extra letters on the line
Now some dummy text in order to force breaking at the end of the line (ext): \cref{foosection} we see...
Using \verb!\Cref! again with extra letters on the line
Now some dummy text in order to force breaking at the end of the line (ext): \Cref{foosection} we see...
\end{document}