Skip to main content
30 votes

What is the proper use of \@ (i.e., backslash-at)?

For novices, a simple mnemonic rule is: \@ is an invisible (zero-width) lowercase letter. LaTeX considers a sequence <lowercase letter> <punctuation sign> <space> as end of a phrase ...
Alexander Gelbukh's user avatar
21 votes
Accepted

Capitalize first letter of a defined variable

\expandafter\MakeUppercase \mytext
David Carlisle's user avatar
19 votes

All Caps with Commands

Use \MakeUppercase \documentclass[10pt]{article} \begin{document} \newcommand{\test}{lower case} \newcommand{\testi}{upper case} \uppercase{Why is the last part in \test}? \MakeUppercase{Now ...
Stephen's user avatar
  • 4,329
17 votes

\autoref does not capitalize initial character in sentence when referencing label in listings environment

Another option is mentioned in the manual. Use: \usepackage[english]{babel} \addto\extrasenglish{ \def\typeautorefname{Type} } \usepackage{hyperref} If you want to capitalize usage of \...
Byebye's user avatar
  • 280
17 votes

Creating a macro that can selectively format capital letters

The tokcycle package (https://www.ctan.org/pkg/tokcycle) can be used for this. \documentclass{article} \usepackage{tokcycle} \newcommand\famword[1]{% \resettokcycle% \Characterdirective{\ifcat A##...
Steven B. Segletes's user avatar
16 votes
Accepted

How can I make it so that all the letters on a word are all capitalized yet the first letter is bigger than the rest?

The style is called "small caps" and is considered a font shape by LaTeX. Thus, \scshape will turn it on, or a delimited form, \textsc{...} is available. Naturally, you must make sure your ...
Steven B. Segletes's user avatar
15 votes

What is the proper use of \@ (i.e., backslash-at)?

This is an old question and this is not so much an answer, but an overly long comment. The \@ before the commas (as is shown in egreg's excellent answer) is not redundant. TeX's treatment of \...
TH.'s user avatar
  • 63k
11 votes
Accepted

Creating a macro that can selectively format capital letters

When using modern fonts in conjunction with LuaLaTeX or XeLaTeX, one is (sometimes) able to delegate this this to the font, since OpenType Layout defines a font feature c2sc that translates capital ...
Ralf Stubner's user avatar
  • 2,614
10 votes

Capitalising the first letter of an acronym?

Acronym 1.42 adds the \Ac{p,f,fp,fi,l,lp,lu} commands. They work exactly the same way as the \ac commands, but prints the full name, starting with an upper case letter (in case it was defined with a ...
Tobi Oetiker's user avatar
10 votes
Accepted

Capitalizing mathematical parts in section mark

You can switch out \MakeUppercase for \MakeTextUppecase which skips math mode: \documentclass{book} \usepackage[overload]{textcase} \begin{document} \section{$n+2=N$} \end{document}
David Carlisle's user avatar
10 votes

Is it possible to redefine the limit operator to print Lim, not lim?

You can add \ShowCommand\lim to your preamble to see the definition of \lim. It'll show > \lim=robust macro: ->\protect \lim . > \lim =\long macro: ->\mathop {\operator@font lim}. <...
Werner's user avatar
  • 606k
9 votes

Capitalizing mathematical parts in section mark

You can manually protect single characters (or a range in which everything is lowercase) by using \lowercase: \documentclass{book} \begin{document} \section{$\lowercase{n+n-n}+2=N$} \end{document}
Skillmon's user avatar
  • 61.4k
9 votes

Creating a macro that can selectively format capital letters

Here's a LuaLaTeX-based solution. It consists of (a) a main Lua function called uc2sc (short for "uppercase to smallcaps", I suppose) and an auxiliary Lua function called makesc which, together, do ...
Mico's user avatar
  • 513k
9 votes

Creating a macro that can selectively format capital letters

Using uppercase in the input to mean small caps in the output: \documentclass{article} \usepackage{xparse} \ExplSyntaxOn \NewDocumentCommand{\famword}{m} { \tl_set:Nn \l_tmpa_tl { #1 } \...
egreg's user avatar
  • 1.1m
9 votes
Accepted

replace capital ›ẞ‹ with ›ss‹ when using small caps

I believe it should be a law that any font providing the utterly ugly ẞ character must provide a stylistic set for replacing it with “SS”. But you're lucky: not with Linux Libertine, but with its (...
egreg's user avatar
  • 1.1m
8 votes

Proper casing in citation/bibliography titles using biblatex/Biber

If you are using biblatex with style=apa and want to keep the casing of your bib-file you need to use \DeclareFieldFormat{apacase}{#1} The default is to capitalize only the first letter.
BenjaminH's user avatar
  • 688
8 votes
Accepted

How to capitalize letter (using \uppercase) that has been assigned to \let (or to \def)?

\uppercase and \lowercase do only apply to explicit character tokens. do not trigger expansion after finding either the left brace { of the ⟨balanced text⟩ that is to be uppercased/...
Ulrich Diez's user avatar
  • 29.6k
8 votes
Accepted

Capitalize important words using Biblatex

biblatex (like BibTeX) only has functions to reliably turn a string into sentence case (first word capitalised, remainder lower case). There are functions to capitalise words, but there is no built-in ...
moewe's user avatar
  • 178k
8 votes
Accepted

All Caps with Commands

Using TeX primitives requires knowing what they do. In this case you're trying to use \uppercase, but its actions are different from whay you might expect: upon seeing \uppercase, TeX looks for { (...
egreg's user avatar
  • 1.1m
7 votes

Sentence case for titles in biblatex

biblatex-ext introduces new field formats for a finer control over title casing. Where standard biblatex has the format titlecase that applies to all title-like fields alike, biblatex-ext has ...
moewe's user avatar
  • 178k
7 votes

Uppercase word in glossary, lowercase in text

It is possible to use both upper and lower case in the text;\Gls{} will give the capitalized word or term, as in the beginning of the sentence. In other locations, \gls{} can also be used for the ...
Liam's user avatar
  • 461
7 votes

Uppercase word in glossary, lowercase in text

I've used Nicola's answer, since none of the answers here worked for me. The glossaries-extra package allows to easily setup the capitalization with firstuc. I didn't had to change much of my ...
G. Bay's user avatar
  • 2,109
7 votes

How to force lower case in the title?

Use of \Makelowercase{text} will do the work, but lots of warning messages will come due to variation in packages. use of \lowercase{text} will do the same work. Try any one of them.
prashant's user avatar
7 votes
Accepted

Check if argument is math expression. The case of making the first letter uppercase

Using \text_titlecase:n this is trivial \documentclass{article} \usepackage{xparse} \ExplSyntaxOn \NewExpandableDocumentCommand{\capitalise}{m}{\text_titlecase:n{#1}} \ExplSyntaxOff \newcommand{\pt}{\...
Joseph Wright's user avatar
  • 261k
7 votes

Capital first letter after a period

In opposite to Word, LibreOffice and the like, you have to distinguish cleary the editor from the »LaTeX« machinery. The editor is used to type the text. So if you'd like to have a kind of ...
Keks Dose's user avatar
  • 31.2k
7 votes
Accepted

Capitalize first letter of each word when printing list of acronyms

Here's an alternative approach that uses glossaries-extra (an extension to the glossaries package): \documentclass[a4paper,oneside,12pt]{report} % Abbreviations \usepackage[acronym,style=super,...
Nicola Talbot's user avatar
7 votes
Accepted

biblatex: capitalize ß to ẞ, not SS, in bibliographies

If you use babel and (n)german you can set the casing to eszett: \documentclass{article} \begin{filecontents}[force]{testss.bib} @Unpublished{Heussner2023, author = {{Heußner}, Ludwig}, note = {...
Ulrike Fischer's user avatar
7 votes

Is it possible to redefine the limit operator to print Lim, not lim?

You can either define a new \Lim or redefine the existing \lim. Both are shown in this MWE. \documentclass{article} \usepackage{mathtools} \DeclareMathOperator*{\Lim}{Lim} \let\lim\relax \...
Steven B. Segletes's user avatar
6 votes
Accepted

Capitalization with cleveref

cleverref has a dedicated command to deal with this problem, \lcnamecref will give you the name in lower cases. \documentclass{article} \usepackage[capitalise]{cleveref} \usepackage{ntheorem} \...
samcarter_is_at_topanswers.xyz's user avatar
6 votes

How to capitalize all the long form of an acronym using `acro` package

You can use the optional argument of \Ac to change the format locally: \documentclass[12pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{amsmath} \usepackage{...
cgnieder's user avatar
  • 66.9k

Only top scored, non community-wiki answers of a minimum length are eligible