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.
https://github.com/fmarotta/kaobook
LaTeX Project Public License v1.3c
861 stars 185 forks source link

Undefined Control Sequence \theoremstyle #202

Closed Queuecumber closed 2 years ago

Queuecumber commented 2 years ago

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

Queuecumber commented 2 years ago

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

AlexanderZeilmann commented 2 years ago

Have a look at https://github.com/fmarotta/kaobook/issues/193#issuecomment-992328930 and the following discussion

Queuecumber commented 2 years ago

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