Sorry I have minimal knowledge of how font families work in TeX. After trying to read the fontspec documentation I get more and more confused. I am trying to get as many variants of Latin Modern Roman working as I can, especially the variants of unslanted roman, oblique small caps. Foe example I do not know how to get small caps oblique to be used when itshape and scshape are both in effect.
I originally wanted \textup
to have the Unslanted variant of the font but doing UprightFont = Latin Modern Roman Unslanted
would change all normal font to that as well. I thought the whole point of \textup
and \textrm
being separate commands is allow distinction with upshape? Anyhow because of this I am defining \textun
for the unslanted variant.
Is it also possible to have fake bold with small caps by using, say, weight
in fontspec such that I can put \textsc{Abc}
in section headings (i.e. such that it works with \bfseries
)?
\documentclass[a4paper,10pt,english,draft]{article}
% Additional Options
\usepackage[log-declarations=false]{xparse}
\usepackage[quiet]{fontspec}
%fontspec options:
\setmainfont[Ligatures=TeX,SmallCapsFont={* Caps}, SlantedFont={* Slanted}]{Latin Modern Roman}
\newfontface\textun{lmromanunsl10-regular.otf}
%I cannot use \newfontface\textun{Latin Modern Roman Unslanted} for some reason...
\begin{document}
Latin Modern Roman normal text \newline
\textit{Latin Modern Roman italic text} \newline
\textsl{Latin Modern Roman Slanted} \newline
\textun{Latin Modern Roman Unslanted} \newline
\textsc{Latin Modern Roman Caps} \newline
\emph{\textsc{Latin Modern Roman Oblique small caps?}}
\end{document}
Best Answer
Your original
\textun
acted as an switch (like\itshape
) so I redefined\textun
as\textrm
,\textup
and/or\textun
You easily could re-defined
\textrm
and\textup
withwhich gives you
While that does work it is not a good idea.
\textrm
and\textup
are well implemented macros. Who knows which package you might break?Besides,
\textrm
and\textup
aren't the same, for LaTeX applies:rm
(roman) is a family specifier (“Serifs”). Families are (generally) roman/serif/antiqua, sans-serif/grotesque and typewriter.up
is a shape specifier (“Slope”). Other shapes are: italics, oblique/slanted/sloped, Sᴍᴀʟʟ Cᴀᴘꜱbf
stands for boldface.Code (Example)
Output (Example)
FakeBold and SmallCaps
Borrowing from sdaau's answer the OP himself has found the following map-workaround:
Code (FakeBold SmallCaps)
Font sizes?
The following code shows these fonts included in the PDF:
Code
Output (normal size)
† Yes there are
\mdshape
and\textmd
.