# Tag Info

## Hot answers tagged capitalization

162

The loss of capitalization is by design: BibTeX does this because some, but not all citation styles require capitalization in titles (a.k.a. "title case"); other styles use ordinary case. Your bibliography database should work with both capitalization styles without modification, so BibTeX styles are designed to work as follows: You must write the title in ...

28


24

You can do it with a regular expression, if you have the input string as an argument. \documentclass{article} \usepackage{xparse} %\usepackage{l3regex} % only with expl3 before June 2017 \usepackage{xcolor} \ExplSyntaxOn \NewDocumentCommand{\colorcap}{ O{blue} m } { \sheljohn_colorcap:nn { #1 } { #2 } } \tl_new:N \l__sheljohn_colorcap_input_tl \...

21

If using LuaLaTeX rather than XeLaTeX is an option for you -- fortunately, Lua(La)TeX and polyglossia have started playing nice with each other, beginning a few months ago -- you may achieve your goal as follows. First, define an "OpenType feature file", such as # Scripts and languages # If the font uses others, they should be defined here too ...

20

Computer Modern's greek (bottom) font is (loosely) based on Monotype's 155M Greek font (top): The Monotype 155M font itself is related to the Porson greek font, which was one of the most used typeface for greek in english speaking countries. One of the characteristic of this font is that it has upright capitals but slanted lowercase. This might seem ...

18

This solution shows an active character approach, which (though heavy in the setup) will allow one to have cap letter automatically colorized. But because active letters will tend to break macros, I provide the means to disable it. This revised solution provides the following macros: \capcoloron[color] turns all cap letters to this color (default red) \...

17

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##1\ifnum##1<Z\addcytoks{% \textsc{\char\numexpr32+##1\relax}}\else \addcytoks{##1}\fi\else\addcytoks{##1}\fi}% \tokcyclexpress{#1}% \the\...

16

A neat trick to get the WYSIWYG effect in the titles of your bibtex is to use double curlies to encode the titles, e.g.: @book{aitchison2001language, title={{Language Change: Progress or Decay?}}, author={Aitchison, Jean}, year={2001}, publisher={Cambridge University Press} }

16

\expandafter\MakeUppercase \mytext

15

sectsty provides easy hooks into sectional units. \MakeUppercase turns the title into UPPERCASE, while \titlecap (from titlecaps) turns it into Title Case. \documentclass{article} \usepackage{sectsty}% http://ctan.org/pkg/sectsty \usepackage{titlecaps}% http://ctan.org/pkg/titlecaps \begin{document} \tableofcontents \sectionfont{\MakeUppercase} \section{...

15

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 font supports this shape. \documentclass{article} \begin{document} \textsc{Definici\'on (Isomorfismo)} Sea $T:U\rightarrow V$ \end{document} p.s. Other font ...

14

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 \spacefactor is straight-forward, but obscure. The TeXbook and TeX by Topic have all the details—and most of this is taken from TeX by Topic—but essentially the ...

14

Seems to be "by design". Quoting from section 6.1 of the cleveref manual: [With the capitalise option,] [a]ll the default cross-reference formats will [...] have the first letter capitalised, as will the automatically generated \cref variants [...] (However, if you explicitly define a \cref variant to not be capitalised, cleveref will still honour ...

14

You need to change the macro just for the bibliography and biblatex provides a hook to do this in the form of \AtBeginBibliography: \documentclass{article} \usepackage[style=authoryear, firstinits=true]{biblatex} \addbibresource{biblatex-examples.bib} \AtBeginBibliography{\renewcommand*{\mkbibnamelast}[1]{\MakeUppercase{#1}}} \begin{document} Here is some ...

13

As far as I am aware, there is no BibTeX (nor any biblatex) style that implements a "convert to title case" macro/function (there was a question a while back on how to achieve this with biblatex, the answer shows a way to get started with such a macro in biblatex with Biber). There is, however, a function to turn titles into sentence case (...

13

With a current biblatex version I recommend the slightly longer, but conceptually cleaner solution presented in Prefixes in author names in references and bibliography. The answer here still remains functional (if a bit hacky). In order to get the sorting in the bibliography right, we have to set useprefix=false at loading-time. E.g. \usepackage[style=...

12

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 and adds extra space for readability: in That's all. Thanks, LaTeX adds more space after all.. Otherwise it doesn't add extra space after the punctuation sign: ...

12

This is easy using the titlesec package. With the explicit option (p. 8, sec. 3.7), we can use an (I think) arbitrary transformation on the sectioning title stored as #1. With this knowledge, the rest becomes a piece of cake: \documentclass[twocolumn]{article} % two-column used to get everything onto one page \usepackage{biblatex} \usepackage[explicit]{...

12

Please always post complete documents, not just fragments. TeX is in vertical mode at that point, so you can do: \documentclass{article} \newcommand\wufen{\ifvmode W\else w\fi ufen} \begin{document} \begin{enumerate} \item \wufen\ something something \item Something \wufen\ something... \end{enumerate} \end{document}

12

Update: for a solution working with hyperref, see below. An option, patching \l@section: \documentclass{article} \usepackage{etoolbox} \makeatletter \patchcmd{\l@section}{#1}{\MakeUppercase{#1}}{}{} \makeatother \begin{document} \tableofcontents \section{A test section} \section{Another test section} \end{document} If your section titles contain math ...

12

the issue is in the class file, which uses \uppercase for the case changing rather than \MakeUppercase. A fix: \makeatletter \def\@ucnt#1\thanks{\MakeUppercase{#1}\futurelet\@tempa\@ucnta} \makeatother The difference here is that \uppercase is a TeX primitive and can only case change 'native' input for the engine, whereas \MakeUppercase is set up to deal ...

11

Add the line \usepackage[T2A,T1]{fontenc} in the preamble so to have the right font encodings. Thus the MWE \documentclass{letter} \usepackage[utf8]{inputenc} \usepackage[T2A,T1]{fontenc} \usepackage[russian]{babel} \begin{document} \MakeUppercase{English Text. Русский текст.} \end{document} yields the desired result P.S.: The T1 option is not needed ...

11

The double braces don't provide the required protection. Use title = {Short history of {PACS}. {Part} {I}: {USA}.}, I believe that Biber is removing a pair of braces around the entire field, assuming that it was added by some software that's trying to be too smart. Capitalization of titles should be left to the bibliographic style, not forced. If the ...

11

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 letters to small cap letters. Unfortunately, Latin Modern does not contain this feature. When available, one can activate this via fontspec feature Letters=...

10


10

As mentioned by Werner in his comment, Steven Segletes's titlecaps package provides a macro called \titlecap that capitalises every word of its argument. Simply use that macro in the last mandatory argument of \titleformat from the titlesec package to typeset the heading of interest in title case. Edit: as Gonzalo Medina remarks, no need for the explicit ...

10

The correct input is \E Italian uses two kinds of accents, grave and acute. According to the most widespread usage, only the grave accent is used on a, i, o and u \a \i \o \u \A \I \O \U Some publishers, however, prefer to use an acute accent on i and u. With the vowel e, either the acute or the grave accent is used, to denote its closed or ...

10

The \textcite command uses the standard capitalization; however the biblatex package provides \Textcite for use at the beginning of a sentence (section 3.7.2 of the manual). \documentclass{scrartcl} \usepackage[style=authoryear,sorting=nyt,backend=biber,useprefix=false]{biblatex} \usepackage{filecontents} \begin{filecontents*}{\jobname.bib} @...

10

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

9

This is a fairly general approach for changing the appearance of the entries in the table of contents. The patch with \xpatchcmd* is just a way for avoiding copying the definition from latex.ltx and modifying it. The two places where #7 appears in \addtocontents are replaced by \@nameuse{format#1}{#7} so we can define \formatsection and so on to do what we ...

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