2

Without having changed anything in my LaTeX installation, certain characters have disappeared. (I use pdflatex to compile file).

For example, the + is no longer displayed in math mode.

Here is an example :

\documentclass[
    fontsize=10pt, 
    twoside=true]{kaobook}

\usepackage[french]{babel} % Load characters and hyphenation

%%%% A DECOMMENTER POUR AVOIR LES PUCES VOULUES %%%% %\frenchsetup{StandardItemLabels=true}

% Load mathematical packages for theorems and related environments \usepackage{kaotheorems}

% Load the package for hyperreferences \usepackage{kaorefs} \usepackage{lmodern}

\begin{document}

\mainmatter % Denotes the start of the main document content, resets page numbering and uses arabic

\setchapterstyle{kao} \setcounter{margintocdepth}{\sectiontocdepth} \marginlayout

N'affiche pas le + : $1+1$.

\begin{itemize} \item test 1 \end{itemize}

\end{document}

Additionally, if I uncomment \frenchsetup{StandardItemLabels=true} compilation fails.

I tried to update miktex.

How can I find my + and my bullets ?

  • kaotheorems.sty and kaorefs.sty are not in texlive, this I assume? https://github.com/fmarotta/kaobook – David Carlisle Nov 05 '23 at 20:44
  • 1
    @DavidCarlisle \documentclass[]{article} \usepackage{newpx} \usepackage{lmodern} \begin{document} N'affiche pas le + : $1+1$. \end{document} – Ulrike Fischer Nov 05 '23 at 20:47
  • 2
    do not load lmodern. That clashes with newpx loaded by the class. – Ulrike Fischer Nov 05 '23 at 20:47
  • The class (actually the kao.sty package) is quite inflexible and uses Libertinus with XeLaTeX or LuaLaTeX and, for strange reasons, newpx with pdflatex, offering no option for disabling the choice. So if you later load lmodern you have to expect problems. – egreg Nov 05 '23 at 22:43

1 Answers1

1

The kaobook class is quite inflexible in the choice of fonts. It will use Libertinus with XeLaTeX or LuaLaTeX and NewPX with pdflatex (I'm not sure why different fonts).

If you really want to use lmodern with the class, you can trick it into thinking that newpxtext and newpxmath have already been loaded.

%%% trick kaobook into not loading NewPX
\ExpandArgs{c}\def{ver@newpxtext.sty}{}
\ExpandArgs{c}\def{opt@newpxtext.sty}{scaled=.97,helvratio=.93,p,theoremfont}
\ExpandArgs{c}\def{ver@newpxmath.sty}{}
\ExpandArgs{c}\def{opt@newpxmath.sty}{vvarbb,smallerops,bigdelims}
%%% end of hack

\documentclass[ fontsize=10pt, twoside=true]{kaobook}

\usepackage[french]{babel} % Load characters and hyphenation

%%%% A DECOMMENTER POUR AVOIR LES PUCES VOULUES %%%% %\frenchsetup{StandardItemLabels=true}

% Load mathematical packages for theorems and related environments \usepackage{kaotheorems}

% Load the package for hyperreferences \usepackage{kaorefs} \usepackage{lmodern} \usepackage{fixcmex}% <--- don't forget

\begin{document}

\mainmatter % Denotes the start of the main document content, resets page numbering and uses arabic

\setchapterstyle{kao} \setcounter{margintocdepth}{\sectiontocdepth} \marginlayout

N'affiche pas le + : $1+1$.

\begin{itemize} \item test 1 \end{itemize}

\end{document}

enter image description here

egreg
  • 1,121,712