bugtex4ht - 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 <akim>
Submitted on:  Tue 25 May 2010 11:52:57 AM EEST  
 
Category: NonePriority: 5 - Normal
Severity: 5 - NormalStatus: Fixed
Privacy: PublicAssigned to: CV Radhakrishnan <cvr>
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}

CV Radhakrishnan <cvr>
Project AdministratorIn charge of this item.
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.

Thanks in advance!

\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?
    If so, you can click here to add your encouragement to it.
    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):

     

     

    5 latest changes follow.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 04 Sep 2010 02:43:46 PM EESTcvrStatusNone=>Fixed
      Open/ClosedOpen=>Closed
      Summaryurl/ olinkurl do not expand macros=>url/ olinkurl do not expand macros
    Sat 04 Sep 2010 02:30:16 PM EESTcvrAssigned toNone=>cvr
      Summary\\url/\\nolinkurl do not expand macros=>\url/\nolinkurl do not expand macros
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup+gray