无法使用 TexLive 2021 正确编译 kaobook

无法使用 TexLive 2021 正确编译 kaobook

我从以下网站下载了 kaobook 模板https://github.com/fmarotta/kaobook,它曾经可以与 Texlive 2019 和 2020 正确编译。但是,当我尝试使用 TexLive 2021 进行编译时,sidenotemarginfigure根据marginnote使用的单位插入文本“pt0pt”或“em”。

在此处输入图片描述

\documentclass[fontsize=10pt,twoside=true,numbers=noenddot]{kaobook}
\usepackage{amssymb}
\renewcommand{\labelitemi}{\small$\blacktriangleright$}
\renewcommand{\labelitemii}{\textbullet}
\usepackage{enumitem}
\setlist[itemize]{noitemsep}
\setlist[enumerate]{noitemsep}
\setlist[description]{noitemsep}
\usepackage{tikz}
\usepackage[framemethod=TikZ]{mdframed}

%\mdfsetup{skipabove=\topskip,skipbelow=0pt}
\mdfdefinestyle{kaoboxstyle}{
    skipabove=1.5\topskip,
    skipbelow=.5\topskip,
    rightmargin=0pt,
    leftmargin=0pt,
    %innertopmargin=3pt,
    %innerbottommargin=3pt,
    innerrightmargin=7pt,
    innerleftmargin=7pt,
    topline=false,
    bottomline=false,
    rightline=false,
    leftline=false,
    %linewidth=1pt,
    %roundcorner=0pt,
    %font={},
    %frametitlefont={},
    frametitlerule=true,
    linecolor=black,
    %backgroundcolor=LightBlue,
    fontcolor=black,
    %frametitlebackgroundcolor=LightBlue,
}

\newmdenv[
style=kaoboxstyle,
backgroundcolor=RoyalBlue!25!White,
frametitlebackgroundcolor=RoyalBlue!25!White,
]{kaobox}

%----------------------------------------------------------------------------------------
%   ENVIRONMENT WITH A COUNTER
%----------------------------------------------------------------------------------------

\newenvironment{kaocounter}{
    \refstepcounter{kaocounter}
    \begin{kaobox}[frametitle=Comment~\thekaocounter\autodot]
    }{
    \end{kaobox}
}

\newcounter{kaocounter}
\numberwithin{kaocounter}{section}
\newcommand*{\kaocounterformat}{% Format for the caption
    Comment~\thekaocounter\csname autodot\endcsname}
\newcommand*{\fnum@kaocounter}{\kaocounterformat}


%----------------------------------------------------------------------------------------
%   FLOATING ENVIRONMENT WITH TOC ENTRIES
%----------------------------------------------------------------------------------------

\newenvironment{kaofloating}{%
    \@float{kaofloating}%
}{%
    \end@float
}

\newcommand*{\fps@floatingbox}{tbph}
\newcommand*{\ftype@floatingbox}{5}
\newcommand*{\floatingboxformat}{%
    Insight~\thefloatingbox\csname autodot\endcsname}
\newcommand*{\fnum@floatingbox}{\floatingboxformat}
\newcommand*{\ext@floatingbox}{loi}

\addtotoclist[float]{loi}
\newcommand*{\listofloiname}{List of Insights}
\newcommand*{\l@floatingbox}{\l@figure}
\newcommand*{\listofinsights}{\listoftoc{loi}}

%----------------------------------------------------------------------------------------
%   CITATION ENVIRONMENT
%----------------------------------------------------------------------------------------

% TODO: create a fancy environment for this. Perhaps printing also the 
% abstract.

% Cite commands (assuming biblatex is loaded)
\DeclareCiteCommand{\fullcite}{%
    \defcounter{maxnames}{99}%
    \usebibmacro{prenote}}
{\clearfield{url}%
    \clearfield{pages}%
    \clearfield{pagetotal}%
    \clearfield{edition}%
    \clearfield{issn}%
    \clearfield{doi}%
    \usedriver
    {\DeclareNameAlias{sortname}{default}}
    {\thefield{entrytype}}
}
{\multicitedelim}
{\usebibmacro{postnote}}

\begin{document} 
\KOMAoptions{twoside=semi}
\maketitle
\KOMAoptions{twoside=false}

\chapter{Genetic control}

This chapter contains notes on genetic control.

\section{Objectives}

\begin{kaobox}[frametitle=Objectives]
    
    \begin{itemize}
        \item  Nucleic Acids
        
        
        \begin{itemize}
            \scriptsize
            \item   describe the structure of a nucleotide
            \item   describe formation of a dinucleotide
            \item   distinguish between Ribonucleic acid (RNA) \&   Deoxyribonucleic acid (DNA) nucleotides
            
        \end{itemize}
        \item Structure and replication of DNA
        \begin{itemize}
            \scriptsize
            \item  describe the structure of DNA
            \item  explain how DNA replicates
            
        \end{itemize}
        
        \item Protein synthesis
        \begin{itemize}
            \footnotesize
            \item  outline the process of protein synthesis
            
        \end{itemize}
    \end{itemize}
\end{kaobox}


\\
\section{Nucleic acid}

\marginnote[-12em]{Zthini lapha}
\begin{itemize}
    \item olla olla zthini la
\end{itemize}

\end{document}

相关内容