GeneralHow to (slightly) modify autoref feature of hyperref package

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
farazhussain
Posts: 2
Joined: Fri Mar 13, 2009 6:18 pm

How to (slightly) modify autoref feature of hyperref package

Post by farazhussain »

Hello,

In my document, when referring to a certain section, I'm currently
using \ref and writing "§5.3" instead of "Section 5.3". Now I want to
use autoref to get the link on the entire "§5.3" and not just on
"5.3".

Therefore, I wrote the following command:

\def\sectionautorefname{\S{}}

It works good, except for one thing: it inserts a space after the
section symbol and before the section number. So the reference shown
above looks like "§ 5.3". I also tried "\def\sectionautorefname{\S\ }"
but that also doesn't work.

How do I get rid of this unwanted single space character? Thanks in
advance.

Best Regards,

Faraz Hussain

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
corderin
Posts: 77
Joined: Sun Dec 14, 2008 2:27 pm

Re: How to (slightly) modify autoref feature of hyperref package

Post by corderin »

I would try with:

\def\sectionautorefname{\S\hspace*{-2pt}}

try with different values of pt, I don´t know extactly how long is a single space in your latex document.
farazhussain
Posts: 2
Joined: Fri Mar 13, 2009 6:18 pm

Re: How to (slightly) modify autoref feature of hyperref package

Post by farazhussain »

Thanks a lot. I got this working with the help of advice from the following:

http://groups.google.com/group/comp.tex ... e0afb9b677
Post Reply