General ⇒ How do I make the first letter of a word into uppercase
How do I make the first letter of a word into uppercase
I'm using the hyperref package and when referring to a section, the package inserts the string 'section' for me as well as the number. The problem is that when it appears at the beginning of a sentence, it is in lower case. (This is not the case with figures, they are always inserted as 'Figure') Is there a command (or any other way) to have the first letter of the auto generated string to become uppercase (is it called titlecase?).
Thank.
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
How do I make the first letter of a word into uppercase
... the Hyperref manual states that
The label is worked out from the context of the original \label command by hyperref by using the macros listed below (shown with their default values). The macros can be redefined in documents using \renewcommand; note that some of these macros are already defined in the standard document classes. The mixture of lowercase and uppercase initial letters is deliberate and corresponds to the author’s practice.
For each macro below, hyperref checks \*autorefname before \*name. For instance, it looks for \figureautorefname before \figurename.
Macro
Default
Figure
\figurename
section
\sectionname
subsection
\subsectionname
Theorem
\theoremname
I would want to see the string 'Section' when using \autoref{} instead of 'section', so I thought I'd use the
Code: Select all
\renewcommand{\sectionname}{Section}
I would add that the reason I'm using the hyperref package is that it given nice clickable links for PDFs, so you can click on the whole 'Figure 1' string, instead of '1' only.
If anyone has a solution, I'd be grateful.
Thanks.
How do I make the first letter of a word into uppercase
For each macro below, hyperref checks \*autorefname before \*name. For instance, it looks for \figureautorefname before \figurename.
You need to change the \*autorefname, the code is
Code: Select all
\renewcommand{\sectionautorefname}{Section}