TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using the \autoref tag which comes with the package hyperref for referencing my algorithms, figures etc. I read that it automatically adjusts the reference text's case, but it won't work with my setup. When I compile the code, everything (page, text, link) is correctly put, except the case like in the following example:

As it can be seen in Figure 9.7, this [...]

Remark: there may be something wrong with my setup - links to text sections (like chapter, section, subsection) and also floating environments like "algorithm" (algorithm2e.sty) do have the correct case. The case is wrong when refering to Figures and Equations.

share|improve this question

migrated from meta.tex.stackexchange.com Nov 29 '11 at 20:48

This question came from our discussion, support, and feature requests site for users of TeX, LaTeX, ConTeXt, and related typesetting systems.

Note that it is quite conventional usage to use capital when referring to figures, so it isn't really "wrong" just different. It also avoids the problem of sentence starting. – David Carlisle May 17 '12 at 16:37
up vote 25 down vote accepted

hyperref.sty indeed includes the following code snippet (with names sometimes, but not always in uppercase):


Solution: Redefine the "offending" name macros.






As shown in \autoref{fig:foo}~\dots


enter image description here

share|improve this answer
Thank you @lockstep, that did the trick for the lowercase-case. BUT when a reference is at the start of a sentence, it's not set uppercase. As far as I know autoref should realize this and set the corresponding case, right? – Eric Nov 30 '11 at 12:57
@Eric: I'm afraid no. LaTeX can't detect sentence starts automatically; to switch to uppercase manually, you should have a look at the cleveref package and its \cref and \Cref commands. – lockstep Dec 1 '11 at 0:39
Why the last code does not work when the package 'babel' is load... Thanks in advance – Gitano Jan 22 '13 at 14:52
@Gitano See tex.stackexchange.com/questions/82993/… – lockstep Jan 22 '13 at 15:46
Thanks, very useful information! With the babel package, for me what worked was to use \addto\extrasenglish{\def\chapterautorefname{Chapter}} (adding the definitions to \captionsenglish didn't work for some reason) – phfaist Jan 31 at 16:13

As indicated by lockstep you can use cleveref to have control over case. Simply load cleveref, but make sure to load it after hyperref, and use \cref for lower case cross-references and \Cref for upper case cross-references. Other than being able to handle cases cleveref can handle ranges of labels and more languages than \autoref.

Here is an example on how to use it:


\usepackage{cleveref}% Has to be loaded after hyperref



As shown in \cref{fig:foo}~\dots

\Cref{fig:foo} shows~\dots


Output of example

Note that if you want cross-reference links to include the name, e.g. "fig. 1" and not only "1", you have to load cleveref with the option nameinlink. Also note that if you want it to not abbreviate cross-reference names, e.g. "figure 1" and not "fig. 1", you have to load cleveref with the option noabbrev.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.