summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/linguex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-09-03 18:03:06 +0000
committerKarl Berry <karl@freefriends.org>2009-09-03 18:03:06 +0000
commit571d635dc27595303cb4b2a9ef61d2b0918e517a (patch)
treeb40d879a781b7bed3a2bbe8c7f274abcb8ce7ed9 /Master/texmf-dist/tex/latex/linguex
parent33059d76042f5296eda13a6d0e3bbb3c69658534 (diff)
linguex 3.7a (2sep09)
git-svn-id: svn://tug.org/texlive/trunk@15026 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/linguex')
-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 %%%%%%%%%%%%%%%%%%%%%%%%%%