6

I have read Typesetting straight baselines in a circular arrangement and I would like to have a solution for my situation.

I would like to insert some text in Hebrew on an annulus. Here is my attempt at doing so:

\begin{figure}
\begin{centering} 
\begin{tikzpicture} 
\draw[color=black] (0,0) circle (25pt); 
\draw[color=black] (0,0) circle (40pt); 
\newfontfamily\hebrewfont[Scale=1.5,Script=Hebrew]{Adobe Hebrew} 
\path 
    [ 
        postaction={ 
            decorate, 
            decoration={ 
                raise=-7pt, 
                text along path, 
                text align/fit to path stretching spaces=false, 
                reverse path=true, 
                text align/align=right, 
                text align/left indent={40pt},  
                text align/right indent={45pt}, 
                text={|\hebrewfont | א ב ג ד } 
            } 
        } 
    ] (0,0) circle (36pt); 
\newfontfamily\hebrewfont[Scale=.8,Script=Hebrew]{Adobe Hebrew} 
\path 
    [ 
        postaction={ 
            decorate, 
            decoration={ 
                raise=-7pt, 
                text along path, 
                text align/fit to path stretching spaces=false, 
                reverse path=true, 
                text align/align=right, 
                text align/left indent={0pt},  
                text align/right indent={0pt}, 
                text={|\hebrewfont | ה ו ז ח ט י} 
            } 
        } 
    ] (0,0) circle (22pt); 
\end{tikzpicture} 
\end{centering} 
\end{figure}

As you can see in the first string of Hebrew characters in the above, the readable sequence is א ב ג ד (from Aleph to Dalet) - but, after the composition, I get ד ג ב א (from Dalet to Aleph) and it means that the characters are set from left to right instead from right to left.

I'm using documentclass=memoir and xelatex as typesetting engine.

Is it possible to write Hebrew text as path decoration in the proper direction?

2
  • So, are you only getting this problem when you also typeset the ה ו ז ח ט י? If not, I again advise that you reduce your working example. In fact, the more you can throw out, the closer you get to figuring out where the problem is exactly.
    – einpoklum
    Commented Nov 6, 2013 at 6:08
  • Interestingly, when putting the Hebrew part into brackets again (i.e. text={|\hebrewfont | {א ב ג ד} }), it works, but of course, the characters aren't aligned properly anymore, so I guess, you have to tell tikz to align the characters in a rtl manner. Commented Apr 1, 2014 at 22:42

1 Answer 1

1

This is basically from trial and error, but at least it matches what your MWE produces, except with the Hebrew going from right to left.

\documentclass{article}
\usepackage{polyglossia}
\usepackage{tikz}
\usetikzlibrary{decorations.text}
\setmainlanguage{english}
\setotherlanguage{hebrew}
\newfontfamily\hebrewfont[Script=Hebrew]{SBL BibLit} 
\newfontfamily\hebrewlarge[Scale=1.5,Script=Hebrew]{SBL BibLit} 
\newfontfamily\hebrewsmall[Scale=0.8,Script=Hebrew]{SBL BibLit} 
\pagestyle{empty}
\begin{document}
\begin{tikzpicture}
  \draw[color=black] (0,0) circle (25pt); 
  \draw[color=black] (0,0) circle (40pt); 
  \path[
      rotate=70,
      postaction={
        decorate,
        decoration={
          raise=-7pt, 
          text effects along path,
          text effects/every character/.style={text along path},
          reverse path=true,
          text={ א ב ג ד },
          text effects/font = {\hebrewlarge},
          text align/align=right, 
          text effects/reverse text=true
        }
      }
    ] (0,0) circle (36pt);
  \path[ 
      postaction={ 
        decorate, 
        decoration={ 
          raise=-7pt, 
          text effects along path,
          text effects/every character/.style={text along path},
          reverse path=true,
          text={ ה ו ז ח ט י },
          text effects/font = {\hebrewsmall},
          text align/align=right, 
          text effects/reverse text=true
        } 
      } 
    ] (0,0) circle (22pt); 
\end{tikzpicture}
\end{document}

enter image description here

You must log in to answer this question.

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