For some reason the text of the second node is not printed inside the box of the node, but on the complete opposite side of the tikzpicture.

Any idea on how to fix it?



\begin{tikzpicture}[background rectangle/.style={fill=gray!33}, show background rectangle]

\node [draw,text width=0.75\textwidth, align=left, outer sep=0pt,inner sep=0pt](n1) {%
לורם איפסום דולור סיט אמט.

\node [draw,below = 0pt of n1.south east,anchor=north east,outer sep=0pt,inner sep=0pt](n2) {%
שלום עולם};
\filldraw (n2) circle (1pt);


(The MWE is with beamer but happens with article and book as well)

2 Answers 2


Add the package option layout=graphics, that is:


enter image description here

  • Oh, this is nice to know! Up to now, I always changed the language to English (or any other LTR language) for the TikZ environment and only in the nodes set the language back to the RTL language. This makes things much easier! Commented Mar 16, 2023 at 16:25
  • 2
    @JasperHabicht Yes, I remember :)
    – tush
    Commented Mar 16, 2023 at 16:30
  • 1
    Mixing RTL and LTR stuff is far from trivial. This options mostly works, but it may fail in some cases. Just report any issue you find and I’ll fix it (more precisely, I’ll do my best to fix it). Commented Mar 16, 2023 at 17:34
  • @JavierBezos That's right, as, for example, in the answer I wrote.
    – tush
    Commented Mar 17, 2023 at 13:47

Note that inserting a \noindent before the tikzpicture environment results in the problem to stay, regardless of the layout=graphics option.

Same with inserting text before the environment:

%% same preamble as in Javier Bezos' answer
אבג% so there is no \par command before the tikzpicture
〈same code〉

enter image description here

  • 1
    Thanks. I’ll have a look at it, but please don’t report bugs as an answer. Either ask for help or report the bug as explained in the manual or in the readme (I wonder if the downvote is for this reason, or perhaps because it’s not a MWE, but I would suggest to the downvoter a more constructive approach with a comment about the reason). I’ve opened an issue: github.com/latex3/babel/issues/227 Commented Mar 17, 2023 at 17:46

You must log in to answer this question.

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