Debian Codegraph @

texmf-dist/doc/latex/ximera/src/link.dtx

raw
1 % Hyperlinks to outside documents
2 % \begin{macrocode}
3 %<*classXimera>
4 \newcommand*{\link}[2][]{#1%
5 \ifthenelse{\equal{#1}{}}%
6 {\footnote{Link: \url{#2}}}%
7 {\footnote{See #1 at \url{#2}}}
8 }
9 %</classXimera>
10 % \end{macrocode}
11
12
13 % \begin{macrocode}
14 %<*htXimera>
15 % This is a command used in versions of documents created with
16 % these classes; in Jim's opinion it should be deprecated for |\href|
17 % Bart on the other hand likes |\link|
18 \renewcommand*{\link}[2][]{%
19 \ifthenelse{\equal{#1}{}}%
20 {\url{#2}}
21 {\href{#2}{#1}}}
22 %\renewcommand*{\link}[2][]{%
23 %\ifthenelse{\equal{#1}{}}%
24 %{\url{#2}}
25 %{\href{#2}{#1}}}
26
27 % because hyperref redefines stuff atbegindocument, we do too.
28 \AtBeginDocument{\renewcommand{\ref}[1]{\HCode{<a class="reference" href="\##1">#1</a>}}}
29
30 %</htXimera>
31 % \end{macrocode}