latex3 / babel

The babel system for LaTeX, LuaLaTeX and XeLaTeX
LaTeX Project Public License v1.3c
124 stars 34 forks source link

Misplaced text with in-line tikz in RTL #227

Closed jbezos closed 1 year ago

jbezos commented 1 year ago

Duplicate. See https://github.com/latex3/babel/issues/211

From https://tex.stackexchange.com/a/679828/5735.

\documentclass{beamer}
\usepackage{tikz}
\usetikzlibrary{positioning,backgrounds}

\usepackage[english,hebrew,bidi=basic,layout=graphics,provide=*]{babel}
\babelfont[hebrew]{sf}[Script=Hebrew]{Arial}

\begin{document}
\begin{frame}

אבג
\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);
\end{tikzpicture}
\end{frame}
\end{document}
seloumi commented 1 year ago

Maybe this is the same issue I posted here https://github.com/latex3/babel/issues/211#

\documentclass{beamer}
\usepackage{tikz}
\usetikzlibrary{positioning,backgrounds}

\usepackage[english,hebrew,bidi=basic,layout=graphics,provide=*]{babel}
\babelfont[hebrew]{sf}[Script=Hebrew]{Arial}

\begin{document}
\begin{frame}
אבג
\begin{tikzpicture}
\draw (0,0) rectangle (3,2);
\end{tikzpicture}%

\end{frame}
\end{document}
jbezos commented 1 year ago

@seloumi Silly me! You are right.