TeXnik - Tips TeX and LaTeX


Welcome to the TeXnik website (under construction)

HTML and \url
TUG logo

Main page

Index
UK FAQ
Documentation
Software
CTAN
Search CTAN:

Statistics

Google c.t.t.

Google d.c.t.t.

 


 


Different Urls for html and LaTeX |  Macros as Argument | 


Different Urls for html and LaTeX
HTML should give
<a href=http://x.y.z>My Link</a>
DVI/PS should give
My Link (http://x.y.z)
Put the following in the preamble:
\usepackage{html}
 \usepackage{url}
 \latex{\renewcommand{\htmladdnormallink}[2]{#1 (\url{#2})}}
and use \htmladdnormallink{<linktext>}{<the url>} in the usual way.
Macro as an argument
If you have something like
\newcommand{\EMail}{muster@mann.de}
 E-Mail \url{\EMail}
it wouldn't work, because the \Mail macro isn't expanded. You have to use
\newcommand{\EMail}{muster@mann.de}
 E-Mail \expandafter\url\expandafter{\EMail}

local time: Sat Apr 20 06:54:24 CEST 2024 ; file is: 1763.75200231481 days old
contact webmaster _at_ TeXnik.de