0

Combining the suggestions of David Carlisle and egreg to refer to the Libre Baskerville font without knowing its name here, I ran into a new problem when I increased the font size to 12 points with the \setmainfont and \setmathsfont commands. Some font sizes are adjusted and some aren't (shown below). Specifically, italics in the body font are still at 11 points, subscripts and superscripts in math are at 12 points instead of being made smaller, and the roman font in math appears to be 11-point Computer Modern. Also, the line spacing appears to be a little tight. Possible clues: \small has no effect in body text, and the = is properly reduced in math subscript.

I figure that I need to specify some of these variant font sizes through various parameters to SizeProperties. But how? Or, can you tell me where to find the appropriate documentation on those parameters? I've found a few pieces, but so far nothing that spells it all out in one place.

Immanuel Kant says that 7+5=12 is not an analytic proposition.

\documentclass{article}

\usepackage{amsmath}
\usepackage{mathspec}
\usepackage{librebaskerville}

\setmainfont{LibreBaskerville}[
  Extension=.otf,
  UprightFont    = *-Regular,
  ItalicFont     = *-Italic,
  BoldFont       = *-Bold,
  BoldItalicFont = *-BoldItalic,
  SmallCapsFont  = BaskervilleF-Regular.otf,
  SmallCapsFeatures={Letters=SmallCaps,Scale=1.2},
  SizeFeatures={Size=12}
]
\setmathsfont(Latin,Greek)[Numbers={Proportional},SizeFeatures={Size=12}]{LibreBaskerville-Italic.otf}
\setmathsfont(Digits)[Numbers={Proportional},SizeFeatures={Size=12}]{LibreBaskerville-Regular.otf}

\DeclareMathOperator{\sgn}{sgn}

\begin{document}
We might, indeed, at first suppose that the proposition $7 + 5 = 12$ is a
merely \textit{analytical} proposition, following (according to the principle of
contradiction) from the conception of a sum of {\small seven and five}.

\[
S_j = \sgn \sum\limits_i w_{ij}S_i
\]

\[
w_{ij} = \frac{1}{p}\sum\limits_{m=1}^p x_i^m x_j^m
\]

\end{document}
6
  • 1
    \it is depreciated for quite some time: texfaq.org/FAQ-2letterfontcmd
    – DG'
    Oct 9, 2022 at 18:21
  • 1
    This is just a wild guess, but it's based on experience with substituting different fonts in the basic LaTeX document classes. Instead of specifying the text size in the font definition, try instead this option to the document class: \documentclass[12pt]{article}. Oct 9, 2022 at 19:30
  • @barbarabeeton Thanks! Instant success! If you'd like to make that an answer, I'll +1 it immediately. Even the shrunken drop cap (which I didn't mention in the question) is fixed. The math roman still appears to be Computer Modern but I had that problem before changing the font size.
    – Ben Kovitz
    Oct 9, 2022 at 20:06
  • @DG' Thanks! I just replaced \it with \textit in the question. Next I'll update the dissertation. :)
    – Ben Kovitz
    Oct 9, 2022 at 20:09
  • 1
    [11pt] makes 10.95pt, [13pt] would make an unused option warning, and 10pt fonts. [12pt] would make 12pt. Oct 9, 2022 at 20:52

1 Answer 1

2

I believe you're misunderstanding what SizeFeatures is about.

If you want 12pt size, specify it in the document class options.

In the following I use .ttf fonts, because they're the only I have on my system. Note also that neither LibreBaskerville nor BaskervilleF have Greek letters, so I use the Baskerville version I have on my system. You may need to find some other font that adapts well.

Also \setmathrm has to be used for operators.

Finally, since LibreBaskerville is quite big at design size, I set \linespread to 1.1 in order not to get crowded lines.

\documentclass[12pt]{article}

\usepackage{amsmath}
\usepackage{mathspec}
\usepackage{librebaskerville}

\setmainfont{LibreBaskerville}[
  Extension=.ttf,
  UprightFont    = *-Regular,
  ItalicFont     = *-Italic,
  BoldFont       = *-Bold,
  BoldItalicFont = LibreBskvl-BoldItalic,
  SmallCapsFont  = BaskervilleF-Regular.otf,
  SmallCapsFeatures={Letters=SmallCaps,Scale=1.10791},
]
\setmathsfont(Latin){LibreBaskerville-Italic.ttf}
\setmathsfont(Greek)[Scale=1.30569]{Baskerville}
\setmathsfont(Digits){LibreBaskerville-Regular.ttf}
\setmathrm{LibreBaskerville-Regular.ttf}

\DeclareMathOperator{\sgn}{sgn}

\linespread{1.1}

\begin{document}

We might, indeed, at first suppose that the proposition $7 + 5 = 12$ is a
merely \emph{analytical} proposition, following (according to the principle of
contradiction) from the conception of a sum of seven and five.
\[
S_j = \sgn \sum\limits_i w_{ij}S_i αβ
\]
\[
w_{ij} = \frac{1}{p}\sum\limits_{m=1}^p x_i^m x_j^m
\]

\end{document}

enter image description here

Now also a comparison of sizes:

\documentclass{article}

\usepackage{fontspec}


\newfontfamily{\librebaskerville}{LibreBaskerville}[
  Extension=.ttf,
  UprightFont    = *-Regular,
  ItalicFont     = *-Italic,
  BoldFont       = *-Bold,
  BoldItalicFont = LibreBskvl-BoldItalic,
]

\newfontfamily{\baskervillef}{BaskervilleF}

\newfontfamily{\baskerville}{Baskerville}

\begin{document}

A%
{\librebaskerville A}%
{\baskervillef A}%
{\baskerville A}

\end{document}

enter image description here

The first is Latin Modern. As you see, LibreBaskerville is quite big and it probably would make sense to scale it down to match BaskervilleF, rather than the opposite (for small caps, remember).

\documentclass[12pt]{article}

\usepackage{amsmath}
\usepackage{mathspec}
\usepackage{librebaskerville}

\setmainfont{LibreBaskerville}[
  Scale=0.9026,
  Extension=.ttf,
  UprightFont    = *-Regular,
  ItalicFont     = *-Italic,
  BoldFont       = *-Bold,
  BoldItalicFont = LibreBskvl-BoldItalic,
  SmallCapsFont  = BaskervilleF-Regular.otf,
  SmallCapsFeatures={Letters=SmallCaps,Scale=1},
]
\setmathsfont(Latin)[Scale=0.9026]{LibreBaskerville-Italic.ttf}
\setmathsfont(Greek)[Scale=1.17852]{Baskerville}
\setmathsfont(Digits)[Scale=0.9026]{LibreBaskerville-Regular.ttf}
\setmathrm[Scale=0.9026]{LibreBaskerville-Regular.ttf}

\DeclareMathOperator{\sgn}{sgn}

\begin{document}

Baskerville\textsc{Baskerville}

We might, indeed, at first suppose that the proposition $7 + 5 = 12$ is a
merely \emph{analytical} proposition, following (according to the principle of
contradiction) from the conception of a sum of seven and five.
\[
S_j = \sgn \sum\limits_i w_{ij}S_i αβ
\]
\[
w_{ij} = \frac{1}{p}\sum\limits_{m=1}^p x_i^m x_j^m
\]

\end{document}

enter image description here

1
  • Much gratitude. Indeed I misunderstood SizeFeatures, but now I think I have the basic idea. And now, I think every font problem in my dissertation is now fixed! That includes several problems that I didn't mention in the question. It looks like I'll stay with enlarging the small caps from Baskerville because I'm going for a large font for readability: the lines are required to be 6" wide.
    – Ben Kovitz
    Oct 10, 2022 at 10:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .