Open u-fischer opened 2 months ago
Thanks for the report. The following patch seems to solve the problem.
diff --git a/usr/local/texlive/2024/texmf-dist/tex/luatex/luamplib/luamplib.sty b/texmf/tex/luatex/luamplib/luamplib.sty
index 6655770..2ce00a4 100644
--- a/usr/local/texlive/2024/texmf-dist/tex/luatex/luamplib/luamplib.sty
+++ b/texmf/tex/luatex/luamplib/luamplib.sty
@@ -202,7 +202,7 @@
\ifx\mplibscratchbox\undefined \newbox\mplibscratchbox \fi
\def\mplibstarttoPDF#1#2#3#4{%
\prependtomplibbox
- \hbox\bgroup
+ \hbox dir TLT\bgroup
\xdef\MPllx{#1}\xdef\MPlly{#2}%
\xdef\MPurx{#3}\xdef\MPury{#4}%
\xdef\MPwidth{\the\dimexpr#3bp-#1bp\relax}%
As for RTT mode (CJK vertical writing), the bounding box still does not match.
But as packages luatexko
and luatexja
do not seem to use RTT mode, I will leave it as it is.
A new version will be uploaded soon.
(extracted from https://tex.stackexchange.com/questions/716319/has-anything-gone-wrong-with-mpchess)
mplibcode is not bidi aware. In the following example, the content of the mplibcode spills out of the bounding box if the direction is set to TRT:
everything is fine without the
\pardir TRT \textdir TRT
: