summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/latex/linguex/linguex-doc.pdfbin100736 -> 103689 bytes
-rw-r--r--Master/texmf-dist/doc/latex/linguex/linguex-doc.tex70
-rw-r--r--Master/texmf-dist/tex/latex/linguex/linguex.sty175
3 files changed, 162 insertions, 83 deletions
diff --git a/Master/texmf-dist/doc/latex/linguex/linguex-doc.pdf b/Master/texmf-dist/doc/latex/linguex/linguex-doc.pdf
index def722ac69a..f34f1a0cf63 100644
--- a/Master/texmf-dist/doc/latex/linguex/linguex-doc.pdf
+++ b/Master/texmf-dist/doc/latex/linguex/linguex-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/linguex/linguex-doc.tex b/Master/texmf-dist/doc/latex/linguex/linguex-doc.tex
index fa96f12d607..a44b7556a8e 100644
--- a/Master/texmf-dist/doc/latex/linguex/linguex-doc.tex
+++ b/Master/texmf-dist/doc/latex/linguex/linguex-doc.tex
@@ -1,9 +1,9 @@
%% linguex-doc.tex version 2.0
-%% documentation of linguex.sty version 3.7
+%% documentation of linguex.sty version 4.0
%% Author: Wolfgang.Sternefeld@uni-tuebingen.de
%% filedate 2008/06/30
\documentclass{article}
-\usepackage{linguex}
+\usepackage{linguexVPagin}
%\usepackage{linguho}
%\usepackage[*]{linguho}
%\documentstyle[linguex]{article}
@@ -13,7 +13,7 @@
\begin{document}
\title{linguex.sty Documentation}
\author{Wolfgang Sternefeld\\
-Version 3.7 --- June 2008}
+Version 4.0 --- September 2009}
\date{}
\maketitle
@@ -113,8 +113,8 @@ Reference to subexamples can only be obtained by adding an (optional) argument
to the above Next- and Last-commands. For example, saying
\verb.\NNext[g-ii]. right now yields \NNext[g-ii]. The dash between
\addtocounter{ExNo}{2}\arabic{ExNo}\addtocounter{ExNo}{-2} and g is
-defined as \verb|\refdash|. It can be suppressed by
-\verb|\renewcommand{\refdash}{}|.
+defined as \verb|\firstrefdash|. It can be suppressed by
+\verb|\renewcommand{\firstrefdash}{}|.
\subsection*{Footnotes}%
@@ -370,6 +370,24 @@ are given a negative indentation. This is controled by the lengths
\verb.\alignSubExnegindent. and \verb.\Exlabelsep.,
which can be customized by \verb-\setlength-. after \verb.\begin{document}..
+The spacing between two subsequent examples is defined by
+\verb.\Exredux., whose default is \verb.-\baselineskip.. Saying
+\verb.\resetExdefaults. returns to all defaults as defined below:
+\begin{verbatim}
+\newcommand{\resetExdefaults}{%
+ \setlength{\Exlabelsep}{1.3em}%
+ \setlength{\Extopsep}{.66\baselineskip}%
+ \setlength{\SubSubExleftmargin}{2.4em}%
+ \setlength{\SubExleftmargin}{2em}%
+ \setlength{\Exindent}{0pt}%
+ \setlength{\Exlabelwidth}{4em}%
+ \setlength{\alignSubExnegindent}{\Exlabelsep}%
+ \ifalignSubEx\addtolength{\Exlabelsep}{.7em}%
+ \addtolength{\alignSubExnegindent}{.7em}\fi
+ \setlength{\Exredux}{-\baselineskip}%
+}
+\end{verbatim}
+
\subsection*{Customizing Labels}%
The labels of the examples are created by the counters \verb-ExNo-,
@@ -458,30 +476,56 @@ and Linguistics} requires examples of the following form:
\setlength{\Exlabelsep}{2em}
\exi.
-[v [v broke_i $\emptyset$ ][VP the vase [V$'$ t_i into
+[V [V broke_i $\emptyset$ ][VP the vase [V$'$ t_i into
pieces ]]]
-\ex.\def\SubExLeftBracket{(}\def\SubExRightBracket{)}
+\ex.\def\SubExLBr{(}\def\SubExRBr{)}
\a. It kept warm
\b. She kept it warm\global\alignSubExfalse
Apart form
specifying \verb.\alignSubExtrue. before \verb.\begin{document}.
-this requires to redefine the brackets of sublabels, as shown below:
+\Last requires to redefine the brackets of sublabels, as shown below:
\resetExdefaults
\begin{verbatim}
-\renewcommand{\SubExLeftBracket}{(}
-\renewcommand{\SubExRightBracket}{)}
+\renewcommand{\SubExLBr}{(}
+\renewcommand{\SubExRBr}{)}
\setlength{\Exlabelsep}{2em}
-\exi. [v [v broke_i $\emptyset$ ][VP the vase [V$'$ t_i into
+\exi. [V [V broke_i $\emptyset$ ][VP the vase [V$'$ t_i into
pieces~]]]
\ex.\a. It kept warm
\b. She kept it warm
\end{verbatim}%
-In addition, \verb|\renewcommand{\refdash}{}| changes cross
-references from eg. \Last[b] to \renewcommand{\refdash}{}\Last[b].
+In addition, \verb|\renewcommand{\firstrefdash}{}| changes cross
+references from eg. \Last[b] to \renewcommand{\firstrefdash}{}\Last[b].
+
+The following definitions generate the left (=L) and right (=R)
+environments of example numberings in ordinary text, in footnotes,
+and in cross-references:
+
+\begin{verbatim}
+ \newcommand{\ExLBr}{(}
+ \newcommand{\ExRBr}{)}
+ \newcommand{\FnExLBr}{(}
+ \newcommand{\FnExRBr}{)}
+ \newcommand{\theExLBr}{(}
+ \newcommand{\theExRBr}{)}
+ \newcommand{\theFnExLBr}{(}
+ \newcommand{\theFnExRBr}{)}
+ \newcommand{\SubExLBr}{}
+ \newcommand{\SubExRBr}{.}
+ \newcommand{\SubSubExLBr}{(}
+ \newcommand{\SubSubExRBr}{)}
+\end{verbatim}
+For example, one might want to replace \LLast--\Last with
+{\def\theExRBr{}\LLast}--{\def\theExLBr{}\Last} by saying
+
+\begin{verbatim}
+{\renewcommand{\theExRBr}{}\LLast}--{\renewcommand{\theExLBr}{}\Last}
+\end{verbatim}
+
\subsection*{$\backslash$\tt Exlabelwidth}%
diff --git a/Master/texmf-dist/tex/latex/linguex/linguex.sty b/Master/texmf-dist/tex/latex/linguex/linguex.sty
index b9b129bfa08..dde58368998 100644
--- a/Master/texmf-dist/tex/latex/linguex/linguex.sty
+++ b/Master/texmf-dist/tex/latex/linguex/linguex.sty
@@ -17,10 +17,11 @@
%% with kerning in fonts
%% linguex.sty version 3.7a, revised 2009/09/02, replaced hard-coded
%% example format with \theExNo
-%% linguex.sty version 3.7b, revised 2009/09/18, fixed double paren bug
+%% linguex.sty version 4.0 replaces hard-coded brackets with
+%% predefined commands
%% Author: Wolfgang.Sternefeld@uni-tuebingen.de
%% status: supported
-%% filedate 2008/06/30
+%% filedate 2009/10/15
\RequirePackage{xspace,cgloss4e}
%%%%%%%%%%%%%%%%%%% FOOTNOTES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% to let \ex. know whether or not it is in a footnote
@@ -35,19 +36,32 @@
\newcounter{SubSubExNo}[SubExNo]
\newcounter{FnExNo}[footnote]
\newcounter{ABC}
-\renewcommand{\theExNo}{(\arabic{ExNo})}
-\renewcommand{\theFnExNo}{(\roman{FnExNo})}
-\newcommand{\refdash}{-}
-\newcommand{\SubSubExLeftBracket}{(}
-\newcommand{\SubSubExRightBracket}{)}
-\newcommand{\SubExLeftBracket}{}
-\newcommand{\SubExRightBracket}{.}
-\renewcommand{\theSubExNo}{\hbox{(\if@noftnote\arabic{ExNo}\else
- \roman{FnExNo}\fi\refdash\alph{SubExNo})}}
+\newcommand{\ExLBr}{(}%added in version 4.0
+\newcommand{\ExRBr}{)}%added in version 4.0
+\newcommand{\FnExLBr}{(}%added in version 4.0
+\newcommand{\FnExRBr}{)}%added in version 4.0
+\newcommand{\theExLBr}{(}%added in version 4.0
+\newcommand{\theExRBr}{)}%added in version 4.0
+\newcommand{\theFnExLBr}{(}%added in version 4.0
+\newcommand{\theFnExRBr}{)}%added in version 4.0
+\renewcommand{\theExNo}{\theExLBr\arabic{ExNo}\theExRBr}%modified in version 4.0
+\renewcommand{\theFnExNo}{\theFnExLBr\roman{FnExNo}\theFnExRBr}%removed in version 4.0
+\newcommand{\firstrefdash}{-}
+\newcommand{\secondrefdash}{-}
+\newcommand{\SubExLBr}{}
+\newcommand{\SubExRBr}{.}
+\newcommand{\SubSubExLBr}{(}
+\newcommand{\SubSubExRBr}{)}
+\newcommand{\Exarabic}{\arabic}%added in version 4.0
+\newcommand{\Exalph}{\alph}%added in version 4.0
+\newcommand{\Exroman}{\roman}%added in version 4.0
+% Modification in version 4.0: hard wired brackets replaced by
+% commands defined above:
+\renewcommand{\theSubExNo}{\hbox{\if@noftnote\theExLBr\Exarabic{ExNo}\firstrefdash\Exalph{SubExNo}\theExRBr\else
+\theFnExLBr\Exroman{FnExNo}\firstrefdash\Exalph{SubExNo}\theFnExRBr\fi}}
\renewcommand{\theSubSubExNo}{%
- \hbox{(\if@noftnote\arabic{ExNo}\else\roman{FnExNo}\fi
- \refdash\alph{SubExNo}\refdash\if@noftnote\roman{SubSubExNo}%
- \else\arabic{SubSubExNo}\fi)}}
+ \hbox{\if@noftnote\theExLBr\Exarabic{ExNo}\firstrefdash\Exalph{SubExNo}\secondrefdash\Exroman{SubSubExNo}\theExRBr%
+ \else\theFnExLBr\Exroman{FnExNo}\firstrefdash\Exalph{SubExNo}\secondrefdash\Exarabic{SubSubExNo}\theFnExRBr\fi}}%
%
%%%%%%%%%%%%%% LENGTHS FOR SPACING %%%%%%%%%%%%%%%%%%%%%%%%%%
\newlength{\currentlabel}
@@ -62,6 +76,7 @@
\newlength{\SubSubExleftmargin}
\newlength{\Exlabelsep}
\newlength{\alignSubExnegindent}
+\newlength{\Exredux}
\newif\ifalignSubEx
\newcommand{\resetExdefaults}{%
\setlength{\Exlabelsep}{1.3em}%
@@ -70,22 +85,24 @@
\setlength{\SubExleftmargin}{2em}%
\setlength{\Exindent}{0pt}%
\setlength{\Exlabelwidth}{4em}%
- \setlength{\alignSubExnegindent}{\Exlabelsep}
+ \setlength{\alignSubExnegindent}{\Exlabelsep}%
\ifalignSubEx\addtolength{\Exlabelsep}{.7em}%
- \addtolength{\alignSubExnegindent}{.7em}\fi
-}
+ \addtolength{\alignSubExnegindent}{.7em}\fi
+ \setlength{\Exredux}{-\baselineskip}%
+ }
\AtBeginDocument{\resetExdefaults}
%%%
\newlength\digitwidth%added-3.7
\newlength\mindigitwidth%added-3.7
\newcommand{\minimalwidth}[1]{\settowidth{\digitwidth}{#1}%added-3.7
\ifdim\digitwidth<\mindigitwidth\mindigitwidth\digitwidth\fi}%added-3.7
+%
%%%%%%%%%%%%%%%%%%% DEFINITION OF \ex. %%%%%%%%%%%%%%%%%%%%%%%%%%
\newif\ifembedded
\newif\ifExWarning
\newcounter{ExDepth}
\newcounter{TempExDepth}\setcounter{TempExDepth}{0}
-\def\trivex.#1\par{\ifdim\lastskip=.66\baselineskip\vspace{-\baselineskip}\fi
+\def\trivex.#1\par{\ifdim\lastskip=\Extopsep\vspace{\Exredux}\fi
\begin{list}{}{\leftmargin\z@%
\labelwidth\z@\labelsep\z@\partopsep\z@\topsep\Extopsep}%
\item{}#1%
@@ -95,7 +112,7 @@
\setcounter{ExDepth}{0}
\embeddedtrue\fi
\ifembedded\else
- \ifdim\lastskip=.66\baselineskip\vspace{-\baselineskip}\fi
+ \ifdim\lastskip=\Extopsep\vspace{\Exredux}\fi
\fi
\refstepcounter{ExDepth}%
\my@ifnextchar[{\OptArgEx}{\ifindex\expandafter\lookforwords\fi
@@ -108,49 +125,63 @@
check number of empty lines at end of examples.
Detected}\fi\ExWarningtrue
\if@noftnote\refstepcounter{ExNo}%
- \Exformat[\theExNo]%
+ \Exformat[\ExLBr\Exarabic{ExNo}\ExRBr]%
\else
- \refstepcounter{FnExNo}\Exformat[(\roman{FnExNo})]%
+ \refstepcounter{FnExNo}\Exformat[\FnExLBr\Exroman{FnExNo}\FnExRBr]%
\fi}
\def\OptArgEx[#1]{\Exformat[#1]\expandafter\testforgramm\ifindex\expandafter
\lookforwords\fi}
+\def\philarge{4\mindigitwidth}
+\def\philmiddle{3\mindigitwidth}
+\def\philsmall{2\mindigitwidth}
+%%%%%%%%%%%%%%%
+\newcommand{\phlabelwidth}[1]{%
+ \renewcommand{\philarge}{#1}%
+ \renewcommand{\philmiddle}{#1}%
+ \renewcommand{\philsmall}{#1}}
+\newcommand{\phlabeldefault}{%
+ \renewcommand{\philarge}{4\mindigitwidth}%
+ \renewcommand{\philmiddle}{3\mindigitwidth}%
+ \renewcommand{\philsmall}{2\mindigitwidth}}
\newcommand{\ExEnd}{%
\ifnum\theExDepth=0\global\unembeddedfalse\else%
\end{list}\addtocounter{ExDepth}{-1}\ExEnd\fi}
- \newcommand{\listdecl}{\parsep\z@\itemsep\z@\partopsep\z@\labelsep\z@%
- \@Exleftmargin\z@%
- \settowidth{\digitwidth}{0}\mindigitwidth\digitwidth%modified-3.7
- \minimalwidth{1}%modified-3.7
- \minimalwidth{2}%
- \minimalwidth{3}%
- \minimalwidth{4}%
- \minimalwidth{5}%
- \minimalwidth{6}%
- \minimalwidth{7}%
- \minimalwidth{8}%
- \minimalwidth{9}%
- \settowidth{\lessthanthousand}{(\hbox to 4\mindigitwidth{})}%modified-3.7
- \ifdim\currentlabel<\lessthanthousand\leftmargin\Exlabelsep
- \ifdim\lessthanthousand<\Exlabelwidth\Exlabelwidth\Exlabelsep%
- \settowidth{\lessthanten}{(\hbox to 2\mindigitwidth{})}%modified-3.7
- \settowidth{\lessthanhundred}{(\hbox to 3\mindigitwidth{})}%modified-3.7
- \ifdim\currentlabel<\lessthanten\leftmargin\lessthanten%
- \else
- \ifdim\currentlabel<\lessthanhundred\leftmargin\lessthanhundred%
- \else
- \ifdim\currentlabel<\lessthanthousand\leftmargin\lessthanthousand%
- \fi\fi\fi\fi
- \else
- \Exlabelwidth\z@
- \fi%
- \@Exleftmargin\Exlabelwidth
- \labelwidth\leftmargin
- \ifembedded\relax\else
- \addtolength{\Exlabelwidth}{\Exindent}
- \fi
- \addtolength{\leftmargin}{\Exlabelwidth}%
- \addtolength{\labelwidth}{\@Exleftmargin}%
- }
+ \newcommand{\listdecl}{\parsep\z@\itemsep\z@\partopsep\z@\labelsep\z@%
+ \@Exleftmargin\z@%
+ \settowidth{\digitwidth}{0}\mindigitwidth\digitwidth%modified-3.7
+ \minimalwidth{1}%modified-3.7
+ \minimalwidth{2}%
+ \minimalwidth{3}%
+ \minimalwidth{4}%
+ \minimalwidth{5}%
+ \minimalwidth{6}%
+ \minimalwidth{7}%
+ \minimalwidth{8}%
+ \minimalwidth{9}%
+ \settowidth{\lessthanthousand}{\ExLBr\hbox to \philarge{}\ExRBr}%modified-3.7,4.0
+ \ifdim\currentlabel<\lessthanthousand\leftmargin\Exlabelsep
+ \ifdim\lessthanthousand<\Exlabelwidth\Exlabelwidth\Exlabelsep%
+ \settowidth{\lessthanten}{\ExLBr\hbox
+ to \philsmall{}\ExRBr}%modified-3.7
+ \settowidth{\lessthanhundred}{\ExLBr\hbox to
+ \philmiddle{}\ExRBr}%modified-3.7
+ \ifdim\currentlabel<\lessthanten\leftmargin\lessthanten%
+ \else
+ \ifdim\currentlabel<\lessthanhundred\leftmargin\lessthanhundred%
+ \else
+ \ifdim\currentlabel<\lessthanthousand\leftmargin\lessthanthousand%
+ \fi\fi\fi\fi
+ \else
+ \Exlabelwidth\z@
+ \fi%
+ \@Exleftmargin\Exlabelwidth
+ \labelwidth\leftmargin
+ \ifembedded\relax\else
+ \addtolength{\Exlabelwidth}{\Exindent}
+ \fi
+ \addtolength{\leftmargin}{\Exlabelwidth}%
+ \addtolength{\labelwidth}{\@Exleftmargin}%
+}
\def\Exformat[#1]{%
\settowidth{\currentlabel}{#1}%
\begin{list}{\makebox[\labelwidth][l]{#1}}{%
@@ -162,7 +193,7 @@
\ifindex\firstwordtrue\fi\item{}}
%
%%%%%%%% the `[' of OPTIONAL ARGUMENTS must immediately follow \ex. %%%%%%
-%%%% redefinition of \@ifnextchar which does NOT ignore spaces %%%%%%%%%%%
+%%%% redefinition of \@ifnextchar that does NOT ignore spaces %%%%%%%%%%%
\def\my@ifnextchar#1#2#3{\let\reserved@d=#1%
\def\reserved@a{#2}\def\reserved@b{#3}%
\futurelet\@let@token\my@ifnch}
@@ -201,37 +232,37 @@
%
%%%%%%%%%%%%%%%% SUBLISTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newif\ifunembedded
-\newcommand{\SubExlabel}{\SubExLeftBracket\alph{SubExNo}\SubExRightBracket}
+\newcommand{\SubExlabel}{\SubExLBr\Exalph{SubExNo}\SubExRBr}
\def\a.{\ifindex\firstwordtrue\fi
\ifnum\theExDepth=0 \unembeddedtrue
\trivex.\fi
\refstepcounter{ExDepth}%
\begin{list}{\makebox[\labelwidth][l]{%
- \ifnum\theExDepth=1 \SubExLeftBracket\alph{ABC}\SubExRightBracket%
+ \ifnum\theExDepth=1 \SubExLBr\Exalph{ABC}\SubExRBr%
\else
\ifnum\theExDepth=2 %
\ifdim\currentlabel<\lessthanthousand%
\ifalignSubEx
\llap{\hbox to \alignSubExnegindent{\ifunembedded%
- \SubExLeftBracket\alph{SubExNo}\SubExRightBracket
+ \SubExLBr\Exalph{SubExNo}\SubExRBr
\else\SubExlabel\fi\hss}}%
\else\SubExlabel\fi%
\else\ifunembedded%
- \SubSubExLeftBracket\roman{SubExNo}\SubSubExRightBracket
+ \SubSubExLBr\Exroman{SubExNo}\SubSubExRBr
\else\SubExlabel\fi\fi
\else
\ifnum\theExDepth=3 %
\if@noftnote%\ifunembedded\mbox{$\bullet$!}\else
- \SubSubExLeftBracket\roman{SubSubExNo}\SubSubExRightBracket
+ \SubSubExLBr\Exroman{SubSubExNo}\SubSubExRBr
%\fi
- \else\arabic{SubSubExNo}\SubSubExRightBracket\fi
+ \else\Exarabic{SubSubExNo}\SubSubExRBr\fi
\fi\fi\fi}}%
{\labelsep\z@
\ifnum\theExDepth=2\topsep .3\Extopsep\else\topsep 0pt\fi
\parsep\z@\itemsep\z@
\ifnum\theExDepth=1 %
\usecounter{ABC}%
- \settowidth{\currentlabel}{\theExNo}%
+ \settowidth{\currentlabel}{\ExLBr\Exarabic{ExNo}\ExRBr}%
\listdecl%
\else
\ifnum\theExDepth=2 %
@@ -352,25 +383,29 @@
\copyExNo\addtocounter{tmpaEx}{2}\printExNo}
\newcommand{\TextNext}{\NoFnReftrue\copyExNo\refstepcounter{tmpaEx}\printExNo}
\newcommand{\Last}{\if@noftnote\NoFnReftrue\else
- \ifnum\arabic{FnExNo}=0 \NoFnReftrue\else\NoFnReffalse\fi
+ \ifnum\Exarabic{FnExNo}=0 \NoFnReftrue\else\NoFnReffalse\fi
\fi
\copyExNo\printExNo}
\newcommand{\LLast}{\if@noftnote\NoFnReftrue\copyExNo%
\addtocounter{tmpaEx}{-1}%
\else
- \ifnum\arabic{FnExNo}=0 \NoFnReftrue\copyExNo%
+ \ifnum\Exarabic{FnExNo}=0 \NoFnReftrue\copyExNo%
\addtocounter{tmpaEx}{-1}%
\else
- \ifnum\arabic{FnExNo}=1 \NoFnReftrue\copyExNo%
+ \ifnum\Exarabic{FnExNo}=1 \NoFnReftrue\copyExNo%
\else
\NoFnReffalse\copyExNo\addtocounter{tmpaEx}{-1}%
\fi\fi\fi
\printExNo}
\newcommand{\copyExNo}{\strut\ifNoFnRef\setcounter{tmpaEx}{\value{ExNo}}%
- \def\thetmpaEx{\arabic{tmpaEx}}%
+ \def\thetmpaEx{\Exarabic{tmpaEx}}%
\else
- \setcounter{tmpaEx}{\value{FnExNo}}\def\thetmpaEx{\roman{tmpaEx}}%
+ \setcounter{tmpaEx}{\value{FnExNo}}\def\thetmpaEx{\Exroman{tmpaEx}}%
\fi}
-\def\complexExNo[#1]{\hbox{(\thetmpaEx\refdash#1)}}
-\newcommand{\printExNo}{\@ifnextchar[{\complexExNo}{(\thetmpaEx)\xspace}}
+\def\complexExNo[#1]{\hbox{\if@noftnote\theExLBr\else\theFnExLBr\fi%
+ \thetmpaEx\firstrefdash#1\if@noftnote\theExRBr\else\theFnExRBr\fi}}%hard wired bracket changed to \theExBr in version 4.0
+\newcommand{\printExNo}{\@ifnextchar[{\complexExNo}{%
+ \if@noftnote\theExLBr\else\theFnExLBr\fi\thetmpaEx%
+ \if@noftnote\theExRBr\else\theFnExRBr\fi\xspace}}%hard
+ %wired bracket changed to \theExBr in version 4.0
%%%%%%%%%%%%%%%%%%%%%%%%%%% END %%%%%%%%%%%%%%%%%%%%%%%%%%