GeneralConvert hyperref url to lowercase

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
wimalopaan
Posts: 2
Joined: Tue Feb 09, 2010 10:29 am

Convert hyperref url to lowercase

Post by wimalopaan »

Hi,

how can I convert an url to all lowercase for use in the \href-command?

I would like to have a command, e.g.

\newcommand{\class}[1]{\href{http://xyz/docbase/#1.html}{#1}}

to write

\class{MyClass}

resulting in an url

http://xyz/docbase/myclass.html

inside the \href-command.

I tried \lowercase and \MakeLowercase, but with no success.

thx for your help.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Convert hyperref url to lowercase

Post by localghost »

A minimal working example (← that's a link) that shows the problem may help. I can't figure out why \lowercase shouldn't work.

Best regards and welcome to the board
Thorsten
wimalopaan
Posts: 2
Joined: Tue Feb 09, 2010 10:29 am

Re: Convert hyperref url to lowercase

Post by wimalopaan »

Here is the minimum-example:

-->
\documentclass{article}
\usepackage{hyperref}
\newcommand{\qclass}[1]{\href{http://doc.trolltech.com/4.6/\lowercase ... ml}{\tt{#1}}}
\begin{document}
\qclass{QObject}
\end{document}
<--

The resulting URL should be

http://doc.trolltech.com/4.6/qobject.html

but you get

http://doc.trolltech.com/4.6/\lowercase{QObject}.html

in the pdf-file.

hth
Post Reply