如何将 kaobook 的主字体更改为默认的 LaTeX 字体?

如何将 kaobook 的主字体更改为默认的 LaTeX 字体?

考博文件kao.sty包含以下部分encoding and fonts

\newif\ifxetexorluatex
\ifxetex
    \xetexorluatextrue
\else
    \ifluatex
        \xetexorluatextrue
    \else
        \xetexorluatexfalse
    \fi
\fi

\ifxetexorluatex
    \RequirePackage{amssymb} % Must be loaded before unicode-math
    \RequirePackage[force]{filehook} % Fixes an error
    \RequirePackage{unicode-math} % Math fonts in xetexorluatex
    \setromanfont[
        Scale=1.04
    ]{Libertinus Serif}
    \setsansfont[
        Scale=1
    ]{Libertinus Sans}
    \setmonofont[
        Scale=.89
    ]{Liberation Mono}
    \setmathfont{Libertinus Math}
    \ifluatex
    \else
        %\RequirePackage{morewrites} % Fix some errors related to floats
    \fi
\else
    \RequirePackage[utf8]{inputenc} % utf8 encoding in the input (.tex) file
    \RequirePackage[T1]{fontenc} % utf8 encoding in the output (.pdf) file

    \RequirePackage{amssymb} % Math symbols, including \blacktriangleright, used for bullets
    \RequirePackage[scaled=.97,helvratio=.93,p,theoremfont]{newpxtext} % Serif palatino font
    \RequirePackage[vvarbb,smallerops,bigdelims]{newpxmath} % Math palatino font
    \RequirePackage[scaled=.85]{beramono} % Monospace font
    \RequirePackage[scr=rsfso,cal=boondoxo]{mathalfa} % Mathcal from STIX, unslanted a bit
    %\RequirePackage{morewrites} % Fix some errors related to floats
\fi

% When using the Palatino (newpxtext) font, it is better to use a 
% slightly larger stretch.
%\setstretch{1.10}
\linespread{1.07} % Give Palatino more leading (space between lines)

删除第三个块\else(左侧有轮廓)确实会改变字体,但也会弄乱所有链接设置,并将词汇表打印在标题页前面的一页上,而且排列不整齐,而是放在一个文本块中。例如,我说的弄乱链接,是指现在目录条目周围有块。

有什么想法吗?

答案1

在等待更好的答案时,您可以删除(或评论) \RequirePackage[scaled=.97,helvratio=.93,p,theoremfont]{newpxtext} 或将其更改为 \RequirePackage[]{lmodern}

相关内容