6

I recently made the switch to LuaTeX from pdfTeX. Before the switch, I used the fouriernc package to set the document's font to New Century Schoolbook. I've come to understand (from this document) that one should not do this in LuaTeX and should load fontspec and use \setmainfont{<font>}. So, there are two parts to my question:

  1. Why is it a bad idea to load fouriernc with LuaTex? I tried compiling in this way and the document compiled successfully with no (visible) problems at all.
  2. If it is truly a must that one loads fonts with fontspec, then where can I possibly find New Century Schoolbook (or Century Schoolbook) files? In my MikTeX distribution, I thought I found them in /fonts/tfm/public/fourier, but I always get an error saying that the file cannot be found (yes, I quadruple checked the spelling and path). I should also add I do need this specific font; other Century fonts won't suffice unfortunately.

Many thanks in advance for your help!

  • 2
    Use \setmainfont{Tex Gyre Bonum} which ist a free, opentype Schoolbook version which comes with texlive – MaxNoe Feb 26 '15 at 13:15
  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. While it is true that you cannot get the full benefit of LuaTeX if you use traditional TeX fonts, as far as I know there is no problem with doing so if those are the fonts you need and you are not relying on the additional features LuaTeX can support. Note the discussion of luainputenc in that document as well. – cfr Feb 26 '15 at 13:38
  • 2
    @MaxNoe: Bonum is imho a bookman clone, schola is schoolbook. – Ulrike Fischer Feb 26 '15 at 13:43
  • Of course, i messed them up – MaxNoe Feb 26 '15 at 13:44
3

You have two possibilities.

1 – Use fouriernc with TeX Gyre Schola as text font

\documentclass{article}

\usepackage{amsmath}
\usepackage{fouriernc}
\usepackage[no-math]{fontspec}

\usepackage{lipsum}

\setmainfont[Scale=0.93]{TeX Gyre Schola}


\begin{document}

\lipsum*[2]
\begin{equation*}
  \widehat{bcd} \ \widetilde{efg} \ \dot A \ \dot R  \ {\ddot A \check t} 
  \  \check{\mathcal{A}}\ \mathbf{\acute \imath}
\end{equation*}
some other text
\begin{equation*}
  \langle a \rangle \left\langle \frac{a}{b} \right\rangle
  \left\langle \frac{\frac{a}{b}}{c} \right\rangle
\end{equation*}
some other text
\begin{equation*}
  (x + a)^n = \sum_{k=0}^n \binom{n}{k} x^k a^{n-k} \quad\text{binomial}
\end{equation*}
square roots
\begin{equation*}
 \sqrt{\sqrt{\sqrt{\sqrt{\sqrt{\sqrt{2}}}}}} =
 \frac{\sqrt{\sqrt{\sqrt{\sqrt{\sqrt{\sqrt{\sqrt{\sqrt{2}}}}}}}}}{\frac{2}{3}}
\end{equation*}
Cardinal numbers and powers
\begin{equation*}
 \aleph_{0}<2^{\aleph_0}<2^{2^{\aleph_0}}\qquad
x^{\alpha} e^{\beta x^{\gamma} e^{\delta x^{\epsilon}}}
\end{equation*}

\end{document}

enter image description here

2 – Use TeX Gyre Schola and TeX Gyre Schola Math

\documentclass{article}

\usepackage{amsmath}
\usepackage{unicode-math}

\usepackage{lipsum}

\setmainfont[Scale=0.93]{TeX Gyre Schola}
\setmathfont[Scale=0.93]{TeX Gyre Schola Math}

\begin{document}

\lipsum*[2]
\begin{equation*}
  \widehat{bcd} \ \widetilde{efg} \ \dot A \ \dot R  \ {\ddot A \check t} 
  \  \check{\mathcal{A}}\ \mathbf{\acute \imath}
\end{equation*}
some other text
\begin{equation*}
  \langle a \rangle \left\langle \frac{a}{b} \right\rangle
  \left\langle \frac{\frac{a}{b}}{c} \right\rangle
\end{equation*}
some other text
\begin{equation*}
  (x + a)^n = \sum_{k=0}^n \binom{n}{k} x^k a^{n-k} \quad\text{binomial}
\end{equation*}
square roots
\begin{equation*}
 \sqrt{\sqrt{\sqrt{\sqrt{\sqrt{\sqrt{2}}}}}} =
 \frac{\sqrt{\sqrt{\sqrt{\sqrt{\sqrt{\sqrt{\sqrt{\sqrt{2}}}}}}}}}{\frac{2}{3}}
\end{equation*}
Cardinal numbers and powers
\begin{equation*}
 \aleph_{0}<2^{\aleph_0}<2^{2^{\aleph_0}}\qquad
x^{\alpha} e^{\beta x^{\gamma} e^{\delta x^{\epsilon}}}
\end{equation*}

\end{document}

enter image description here

  • Thank you for your response. The first solution seems to do exactly what I need it to do. But, I am confused. What is the text font exactly? From the code, I deduce that it is Tex Gyre Schola. But, after having a closer inspection of the output, it looks identical to New Century Schoolbook. The only difference is that the ``quotation marks'' are different. Also, why did you set scale = 0.93? – fiziks Feb 26 '15 at 14:54
  • 1
    @fiziks You probably have an older version of fontspec; type \setmainfont[Ligatures=TeX]{TeX Gyre Schola}. The 0.93 factor is because fouriernc math fonts are 7% smaller than the normal size of New Century Schoolbook (I took the value from fouriernc.sty). – egreg Feb 26 '15 at 14:55
  • @egreg Could you give more details about how you obtained the 0.93 factor, please? – Faheem Mitha Jul 28 at 17:13
  • @FaheemMitha Actually, I dont remember. With 0.94957 I get the same x-height, but different height for uppercase; the same height for uppercase is obtained with 0.92459. The average is 0.93708. Things may have changed in four years. – egreg Jul 28 at 18:20
2

Standard pdflatex fonts have some glyphs not there where lualatex expects thems. This doesn't show when the text uses only ascii. But try out this document with lualatex to see the problems with fouriernc:

\documentclass{article}
\usepackage{fouriernc}
\begin{document}
Euro: € Sharp s: ß
\end{document}

enter image description here

Compare it with the fontspec output:

\documentclass{article}
\usepackage{fontspec}
\setmainfont{TeX Gyre Schola}
\begin{document}
Euro: € Sharp s: ß
\end{document}

enter image description here

  • \usepackage[lutf8]{luainputenc} would help, right? Though it doesn't solve the problem entirely. (The documentation suggests to me that it should but it doesn't seem to do so no matter what I try.) – cfr Feb 26 '15 at 13:56
  • Yes you can resolve the problem by making every "faulty" input active and then map it like inputenc+fontenc do it to the correct position. luainputenc should do it for the glyphs in my example, load if after fouriernc. But luainputenc handles only a subset of unicode. – Ulrike Fischer Feb 26 '15 at 14:06
  • @cfr luainputenc solves the input encoding mismatch but hyphenation is wrong (the hyphenation patterns assuming unicode have already been read). Since luatex can read hyphenation patterns in a document, not just in a format (unlike classic tex or xetex) this could in theory be fixable but isn't fixed in any off the shelf package as far as I know. – David Carlisle Feb 26 '15 at 14:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.