似乎在编译 pdf 时,内部的符号#
会\url
产生\footnote
错误。这是由平均能量损失以下。
\documentclass[12pt,twoside]{report}
\usepackage{booktabs}
\usepackage[headheight=18pt,a4paper, width=150mm, top=25mm, bottom=25mm, bindingoffset=6mm, headsep=18pt]{geometry}
\usepackage[spanish,es-noquoting]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[hyphens]{url}
\renewcommand{\thefootnote}{\alph{footnote}}
\usepackage{csquotes}
\usepackage[numbers, super]{natbib}
\usepackage{notoccite}
\usepackage[version=3]{mhchem}
\usepackage{chemmacros}
\chemsetup{
formula = chemformula ,
modules = all
}
\usepackage{hyperref}
\begin{document}
\footnote{\url{https://chemicalize.com/#/calculation}}
\end{document}
输出:
! Illegal parameter number in definition of \Hy@tempa.
<to be read again>
/
l.20 ...rl{https://chemicalize.com/#/calculation}}
You meant to type ## instead of #, right?
Or maybe a } was forgotten somewhere earlier, and things
are all screwed up? I'm going to assume that you meant ##.
! Illegal parameter number in definition of \Hy@tempa.
<to be read again>
我搜索了类似的帖子,#
但什么也没找到。有什么帮助吗?
答案1
答案2
我在使用 Overleaf 时遇到了类似的问题,一个简单的解决方法是用“\”转义“#”。
参见示例:
\footnote{Some constrains apply, see \url{https://developers.google.com/analytics/devguides/reporting/realtime/v3/devguide\#constraints}}.