summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/linguex/linguex.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/linguex/linguex.sty')
-rw-r--r--Master/texmf-dist/tex/latex/linguex/linguex.sty75
1 files changed, 48 insertions, 27 deletions
diff --git a/Master/texmf-dist/tex/latex/linguex/linguex.sty b/Master/texmf-dist/tex/latex/linguex/linguex.sty
index df1ad62f9da..2e4abbe80c5 100644
--- a/Master/texmf-dist/tex/latex/linguex/linguex.sty
+++ b/Master/texmf-dist/tex/latex/linguex/linguex.sty
@@ -11,10 +11,15 @@
%% \alignSubEx
%% linguex.sty version 3.6, revised 2008/03/20, \lessthanten,
%% \lessthanhundred, and \lessthanthousand redefined due to problems
-%% with kerning in garamond
+%% with kerning in fonts
+%% linguex.sty version 3.7, revised 2008/06/30, \lessthanten,
+%% \lessthanhundred, and \lessthanthousand redefined due to problems
+%% with kerning in fonts
+%% linguex.sty version 3.7a, revised 2009/09/02, replaced hard-coded
+%% example format with \theExNo
%% Author: Wolfgang.Sternefeld@uni-tuebingen.de
%% status: supported
-%% filedate 2008/03/20
+%% filedate 2008/06/30
\RequirePackage{xspace,cgloss4e}
%%%%%%%%%%%%%%%%%%% FOOTNOTES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% to let \ex. know whether or not it is in a footnote
@@ -69,6 +74,11 @@
\addtolength{\alignSubExnegindent}{.7em}\fi
}
\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
@@ -97,7 +107,7 @@
check number of empty lines at end of examples.
Detected}\fi\ExWarningtrue
\if@noftnote\refstepcounter{ExNo}%
- \Exformat[(\arabic{ExNo})]%
+ \Exformat[(\theExNo)]%
\else
\refstepcounter{FnExNo}\Exformat[(\roman{FnExNo})]%
\fi}
@@ -106,29 +116,40 @@
\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{\lessthanthousand}{(0000)}%
- \ifdim\currentlabel<\lessthanthousand\leftmargin\Exlabelsep
- \ifdim\lessthanthousand<\Exlabelwidth\Exlabelwidth\Exlabelsep%
- \settowidth{\lessthanten}{(00)}%
- \settowidth{\lessthanhundred}{(000)}%
- \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}{(\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}%
+ }
\def\Exformat[#1]{%
\settowidth{\currentlabel}{#1}%
\begin{list}{\makebox[\labelwidth][l]{#1}}{%
@@ -351,4 +372,4 @@
\fi}
\def\complexExNo[#1]{\hbox{(\thetmpaEx\refdash#1)}}
\newcommand{\printExNo}{\@ifnextchar[{\complexExNo}{(\thetmpaEx)\xspace}}
-%%%%%%%%%%%%%%%%%%%%%%%%%%% END %%%%%%%%%%%%%%%%%%%%%%%%%% \ No newline at end of file
+%%%%%%%%%%%%%%%%%%%%%%%%%%% END %%%%%%%%%%%%%%%%%%%%%%%%%%