summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-01-22 01:15:20 +0000
committerKarl Berry <karl@freefriends.org>2014-01-22 01:15:20 +0000
commitdec2025a3e0893a568059050cacc64fae530e70f (patch)
tree8a7869c30c5d4ea1db452c6a824de7ed9fe40e6a
parent14b940d3a9e9e7be69d633ba04b359fb4a9e358a (diff)
lexref (21jan14)
git-svn-id: svn://tug.org/texlive/trunk@32751 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/lexref/README2
-rw-r--r--Master/texmf-dist/doc/latex/lexref/lexref.pdfbin369319 -> 373456 bytes
-rw-r--r--Master/texmf-dist/doc/latex/lexref/lexref.tex15
-rw-r--r--Master/texmf-dist/tex/latex/lexref/lexref.sty27
4 files changed, 34 insertions, 10 deletions
diff --git a/Master/texmf-dist/doc/latex/lexref/README b/Master/texmf-dist/doc/latex/lexref/README
index 1078140af53..d683552664e 100644
--- a/Master/texmf-dist/doc/latex/lexref/README
+++ b/Master/texmf-dist/doc/latex/lexref/README
@@ -1,4 +1,4 @@
-lexref 2013/12/03 v1.0 alpha
+lexref 2014/01/21 v1.0.1 alpha
Copyright (c) Adrien Vion. adrien[dot]vion3[at]gmail[dot]com.
--------------------------------------------------------
This LaTeX package is aimed at continental lawyers (especially swiss and german). It provides macros to make references to legal provisions conveniently and uniformly. It also allows the user to automatically add cited Acts to a nomenclature list and to build specific indexes for each cited Act.
diff --git a/Master/texmf-dist/doc/latex/lexref/lexref.pdf b/Master/texmf-dist/doc/latex/lexref/lexref.pdf
index 7bba68c17a6..e13eaabc8be 100644
--- a/Master/texmf-dist/doc/latex/lexref/lexref.pdf
+++ b/Master/texmf-dist/doc/latex/lexref/lexref.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/lexref/lexref.tex b/Master/texmf-dist/doc/latex/lexref/lexref.tex
index 06e5fb07e75..c0f374c9e17 100644
--- a/Master/texmf-dist/doc/latex/lexref/lexref.tex
+++ b/Master/texmf-dist/doc/latex/lexref/lexref.tex
@@ -39,8 +39,8 @@
url={},
author={Adrien Vion},
email={adrien[dot]vion3[at]gmail[dot]com},
- revision={1.0a},
- date={2013-12-03}}
+ revision={1.0.1a},
+ date={2014-01-21}}
\hypersetup{%
pdftitle={lexref},
@@ -533,6 +533,17 @@ If, for any reason, you want to create an index entry at a given location in you
The \variable{abbreviation} is the first argument used in \cs{DeclareLex}.
+
+\section{Version History}
+
+\subsection*{Version 1.0.1$\alpha$, 21 january 2014}
+
+Minor bug fix (unwanted space).
+
+\subsection*{Version 1.0$\alpha$, 3 december 2013}
+
+First public version.
+
\section{Annex: Default shortcuts (depending on language)}\label{annex}
\begin{table}[h!]\label{}
diff --git a/Master/texmf-dist/tex/latex/lexref/lexref.sty b/Master/texmf-dist/tex/latex/lexref/lexref.sty
index 3a91e00d712..ed804a95500 100644
--- a/Master/texmf-dist/tex/latex/lexref/lexref.sty
+++ b/Master/texmf-dist/tex/latex/lexref/lexref.sty
@@ -1,5 +1,5 @@
%------------ identification --------------
-\ProvidesPackage{lexref}[2013/12/03 v1.0a]%
+\ProvidesPackage{lexref}[2014/01/21 v1.0.1a]%
\NeedsTeXFormat{LaTeX2e}%
%------------ package loading --------------
\RequirePackage{etoolbox}%
@@ -7,8 +7,10 @@
\RequirePackage{xstring}%
\RequirePackage{nomencl}%
\RequirePackage{splitidx}%
+\RequirePackage{ifthen}
+\RequirePackage{stringstrings}
%------------ initial code --------------
-% Toggle and counter creation
+% Toggle creation
\newtoggle{lexnoprint}
\newtoggle{lexindexing}
\newtoggle{lexnomencl}
@@ -27,7 +29,7 @@ be either 'alt' or nothing. Check your \protect\DeclareCite\space macros}}
\DeclareOption{noprint}{\toggletrue{lexnoprint}}
\DeclareOption{indexing}{\toggletrue{lexindexing}\makeindex}
\DeclareOption{nomencl}{\toggletrue{lexnomencl}\robustify{\nomenclature}\makenomenclature}
-\DeclareOption{shortcutstolist}{\toggletrue{lexshortcutstolist}\makenomenclature}
+\DeclareOption{shortcutstolist}{\toggletrue{lexshortcutstolist}\makenomenclature}%\robustify{\nomenclature}}
\DeclareOption{CHfr}{\toggletrue{lexrefCHfr}}
\DeclareOption{CHde}{\toggletrue{lexrefCHde}}
\DeclareOption{DE}{\toggletrue{lexrefDE}}
@@ -110,7 +112,7 @@ be either 'alt' or nothing. Check your \protect\DeclareCite\space macros}}
}{}
% german CH shortcuts
\iftoggle{lexrefCHde}{%
-\RenewLexShortcut{\DispPrefixMain}{Art.}[Artikel]%
+\RenewLexShortcut{\DispPrefixMain}{Art.}[Artikel(n)]%
\RenewLexShortcut{\DispsPrefixMain}{Art.}%
\RenewLexShortcut{\DispPrefixAlt}{\S}%
\RenewLexShortcut{\DispsPrefixAlt}{\S\S}%
@@ -126,7 +128,7 @@ be either 'alt' or nothing. Check your \protect\DeclareCite\space macros}}
\iftoggle{lexrefDE}{%
\RenewLexShortcut{\DispPrefixMain}{\S}%
\RenewLexShortcut{\DispsPrefixMain}{\S\S}%
-\RenewLexShortcut{\DispPrefixAlt}{Art.}[Artikel]%
+\RenewLexShortcut{\DispPrefixAlt}{Art.}[Artikel(n)]%
\RenewLexShortcut{\DispsPrefixAlt}{Art.}%
\RenewLexShortcut{\SubPrefix}{Abs.}[Absatz, -\"{ }e]
\RenewLexShortcut{\SubSubPrefixNumber}{Ziff.}[Ziffer(n)]
@@ -209,7 +211,7 @@ be either 'alt' or nothing. Check your \protect\DeclareCite\space macros}}
\newrobustcmd{\LexRefPrefixTests}[1]{%
% Testing if singular or plural profix needed
-\IfSubStr{#1}{\sq}% First testing if string contains \sq or \sqq
+\IfSubStr{#1}{\sq}% First testing if string contains \psq or \psqq
{\toggletrue{lexpluralform}}% if yes, plural form
{% else
\IfSubStr{#1}{-}% testing if string contains a dash
@@ -282,11 +284,22 @@ be either 'alt' or nothing. Check your \protect\DeclareCite\space macros}}
{%
\IfSubStr{#2}{-}% Test dash
{\StrBefore{#2}{-}[\lexciteindextempone]}% if true, take everything before
- {\ifdef{\lexciteindextempone}{\renewcommand{\lexciteindextempone}{#2}}{\newcommand{\lexciteindextempone}{#2}}}
+ {\ifdef{\lexciteindextempone}{\renewcommand{\lexciteindextempone}{#2}}{\newcommand{\lexciteindextempone}{#2}}}%
}%
}% else take everything
% 2) Second cleaning
\fullexpandarg%
+%\let\lexciteindextemponenew\lexciteindextempone
+%\renewcommand{\lexciteindextempone}{\noblanks{\lexciteindextemponenew}}%
+%%%%%% Remplacer l'escalier ci-dessous par un \loop (Knuth, pp. 217 ss)
+% \loop A \if B \repeat
+%\IfInteger{\lexciteindextempone}% Test if integer
+% {}% if true do nothing
+% {\loop\StrGobbleRight{\lexciteindextempone}{1}[\lexciteindextempone]\if\ifboolexpr{not test {\IfInteger{\lexciteindextempone}}}{}{}\repeat}% else
+%% Alternativement: utiliser \whiledo du package ifthen
+%\IfInteger{\lexciteindextempone}{\setcounter{lexcitecountinteger}{0}}{}%If integer, set counter to zero
+%\whiledo{\value{lexcitecountinteger}>0}{\StrGobbleRight{\lexciteindextempone}{1}[\lexciteindextempone]\IfInteger{\lexciteindextempone}{\setcounter{lexcitecountinteger}{0}}{}}
+%%%%%%% If the counter is greater than zero (= macro isn't an integer), remove last char and set counter to zero if macro is now an integer
\IfInteger{\lexciteindextempone}% Test if integer
{}% if true do nothing
{% else