4

The octavo package is supposed to print headings in small caps but I'm probably using a font that does not allow small caps? Or what am I doing wrong because even in the text I cannot set small caps. The command \textsc{word} does nothing. My document is in Italian (main language) and Hebrew. This is my MWE:


\documentclass[crown]{octavo}
\usepackage{xcolor}
\usepackage[marginparwidth=40pt]{geometry}
\usepackage[italian]{varioref}
\usepackage{microtype}
\usepackage{tikz}
\usetikzlibrary{mindmap}

\usepackage{lipsum}

\usepackage{relsize,etoolbox}% http://ctan.org/pkg/{relsize,etoolbox} \AtBeginEnvironment{quote}{\smaller}% Step font down one size relative to current font.

\usepackage{quoting} \quotingsetup{font=small}

\usepackage{imakeidx}\makeindex[name=concetti,title=Indice dei concetti,columns=3] \makeindex[name=tecniche,title=Indice delle techniche,columns=3]

\usepackage{graphicx,wrapfig} \graphicspath{/Users/haimbook/Desktop/}

\usepackage{reledmac} \Xarrangement[A]{paragraph}

\Xlemmafont{\bfseries} \Xnotefontsize[A]{\scriptsize}

\fnpos{critical-familiar} \Xbeforenotes[A]{1.8em} \beforenotesX[A]{1.8em} \beforenotesX[B]{1.8em} \Xafterrule[A]{7pt} \afterruleX[A]{7pt} \afterruleX[B]{7pt}

\firstlinenum{100000}

\usepackage{hyperref}

\usepackage{fontspec} \usepackage{polyglossia}

\setdefaultlanguage{italian} \setotherlanguage{hebrew}

\setmainfont{Times New Roman}

\newfontfamily{\hebrewfont}{New Peninim MT}

\usepackage[style=verbose-trad3, doi=false,isbn=false,url=false,eprint=false]{biblatex}

\bibliography{Midrash.bib}

\begin{document}

%\renewcommand{\thefootnoteA}{\arabic{footnoteA}} \renewcommand{\thefootnoteB}{\alph{footnoteB}}

%%%%%%%%%%%%%%%%%%%%%%%%%STARTHERE%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Introduction} \lipsum[2-4]

\part{Bibliografia} \printbibliography[heading=none]

%\indexprologue{\small Questo indice contiene nomi di persone famose.} \printindex[concetti] \printindex[tecniche]

\tableofcontents \end{document}

JamesT
  • 3,169
Haim
  • 487
  • Please extend your code. As has been pointed out, it is impossible to diagnose your issue unless you give a small but complete, compilable example (MWE). You can create a short new .tex file, compile it, and if the problem persists, copy the code here. Without this small effort on your part, nobody can really help you! – marquinho Jan 20 '22 at 11:02
  • Ok you are right! Please see how I did correct the question and tried to post a MWE. I left all of my preamble. Should I clean up the non font-related parts? I left all of it in doubt something might matter... Thanks! – Haim Jan 23 '22 at 04:43
  • PS: I also have Greek in my text, with now prints appropriately. I had made some tinkering with my font commands in the preamble obtaining small caps, but for some reasons I ended up loosing the Greek... – Haim Jan 23 '22 at 04:45
  • Thanks for editing the example! Yes, as a general rule it's always better to keep it short and remove the unrelated parts. Doing this is part of the solution btw: as you remove more and more bits, you will probably get a hunch of which line/pkg/option is causing the trouble, and which ones are innocent. @"in doubt something might matter": generally, if you take it away and the problem persists, it didn't matter to the problem. This reduces the "noise" and leads to minimal examples. Now for the actual problem: see my answer :) – marquinho Jan 23 '22 at 09:53

1 Answers1

5

Thanks for editing the example. Your hunch was correct, there seems to be a problem with the font that I could replicate (and is actually quite common).

(Caveat: "missing font" warnings are system-dependent, they can vary from user to user, if they have different fonts installed. So they're not always replicable when sharing code, as in a MWE!)

Older versions of Times New Roman are known to lack the small capitals feature. In fact, the minimal example

\documentclass[crown]{octavo}
\usepackage{fontspec}

\setmainfont{Times New Roman}

\begin{document} \chapter{Introduction} Hello {\scshape world} and \textsc{goodbye}. \end{document}

gives the warning (in the .log) LaTeX Font Warning: Font shape TU/TimesNewRoman(0)/m/sc' undefined (Font) using TU/TimesNewRoman(0)/m/n' instead on input line 8. and prints the text accordingly. You might have an old implementation of the font too.

Unfortunately, Times New Roman is a proprietary font. But the clone font developed for TeX, TeX Gyre Termes, is free and provides all text styles. Install it via tlmgr or as you would any font in your specific system.

Then you can either set it as your main font entirely

\setmainfont{TeX Gyre Termes}

or selectively for small capitals, keeping Times for all other uses:

\setmainfont{Times New Roman}[
  SmallCapsFont={TeX Gyre Termes},
  SmallCapsFeatures={Letters=SmallCaps},
]

(Note that the issue occurs independent of the document class – in your case, octavo.)

marquinho
  • 1,721
  • Thanks this is clear! Since the problem seems to be the font, I tried some other ways to change it and found that if I comment the \setmainfont{Times New Roman} but use instead \usepackage{ebgaramond} this also solves the issue. But only if I use ebgaramond, as other fonts like Palatino give me other issues. So my question is: 1) What is the difference in using one or the other of the above in the preamble; 2) Is there somewhere a handy resource to know what font has what characteristic? – Haim Jan 23 '22 at 14:07
  • PS: Should I open another thread instead? – Haim Jan 23 '22 at 14:07
  • The first thing to do would be to search the site. Chances are there's already a solution out there. If this doesn't help, you should open a new question. And maybe this can help in the meantime? https://tug.org/FontCatalogue/ – marquinho Jan 24 '22 at 09:43