diff options
author | Karl Berry <karl@freefriends.org> | 2019-04-02 21:02:58 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-04-02 21:02:58 +0000 |
commit | d66cfca1b1989bbf980473ff42a40a821a16d5aa (patch) | |
tree | c48efb984986ac40bbe81aedd211b1d46b3faefe /Master/texmf-dist/tex/xelatex/langsci/langsci-tikz.sty | |
parent | d7b2b4344970bfcf3f51d54b4753251f9e21471e (diff) |
langsci (2apr19)
git-svn-id: svn://tug.org/texlive/trunk@50706 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/xelatex/langsci/langsci-tikz.sty')
-rw-r--r-- | Master/texmf-dist/tex/xelatex/langsci/langsci-tikz.sty | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/xelatex/langsci/langsci-tikz.sty b/Master/texmf-dist/tex/xelatex/langsci/langsci-tikz.sty new file mode 100644 index 00000000000..96bcd052110 --- /dev/null +++ b/Master/texmf-dist/tex/xelatex/langsci/langsci-tikz.sty @@ -0,0 +1,25 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%% Experimental feature for pointing out moving things. %%%% +%%%% Buggy? Write to: kopeckyf@hu-berlin.de %%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\usetikzlibrary{arrows,arrows.meta} +\newcounter{lsConnectTempGroup} +\NewDocumentCommand\ConnectTail{m O{\thelsConnectTempGroup}}{%read: mandatory arg #1, optional argument #2 with the current group counter as its default value. + \edef\lsConnectTempPosition{#2}%\edef expands the argument, which means reading the current value of the counter. + {\tikz[remember picture, + anchor=base, baseline, + inner xsep=0pt, + inner ysep=-.5ex]\node (ConnectTempTail\lsConnectTempPosition) {\strut{}#1};}%\strut for baseline +} +\NewDocumentCommand\ConnectHead{s O{1ex} m O{\thelsConnectTempGroup}}{%read: star #1, optional argument (distance of arrow from text= std. one x-height), mand. arg. (node text), optional argument #2, the group specifier + \edef\lsConnectTempPosition{#4}% + \stepcounter{lsConnectTempGroup}%We have a match, let's update the group counter + {\tikz[remember picture, + anchor=base, baseline, + inner xsep=0pt, + inner ysep=-.5ex] \node (ConnectTempHead\lsConnectTempPosition) {\strut{}#3};% + \tikz[remember picture] \draw[% we have a tail and a head, let's bring them together + \IfBooleanTF#1{{Triangle[]}-}{-{Triangle[]}},% Check if the starred version is used. The starred version is right->left, the normal version left->right + overlay] (ConnectTempTail\lsConnectTempPosition.south) -- ++(0,-#2) -| (ConnectTempHead\lsConnectTempPosition.south); + }% +}
\ No newline at end of file |