Take the 2-minute tour ×

I'm trying to implement in XeLaTeX the Syriac Abbreviation Mark (see here: http://en.wikipedia.org/wiki/Syriac_Abbreviation_Mark).

The code I came up with is the following:

\def^^^^070f#1 {\zwj\aemph{#1}\ }

Now I can use the control character in the text (assuming I have a Syriac font):




\setmainfont{Estrangelo Edessa}



ܫܠ܏ܡܳܐ ܫܠܡܐ.


Here is the result:

Example of Syriac Abbreviation Mark

This is not perfect for two reasons. First, it requires a space to end the control sequence (in fact, it should be ended by any non-Syriac character). Second, ideally the result should be an overline with 3 dots in it (beginning, end and middle - see above Wikipedia article for example).

Could anyone help me out with this?

share|improve this question
Welcome to TeX.sx! As it stands the code is completely wrong and it's difficult to understand what it should do. –  egreg Apr 23 '13 at 9:01
I realized now that I could simplify the code using the \aemph command defined in Polyglossia. This would yield the following code: \catcode`܏=13 \newcommand{\zwj}{‍} \def܏#1 {\zwj\aemph{#1}\ } –  Ariel Apr 23 '13 at 9:18
\catcode`13= is meaningless. Or, better, it has a meaning that's surely not what you want. Also \def1# { is illegal. It seems that you're mixing left-to-right with right-to-left. –  egreg Apr 23 '13 at 9:20
There is a problem here with the rendering of this Unicode character (which is Right-To-Left and thus messes up the order). It just makes the SAM character (U+070F) an active character. The second command defines \zwj as a substitute for the ZWJ character (U+200D). The last command defines the the SAM character followed by an argument and then a space as {\zwj\aemph{#1}\ }. –  Ariel Apr 23 '13 at 9:25
You can use the ^ convention: \catcode`^^^^070f=13 and then \def^^^^070f#1{...}; you can also say \chardef\zwj="200D which is easier. May you try it and expand to a complete example? –  egreg Apr 23 '13 at 9:31
show 2 more comments

1 Answer

Here is a tikz method:

\tikzstyle{zwj}=[inner sep=0pt,outer sep=0pt,anchor=base]
\tikzstyle{zwjdot}=[circle,draw,fill,inner sep=0pt,outer sep=0pt,minimum width=1pt]
      \node[zwj] (text) {#1};
      \useasboundingbox (text.base west) rectangle (text.north east);
      \draw ([yshift=2ex]text.base west) -- ([yshift=2ex]text.base east)
         node[pos=0,zwjdot] {}
         node[pos=1,zwjdot] {}
         node[pos=0.5,zwjdot] {};

foobar         & puckluck \\
\zwj{foo}bar   & \zwj{puck}luck

At this point the descenders are changing the vertical alignment. I'll try more later.

sample code output

share|improve this answer
The line looks beautiful, but this has the unfortunate side effect of not respecting the text order (which is Right-to-Left in Syriac). By the way, one should probably call your macro \sam as it stands for Syriac Abbreviation Mark (ZWJ = Zero-Width-Joiner, which is responsible for the contextual shaping of the letters). –  Ariel Apr 23 '13 at 9:38
@Ariel: Hm.. I'll have to think more about RTL. But I did fix the baseline problem. –  Matthew Leingang Apr 23 '13 at 10:00
add comment

Your Answer


