TransWikia.com

Add href in subsection{} make the url become capital

TeX - LaTeX Asked by Felix LL on September 25, 2021

I add href in subsection{}, this make the url become all capital, how can I deal with this?

For example, I use subsection{href{http://finance.sina.com.cn/roll/2018-06-30/doc-iheqpwqz3115534.shtml}{some text}} and run latex, it shows like this. enter image description here
And It contains an url.

Then when I click the link, the url becomes http://finance.sina.com.cn/ROLL/2018-06-30/DOC-IHEQPWQZ3115534.SHTML like this:
enter image description here
in the web-browser.
All the letters become capital, this url cannot open the right website.

What can I do to fix this? I want the url can open the right website. Thank you.

One Answer

Something like this will work! :- subsection{texorpdfstring{lowercase{href{http://finance.sina.com.cn/roll/2018-06-30/doc-iheqpwqz3115534.shtml}{MakeUppercase{some text}}}}{}}

Since by default, the whole text in a subsection is in upper-case, hence after wrapping lowercase over whole href part, this upper-case has to be done forcefully (here using MakeUppercase).

Also, texorpdfstring has been used to avoid the warning:
Hyperref warning - Token not allowed in a PDF string

(There may be other work-arounds too)

Answered by Paranjay Bagga on September 25, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP