Open jbezos opened 5 years ago
Unfortunately I only speak languages with Latin alphabet, so I am pretty useless here, but it is an interesting problem and it should definitely be addressed.
Let me then pose a similar problem. Let's assume I want to set the color, to underline, to enclose in braces, to add a bullet before, etc., of any text inside a figure (very likely, the text start is enough). The point of my question is, how can I catch every possible piece of text (or most of them) inside a figure? I'd say \tikz@atbegin@node
is a good candidate for nodes. (The code to be inserted at those places is my problem.)
I've had a look at this again. First of all, instead of appending to the low-level macro \tikz@atbegin@node
it is better to use the execute at begin node
key.
Anyway, I think what you are looking for are these two hooks: https://github.com/pgf-tikz/pgf/blob/5d179300a9dcc879414cb86bca28d6a3f2fc0a08/tex/generic/pgf/systemlayer/pgfsys.code.tex#L619-L630
As the current maintaner of
babel
, I'd like to makepgf
compatible with bidi text usingluatex
. The aim is to generate graphics with Arabic, Hebrew, Farsi, etc., text without explicit markup (ie, the direction is set by thepgf
commands). After a few experiments with nodes, it seems the hooks provided bypgf
could do the trick. For example (and with the corresponding internal macro):\g@addto@macro\pgfsys@beginpicture{\textdir TLT} \g@addto@macro\tikz@atbegin@node{\textdir TRT}
But I'm not sure this is the way to go or there are better alternatives. Here is a sample file (from the Persian
lshort
):