General ⇒ Convert hyperref url to lowercase
-
- Posts: 2
- Joined: Tue Feb 09, 2010 10:29 am
Convert hyperref url to lowercase
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.
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Convert hyperref url to lowercase
Best regards and welcome to the board
Thorsten
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
-->
\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