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.
General ⇒ Convert hyperref url to lowercase
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
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
Best regards and welcome to the board
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
-
- Posts: 2
- Joined: Tue Feb 09, 2010 10:29 am
Re: Convert hyperref url to lowercase
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
-->
\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