代码之家  ›  专栏  ›  技术社区  ›  bortzmeyer

在链接后显示URL?

  •  2
  • bortzmeyer  · 技术社区  · 15 年前

    hyperref is 
    \href{http://www.tug.org/applications/hyperref/}{documented in detail}. 
    It allows...
    

    在PDF输出中,它显示:

    hyperref is documented in detail. It allows...
    

    in the documentation .

    我使用的一些hyperref文件不是手工生成的,而是手工生成的 dblatex \href{...} 这可能不是一种选择。

    关于hyperref方面,请参见Will Robertson的解决方案。对于dblatex,我编写了一个定制脚本,通过复制 <ulink> 不再 necessary option .

    1 回复  |  直到 15 年前
        1
  •  2
  •   Will Robertson    15 年前

    例如,(未经测试)

    \newif\ifprint
    \printtrue
    \ifprint
      \let\oldhref\href
      \renewcommand\href[2]{%
        \oldhref{#1}{#2}%
        \footnote{\url{#1}}%
      }
    \fi
    

    当然,您仍然需要生成两个版本的文档,一个用于打印,一个用于屏幕。但我不确定你是否期望有什么不同 :)

    推荐文章