2

LaTeX hyperref 包在几个方面让我感到困惑。这是我的特殊问题。

在我的文档中,命令

\footnote{
\url{http://www.boston.com/news/science/articles/2010/04/25/new_atlas_shows_the_state_of_nature_as_well_as_the_nature_of_states/}
}

工作得很好 - pdflatex 只生成有效的链接。

但是命令

\newcommand{\webref}[1]{\footnote{\url{#1}}}

\webref{http://www.boston.com/news/science/articles/2010/04/25/new_atlas_shows_the_state_of_nature_as_well_as_the_nature_of_states/
}

生成链接

file:///C|/eb/qrbook/%20http://www.boston.com/news/science/articles/2010/04/25/new_atlas_shows_the_state_of_nature_as_well_as_the_nature_of_states/

有人能告诉我额外的“file://...”来自哪里,以及如何摆脱它吗?

4

1 回答 1

1

疯狂的猜测:你确定你没有在任何地方引入任何无关的空间吗?如果我在之前引入换行符,我可以重现该行为#1。(专业提示:%在多行命令的最后一个字符后面加上一个,这样 LaTeX 就不会处理换行符。)

于 2011-08-24T21:31:42.050 回答