Open esarradj opened 2 years ago
I cannot reproduce it, the example compiles fine for me. Which kaobook version are you using?
By the way, the marginfigure
environment is not intended for text, but for figures; I don't know if this could be the cause of the problem. If you use \marginnote
instead, it might just work (unless you have a particular use-case for putting text in a marginfigure).
I cloned the repo and was using the latest version of kaobook and have tried many earlier versions to detect what the problem was. This way I found also the commit I have reverted to make it work.
I want to use marginfigure
for figures indeed. I used text only for the purpose of the MWE.
If it works for and for me not I suspect that it may have something to do with the versions of some packages that may be different. I am using vanilla Ubuntu 20.04 LTS which is updated daily and the present texlive version is 2019.20200218-1
Same error here, and @esarradj's hack works too. The error seems to come from the redefinition of the \marginskip
command:
marginfigure
s.\marginskip{0pt}
in my document, it raises a similar error.I'm not a LaTeX specialist enough to find out what the problem is...
EDIT: the error comes from the \vspace{#1 - \baselineskip}
, if I write \vspace{1cm - \baselineskip}
somewhere else it raises the same error. So I temporarily replaced this part with \vspace{#1}\vspace{-\baselineskip}}
.
Description
If a marginfigure or margintable environment is present, LaTeX stops with an error.
Minimal Working Example
Expected behavior:
Should compile without error.
Actual behavior:
Compilation stops with (see below)
Additional Information
The error goes away, if b9300e52bb7172604b5b2be56d4449728a48907c is reverted. Tested on standard Ubuntu 20.04 TeXLive.