TransWikia.com

Combining caps text and italics

TeX - LaTeX Asked on September 5, 2021

I’ve been editing a LaTeX template for my thesis.
The title page looks like this :

begin{titlepage}
begin{center}
vspace*{1cm}
bgroup
scshape{LARGE title of the document} 
egroup
end{center}
end{titlepage}

One of the words in the title for my paper needs to be italicized. I’ve tried

scshape{LARGE title of the document textit{italicized word}} 

But then the other formatting doesn’t apply to the italics.
How do I add the italicized word in while keeping the other formating?

2 Answers

You need to employ a font that features the smallcaps/italic combination font dimensions. One such font is Times (New) Roman.

enter image description here

Incidentally, scshape -- like LARGE -- does not take an argument. To limit the scope of scshape, write either {scshape ...} or, perhaps more directly, textsc{...}.

documentclass{article}
usepackage{newtxtext} % or some other Times Roman clone
begin{document}
scshapeLARGE title of the document textit{italicized word} 
end{document}

Correct answer by Mico on September 5, 2021

The problem here is that the Latex New Font Selection Scheme traditionally had only two font parameters: the series and the shape. Both of these combined multiple font features, so a series might be bold extended or semibold condensed, and a shape might be italic, small caps, upright italic or italic small caps.

There are three solutions.

Use Fontspec

In the modern toolchain, with LuaTeX or XeTeX, you can load fontspec. This has a few traces of the NFSS family/series/shape system remaining in its interface, but if will activate the OpenType Small Caps feature of the Italic font. Or, if there is a separate font for it, you specify that with:

setmainfont{SomeFont}[
  ItalicFeatures = {SmallCapsFont =
                    {SomeFont-RegularItalicSC.ttf}}]

Use Fontaxes

With legacy 8-bit fonts, the solution is fontaxes, which divides the shape axis into a primary shape axis (normal, italic, slanted, etc.) and a secondary shape axis (small caps). This lets you write textit{textsc{Foo}} or {itshapescshapeselectfont Foo}

The other solutions that say to load a particular font package work because many newer font packages load fontaxes. Note that, if you had been relying on itshape or scshape to reset each other, you might need to specify upshape or ulcshape to turn italics or small caps off, respectively.

Load the Italic Small Caps Face

As a last resort, it is possible to specify this font series without fontaxes. It is usually, but not always, scit.

So, if you want TeX Gyre Pagella, whose family name is qpl,¹ looking up t1qpl.fd shows that fontfamily{qpl}fontshape{scit}selectfont will work, and scsl is also supported as an alias for scit. The font file this actually loads is named ec-qplri-sc.tfm, if you ever need to load it in plain TeX.

¹ If you care, this is because it was originally called Quasi-Palatino until GUST changed the name for legal reasons. It was meant as a drop-in replacement for the standard PostScript font Palatino, ppl. All the older family, series and shape names are so terse because they needed to fit inside the 8 characters MS-DOS allowed for a file name. New fonts that never needed to support older OSes usually have a family name like DejaVuSerif-TLF.

PS

Most OpenType fonts contain Italic small caps. The following 8-bit fonts declare a {m}{scit} version in a *.fd file and will work with the fontaxes commands above:

The TeX Gyre fonts (qag, qbk, qcs, qhv, qhvc, qpl, qtm) and their X forks (TeX Gyre Schola X, etc.), Roboto, Antykwa Toruńska, Erewhon, ETbb, zpl, Go, XCharter, fbb, Cochineal, Gentium, Cabin, Cyclop, NewTX, Kurier, Alegreya, Iwona, Raleway, Junicode, Baskerville, GaramondLibre, IbarraRealNova, Old Standard, Montserrat, zcsth, Libertinus, :inux Libertine/Biolinum, SticksToo, Fira Sans, hfor, hfoss, Playfair, BaskervaldX, EB Garamond, Coelacanth, Noto Sans/Serif, and many, many variants of Computer Modern.

Nearly all fonts that support scit also alias it to scsl. A few only support scsl, including the KP fonts and clm2. You would need to use slshapescshapeselectfont or textsl{textsc{...}} with them. A few have distinct italic and slanted small caps.

A handful of others call this series itsc instead, such as cm-lgc. These might need a new DeclareFontShape definition, or a fontshape{itsc}selectfont command.

Answered by Davislor on September 5, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP