summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/xelatex/langsci/langsci-optional.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-04-02 21:02:58 +0000
committerKarl Berry <karl@freefriends.org>2019-04-02 21:02:58 +0000
commitd66cfca1b1989bbf980473ff42a40a821a16d5aa (patch)
treec48efb984986ac40bbe81aedd211b1d46b3faefe /Master/texmf-dist/tex/xelatex/langsci/langsci-optional.sty
parentd7b2b4344970bfcf3f51d54b4753251f9e21471e (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-optional.sty')
-rw-r--r--Master/texmf-dist/tex/xelatex/langsci/langsci-optional.sty176
1 files changed, 133 insertions, 43 deletions
diff --git a/Master/texmf-dist/tex/xelatex/langsci/langsci-optional.sty b/Master/texmf-dist/tex/xelatex/langsci/langsci-optional.sty
index 369b9f5292a..a835d260aff 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: Date: 2019-03-31 13:12 UTC
%% Purpose: This file contains useful, but not essential,
%% macros for books using langscibook.cls
%% Language: LaTeX
@@ -152,6 +152,13 @@
\fi%
#3)}\nopagebreak[4]\ignorespaces}
+\newcommand{\langinfoverb}[3]{{\upshape #1~(% langinfo without index marker
+\ifx\\#2\\%
+\else%
+#2;
+\fi%
+#3)}\nopagebreak[4]\ignorespaces}
+
\newcommand{\fittable}[1]{\resizebox{\textwidth}{!}{#1}}
@@ -195,7 +202,7 @@
%no hyphenation left alingned
\newcolumntype{Q}{>{\raggedright\arraybackslash}X}
%no hyphenation right aligned
-\newcolumntype{S}{>{\raggedleft\arraybackslash}X}
+\newcolumntype{Y}{>{\raggedleft\arraybackslash}X}
%no hyphenation centered
\newcolumntype{C}{>{\centering\arraybackslash}X}
%no hyphenation fixed width
@@ -266,8 +273,6 @@
\newcommand{\threedigitexamples}{\exewidth{(234)}}
\newcommand{\fourdigitexamples}{\exewidth{(2345)}}
-\newcommand{\noabstract}{\vspace*{-2\baselineskip}} %for chapters without abstract
-
\newcommand{\rephrase}[2]{{\color{yellow!30!black}#2}\todo{replaced `#1'}}
\newcommand{\missref}[2][]{\todo[#1]{missing reference #2}}
@@ -303,49 +308,134 @@
{\list{}{\leftmargin=#1\rightmargin=0mm}\item[]}%
{\endlist}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%% 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);
+ }%
+}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%% Extras for use in (some) edited volumes %%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% for chapters without abstract
+\newcommand{\noabstract}{\vspace*{-2\baselineskip}}
+
+% for papers that have appendices, a replacement for \appendix.
+% Usage: \begin{paperappendix} \section{Title} ... \end{paperappendix
+% Will result in "Appendix A: Title"
+%
+\newcounter{paperappendixsection}
+\newenvironment{paperappendix}{%
+ \let\oldthesection\thesection%
+ \let\oldsectionformat\sectionformat%
+ \setcounter{paperappendixsection}{0}%
+ \def\thesection{\Alph{paperappendixsection}}%
+ \def\sectionformat{\stepcounter{paperappendixsection}\appendixname\ \thesection:\enskip}%
+ }{%
+ \let\thesection\oldthesection%
+ \let\sectionformat\oldsectionformat}
+
%%%%%%%%%%%%%%%%%%%%
%%%% %%%%%
%%%% PLOTS %%%%%
%%%% %%%%%
%%%%%%%%%%%%%%%%%%%%
+
+% \newcommand{\barplot}[4]{%
+% \begin{tikzpicture}
+% \begin{axis}[
+% xlabel={#1},
+% ylabel={#2},
+% axis lines*=left,
+% width = \textwidth,
+% height = .3\textheight,
+% nodes near coords,
+% xtick=data,
+% x tick label style={},
+% ymin=0,
+% symbolic x coords={#3},
+% ]
+% \addplot+[ybar,lsRichGreen!80!black,fill=lsRichGreen] plot coordinates {
+% #4
+% };
+% \end{axis}
+% \end{tikzpicture}
+% }
+% \usepackage{pgfmath,pgfplotstable}
+% \newcommand{\langsciplot}[2]{%% experimental
+% \pgfplotstablegetcolsof{#1.csv}
+% \pgfmathsetmacro{\langscicsvlength}{\pgfplotsretval-1}
+% \begin{tikzpicture}[trim axis right,trim axis left]
+% \begin{axis}[
+% #2,
+% xtick=data,
+% axis lines*=left,
+% nodes near coords,
+% ymin=0,
+% width=\textwidth]
+% \foreach \i in {0,...,\langscicsvlength} {
+% \addplot[
+% /pgf/number format/read comma as period
+% ] table [x index={0},y index={\i}] {#1.csv};
+% }
+% \end{axis}
+% \end{tikzpicture}
+% }
+
+\newcommand{\LSfrac}[1]{{\addfontfeature{Fractions=On}#1}}% Use the fraction glyphs shipped with Libertine. The argument is n/m, where n and m are integers
+
+
+% Provide a raised tie bar for diphthongs and affricates with ascenders
+\newcommand{\hitie}[2]{%
+\mbox{#1}%
+\raisebox{.5mm}{%
+͡%
+}%
+\mbox{#2}%
+}
+
-\newcommand{\barplot}[4]{%
- \begin{tikzpicture}
- \begin{axis}[
- xlabel={#1},
- ylabel={#2},
- axis lines*=left,
- width = \textwidth,
- height = .3\textheight,
- nodes near coords,
- xtick=data,
- x tick label style={},
- ymin=0,
- symbolic x coords={#3},
- ]
- \addplot+[ybar,lsRichGreen!80!black,fill=lsRichGreen] plot coordinates {
- #4
- };
- \end{axis}
- \end{tikzpicture}
+\newcommand{\hitier}[3][.7]{%
+\mbox{#2}%
+\hspace*{#1mm}%
+\raisebox{.5mm}{%
+͡%
+}%
+\hspace*{-#1mm}%
+\mbox{#3}%
}
-\usepackage{pgfmath,pgfplotstable}
-\newcommand{\langsciplot}[2]{%% experimental
- \pgfplotstablegetcolsof{#1.csv}
- \pgfmathsetmacro{\langscicsvlength}{\pgfplotsretval-1}
- \begin{tikzpicture}[trim axis right,trim axis left]
- \begin{axis}[
- #2,
- xtick=data,
- axis lines*=left,
- nodes near coords,
- ymin=0,
- width=\textwidth]
- \foreach \i in {0,...,\langscicsvlength} {
- \addplot[
- /pgf/number format/read comma as period
- ] table [x index={0},y index={\i}] {#1.csv};
- }
- \end{axis}
- \end{tikzpicture}
-} \ No newline at end of file
+
+
+\newcommand{\hitiel}[3][.7]{%
+\mbox{#2}%
+\hspace*{-#1mm}%
+\raisebox{.5mm}{%
+͡%
+}%
+\hspace*{#1mm}%
+\mbox{#3}%
+}
+
+