Open
Description
(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:
\documentclass{book}
\usepackage{luamplib}
\usepackage{fontspec}
\setmainfont{amiri}
\begin{document}\showoutput
\pardir TRT \textdir TRT
هذا النص يمكن أن يتم تركيبه على أي تصميم دون مشكلة فلن يبدو وكأنه نص منسوخ، غير منظم، غير منسق، أو حتى غير مفهوم. لأنه مازال نصاً بديلاً ومؤقتاً.
\fbox{\begin{mplibcode}
beginfig(0);
color red ; red = (1, 0, 0) ;
fill (0,0)--(100,0)--(100,100)--(0,100)--cycle withcolor red;
endfig;
\end{mplibcode}}
هذا النص يمكن أن يتم تركيبه على أي تصميم دون مشكلة فلن يبدو وكأنه نص منسوخ، غير منظم، غير منسق، أو حتى غير مفهوم. لأنه مازال نصاً بديلاً ومؤقتاً.
\end{document}
everything is fine without the \pardir TRT \textdir TRT
:
Metadata
Metadata
Assignees
Labels
No labels