fmarotta / kaobook

A LaTeX class for books, reports or theses based on https://github.com/kenohori/thesis and https://github.com/Tufte-LaTeX/tufte-latex.

Home Page:https://github.com/fmarotta/kaobook

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Undefined Control Sequence \theoremstyle

Queuecumber opened this issue · comments

Description

I get the following error when building with kaobook:

! Undefined control sequence.
l.563     \theoremstyle
                       {plain}

This comes from the newpxtext package. It seems to happen whether or not I load kaotheorems.

I'm not totally convinced that this is necessarily a kaobook error, as it looks like newpxtext was updated pretty recently and it could be that it broke something with amsthm, but nothing I've tried to debug it works or really helps narrow down the issue at all so I'd appreciate some help on that. Also I'm not sure where to get an older version of newpxtext and there isnt an easy way to downgrade it using arch linux.

I'm using the texlive version from arch linux which is 2021 and was updated on the 27th presumably this includes the latest newpxtext which was updated on the 25th.

Minimal Working Example

The minimal_book example throws this error for me, I can put together an even minimaler one if you want I compile it with pdflatex -output-directory examples/minimal_book main.tex

The following minimal example without kaobook does work BTW:

\documentclass{article}

\usepackage{amsthm}
\usepackage[scaled=.97,helvratio=.93,p,theoremfont]{newpxtext}

\begin{document}

Name, date, Exercise X

\section*{Part a}

Put your answer to part a here

\section*{Part b}

etc

\end{document}

so I don't think it is necessarily newpxtext that is broken here

Have a look at #193 (comment) and the following discussion

Yes I was able to fix it by following option (2) and loading amsmath in kao.sty thanks for the pointer, I should have searched the issues more thoroughly before opening a new one