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 ?

4
  • kaotheorems.sty and kaorefs.sty are not in texlive, this I assume? github.com/fmarotta/kaobook Commented Nov 5, 2023 at 20:44
  • 1
    @DavidCarlisle \documentclass[]{article} \usepackage{newpx} \usepackage{lmodern} \begin{document} N'affiche pas le + : $1+1$. \end{document} Commented Nov 5, 2023 at 20:47
  • 2
    do not load lmodern. That clashes with newpx loaded by the class. Commented Nov 5, 2023 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
    Commented Nov 5, 2023 at 22:43

1 Answer 1

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{[email protected]}{}
\ExpandArgs{c}\def{[email protected]}{scaled=.97,helvratio=.93,p,theoremfont}
\ExpandArgs{c}\def{[email protected]}{}
\ExpandArgs{c}\def{[email protected]}{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

You must log in to answer this question.

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