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
858 stars 184 forks source link

The horizontal alignment of margin notes in framed theorem-like environments when combined with XeLaTeX #255

Open pi8027 opened 2 years ago

pi8027 commented 2 years ago

Description

An extra indentation appears only when we combine kaobook with XeLaTeX.

Minimal Working Example

\documentclass[
  a4paper,
  fontsize=10pt,
  twoside=false,
  secnumdepth=2,
  numbers=noenddot,
  fontmethod=tex,
]{kaobook}

\usepackage[framed]{kaotheorems}

\begin{document}

Some text.\marginnote{marginnote 1.}

\begin{theorem}

Some text.\marginnote{marginnote 2.}

\end{theorem}

Some text.\marginnote{marginnote 3.}

\end{document}

Expected behavior (what I got with pdfLaTeX):

The horizontal position of all the margin notes should be the same, like this: pdflatex

Actual behavior (what I got with XeLaTeX):

xelatex

pi8027 commented 2 years ago

I found a solution to this issue here: https://tex.stackexchange.com/questions/269426/wrong-marginnote-positions-inside-a-tikzpicture-with-xelatex