## tex4ht - Bugs: bug #131, url/ olinkurl do not expand macros

Show feedback again

You are not allowed to post comments on this tracker with your current authentification level.

## bug #131: url/ olinkurl do not expand macros

 Submitted by: Akim Demaille Submitted on: Tue 25 May 2010 11:52:57 AM EEST Category: None Priority: 5 - Normal Severity: 5 - Normal Status: Fixed Privacy: Public Assigned to: CV Radhakrishnan Open/Closed: Closed

Sat 04 Sep 2010 02:43:46 PM EEST, comment #1:

\documentclass{article}
\usepackage{hyperref}

\newcommand{\myUrl}{http://www.gnu.org}

\urldef{\myURL}\url{http://www.gnu.org}

\begin{document}

\begin{description}
\item[Query:] The url macro does not behave as expected in tex4ht: if its argument is actually a macro, it is not expanded, and instead of a link to the value of the macro, we have a link to the name of the macro:

\url{\myUrl}

This is not the behavior of PDFLaTeX.

\item[Answer:] Instead of defining the URL as a TeX macro, please define URL as provided in the url package, then TeX4ht behaves as expected. Your definition shall be changed to the format using \verb+\urldef+ instead of \verb+\def+. The usage shall be then, \verb+\myURL+.

\myURL

This should succeed both in pdfLaTeX and TeX4ht.

\end{description}

\end{document}

Tue 25 May 2010 11:52:57 AM EEST, original submission:

\documentclass{article}
\usepackage{hyperref}

\newcommand{\myUrl}{http://www.gnu.org}

\begin{document}

The url macro does not behave as expected in tex4ht: if its argument
is actually a macro, it is not expanded, and instead of a link to the
value of the macro, we have a link to the name of the macro:

\url{\myUrl}

This is not the behavior of PDFLaTeX.

\end{document}

Akim Demaille <akim>

No files currently attached

Depends on the following items: None found

Items that depend on this one: None found

Carbon-Copy List
• -unavailable- added by cvr (Updated the item)
• -unavailable- added by akim (Submitted the item)
•

Do you think this task is very important?
This task has 0 encouragements so far.

Only logged-in users can vote.

Please enter the title of George Orwell's famous dystopian book (it's a date):