Foggalong / edinburgh-math-latex

LaTeX templates for the University of Edinburgh's School of Mathematics
LaTeX Project Public License v1.3c
8 stars 3 forks source link

Error in the documentation? (section 3.3 Fonts) #18

Closed quark67 closed 2 months ago

quark67 commented 3 months ago

Describe the problem or request The documentation say that the package fontenc needs XeLaTeX or LuaLaTeX. This seems false (fontspec needs these engine, but here the cmbright option don't load fontspec, but fontenc).

Screenshots

image

Additional context The lines 99 to 106 of edmaths.sty are:

% If with-cmbright selected, use the (sans-serif) Computer Modern Bright font.
\ifthenelse{\boolean{with-cmbright}}{
    % NOTE must be compiled with xelatex or luatex
    \RequirePackage{cmap}
    \RequirePackage{cmbright}
    \RequirePackage[T1]{fontenc}
    \RequirePackage{microtype}
} {}

The comment in line 101 seems to be wrong.

On lines 108 to 113, we read:

% :)
\ifthenelse{\boolean{with-comicsans}}{
    % NOTE must be compiled with xelatex or luatex
    \usepackage{fontspec}
    \setmainfont{Comic Sans MS}
} {}

Perhaps the line 101 is a copy and paste of line 110 (which is correct, because of the loading of fontspec at line 111).

Foggalong commented 2 months ago

Thanks so much for catching this!

This misunderstanding stemmed from Computer Modern Bright not actually being installed on my computer. Under those conditions, pdflatex fails to compile with an error. However with both xelatex and lualatex, they just gave a warning and finished compiling with a substitute font which happened to look like CM Bright but actually wasn't.