summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/xelatex/langsci/langsci-optional.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/xelatex/langsci/langsci-optional.sty')
-rw-r--r--Master/texmf-dist/tex/xelatex/langsci/langsci-optional.sty43
1 files changed, 28 insertions, 15 deletions
diff --git a/Master/texmf-dist/tex/xelatex/langsci/langsci-optional.sty b/Master/texmf-dist/tex/xelatex/langsci/langsci-optional.sty
index 58d9834825e..c00c0d4c027 100644
--- a/Master/texmf-dist/tex/xelatex/langsci/langsci-optional.sty
+++ b/Master/texmf-dist/tex/xelatex/langsci/langsci-optional.sty
@@ -1,7 +1,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% File: langsci-optional.sty
%% Author: Language Science Press (http://langsci-press.org)
-%% Date: 2016-01-16 16:47:43 UTC
+%% Date: 2024-12-03 11:47:43 UTC
%% Purpose: This file contains useful, but not essential,
%% macros for books using langscibook.cls
%% Language: LaTeX
@@ -235,29 +235,42 @@
}
}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%% 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.
+% Arguments:
+% mandatory arg #1,
+% optional argument #2 with the current group counter as its default value.
+\NewDocumentCommand\ConnectTail{m O{\thelsConnectTempGroup}}{%
+ \edef\lsConnectTempPosition{#2}%\edef reads 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
+ inner ysep=-.5ex]
+ \node (ConnectTempTail\lsConnectTempPosition) {\strut{}#1};}%
}
-\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
+% Arguments:
+% star #1,
+% optional argument (distance of arrow from text= std. one x-height),
+% mand. arg. (node text),
+% optional argument #2, the group specifier
+% optional argument #3, some node text
+\NewDocumentCommand\ConnectHead{s O{1ex} m O{\thelsConnectTempGroup}}{%
\edef\lsConnectTempPosition{#4}%
- \stepcounter{lsConnectTempGroup}%We have a match, let's update the group counter
+ %We have a match, let's update the group counter
+ \stepcounter{lsConnectTempGroup}%
{\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);
+ inner ysep=-.5ex]
+ \node (ConnectTempHead\lsConnectTempPosition) {\strut{}#3};%
+ \tikz[remember picture] \draw[overlay,
+ % Check if the starred version is used. The
+ % starred version is right->left, the normal
+ % version left->right
+ \IfBooleanTF#1{{Triangle[]}-}{-{Triangle[]}}]
+ (ConnectTempTail\lsConnectTempPosition.south)
+ -- ++(0,-#2) -|
+ (ConnectTempHead\lsConnectTempPosition.south);%
}%
}
@@ -346,7 +359,7 @@
\providecommand{\lsptoprule}{\midrule\toprule}
\providecommand{\lspbottomrule}{\bottomrule\midrule}
-\providecommand{\REF}[2][]{(\ref{#2#1})}
+\providecommand{\REF}[2][]{(\ref{#2}#1)}
\newcommand{\glottocodes}[1]{}