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.
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
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}