TeX - LaTeX Asked by user41063 on June 7, 2021
Referring to this tread: How to use fontspec and also have small bold caps with LuaLaTeX?, I’ve a font with real small caps, but the same problem too. Please, compile this simple code:
documentclass{article}
usepackage{fontspec}
usepackage[italian]{babel}
babelfont[italian]{rm}{EB Garamond}
% setmainfont{EB Garamond}
begin{document}
Quel textbf{ramo del textsc{lago} di Como}, che volge a textbf{textsc{mezzogiorno}}
end{document}
So, the solution is not
You need to choose a font family that has bold small caps
for it has… Is it so hard to have bold small caps? It works adding setmainfont{EB Garamond}
, but I think it’s not a good idea to make a xelatex and lualatex fruit salad …
Thank you
setmainfont is not a command meant only for xelatex. It is a command from fontspec for both engines.
babel has its own command to set fonts (which also can be used with both engines). In your case the optional argument [italian] disables the small caps because of two reasons:
At first with the optional argument babel doesn't directly load the font but only prepares it for the language. And at second because babel doesn't set like fontspec the default bold series to b
which it should imho do so I will report it. As the series is bx it triggers a substituation and so you loose small caps (which perhaps shouldn't happen too ...). I suggest to remove the language, it doesn't make much sense as the font doesn't know it anyway, and to add a series declarations (this requires a current latex) for now.
documentclass{article}
usepackage{fontspec}
DeclareFontSeriesDefault[rm]{bf}{b}
usepackage[italian]{babel}
babelfont{rm}{EB Garamond}
begin{document}
Quel textbf{ramo del textsc{lago} di Como}, che volge a textbf{textsc{mezzogiorno}}
end{document}
Correct answer by Ulrike Fischer on June 7, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP