我正在尝试关联包含URL
(哈希)符号的#
,请参阅上游代码here:
HTML
输出的所有内容都按预期工作,但LaTeX
输出(PDF
)会让事情变得讨厌。它失败了:
! Illegal parameter number in definition of \Hy@tempa.
<to be read again>
p
l.153 ...ageref{classgdcm_1_1ImageRegionReader}}{}
?
查看生成的代码,我看到了:
\href{http://dicom.nema.org/medical/dicom/current/output/chtml/part05/sect_8.2.html#para_4bcb841e-c6bf-4e26-82a5-3fad3c942da0}
我不能简单地用反斜杠转义#
符号,因为它会破坏HTML
输出(但修复LaTeX
输出)。我发现在bigfoot
之前包含hyperref
的{{3}}可以解决此类问题,但是这对我在doxyfile中使用以下技巧不起作用:
@@ -1650,7 +1650,7 @@ PAPER_TYPE = letter
# If left blank no extra packages will be included.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-EXTRA_PACKAGES =
+EXTRA_PACKAGES = bigfoot
# The LATEX_HEADER tag can be used to specify a personal LaTeX header for the
# generated LaTeX document. The header should contain everything until the first
是否有任何简单的内容可以包含#
符号的网址,该网址适用于HTML
和LaTeX
输出?
% Hyperlinks (required, but should be loaded last)
\usepackage{ifpdf}
\ifpdf
\usepackage[pdftex,pagebackref=true]{hyperref}
\else
\usepackage[ps2pdf,pagebackref=true]{hyperref}
\fi
所以我无法在\usepackage{hyperref}
之后明确\usepackage{bigfoot}
,因为这会产生某种冲突。
Package hyperref Message: Driver (autodetected): hpdftex.
(/usr/share/texlive/texmf-dist/tex/latex/hyperref/hpdftex.def
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty))
! LaTeX Error: Option clash for package hyperref.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.101 \else