lualatex makeindex : can I change the font ?
Peter Flynn
peter at silmaril.ie
Wed Apr 16 16:03:42 CEST 2025
On 16/04/2025 12:08, Ken Moffat via tex-live wrote:
> I'm guessing this has been discussed somewhere in the past, but
> gurgle is giving me a lot of noise and links for macOS or the online
> way of writing LaTeX.
Gurgle (lovely name) is no longer useful for anything except
AI-generated nonsense. I've switched to duckduckgo, which is a little
better but not as robustly indexed.
> Years ago (2016 orearlier), when I thought (from reading online) that
> pdflatex was a good way to go,
Back then it was. No longer.
> I created an essay using pdflatex, bibtex and makeindex. I am now
> trying to update [...]
> So, a lot of editing needed.
Shouldn't be hardly any, but these days you need to:
a) use LuaLaTeX with the fontspec package instead of pdflatex with
inputenc and fontenc; this lets you switch to using TTF/OTF fonts
instead of Postscript Type 1;
b) use the biblatex package with the biber program instead of the old
bibtex; barely any changes needed to your .bib file, but lots of nice
enhancements).
> When I used pdflatex I could use \textsc{} for names,
You still can. None of that has changed.
> particularly personal names (to help distinguish them from
> placenames, which were my original subject). I much prefer the open
> 'g' of DejaVu Serif, but that lacks a small cap font.
Ah. That's a wholly different question. If the typeface has no small
caps font, then it has no small caps font, period. Technically it is
possible in certain circumstances to fake up small caps for a font that
lacks them, but IMNSHO it's never really much good.
The number of serif typefaces with a fish-hook lowercase 'g' AND a font
of caps-and-small-caps is vanishingly small.
> Is it practical for me to specify a different font for Small Caps,
> both in makeindex and in the main text ?
If you switch to LuaLaTeX using the fontspec package (required) I think
you can specify an alternate typeface for small caps, eg (here to get
small caps for an old version of Times that did not have them, but the
new TeX Gyre version does):
\setmainfont{Times New Roman}[
SmallCapsFont={TeX Gyre Termes},
SmallCapsFeatures={Letters=SmallCaps},
]
(see
https://tex.stackexchange.com/questions/630809/small-caps-missing-and-font-choice-with-fontspec).
So you could look for a font very similar to DejaVu which does have
small caps, and try that.
Once you do that, I believe \textsc will work anywhere in the document,
including the index. But do read the fontspec documentation.
Peter
More information about the tex-live
mailing list.