2

When I use \marginnote inside a tcolorbox, it is shifted horizontally, as shown in the attached figure. Sorry for the lack of MWE -- this is a PreTeXt-generated LaTeX file, with about 1000 lines of preamble code.

My page geometry is: \geometry{inner=1in,textheight=9in,textwidth=320pt,marginparwidth=150pt,marginparsep=24pt,bottom=1in,footskip=29pt,showframe}

Divisions such as example, theorem, etc. are styled with tcolorbox. We use \marginnote to shift some figures to the margin. If a margin figure is inside a tcolorbox (like example) it gets shifted to the right.

I've tried adding a \noindent and \hskip-12pt before and after the \marginnote declaration but it doesn't seem to have an effect.

The image below shows one margin figure that's declared within an example, and further down the page, a figure that's not within an example. Frame borders are turned on to help illustrate.

a page displaying the shifting of a figure within a tcolorbox

1 Answer 1

1

OK, I think I tracked it down. Non-obvious duplicate here

It's an xelatex issue.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .