From 99288327b05a9ad4e27c5a4f75ad9b6b3789219f Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 5 Oct 2017 22:22:24 +0000 Subject: listofitems (5oct17) git-svn-id: svn://tug.org/texlive/trunk@45478 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/generic/listofitems/README | 8 +-- .../doc/generic/listofitems/listofitems-en.pdf | Bin 368982 -> 368859 bytes .../doc/generic/listofitems/listofitems-en.tex | 2 +- .../doc/generic/listofitems/listofitems-fr.pdf | Bin 332236 -> 332231 bytes .../doc/generic/listofitems/listofitems-fr.tex | 6 +- .../tex/generic/listofitems/listofitems.sty | 2 +- .../tex/generic/listofitems/listofitems.tex | 77 +++++++++++---------- 7 files changed, 51 insertions(+), 44 deletions(-) (limited to 'Master') diff --git a/Master/texmf-dist/doc/generic/listofitems/README b/Master/texmf-dist/doc/generic/listofitems/README index 29c36faab02..75da857079c 100644 --- a/Master/texmf-dist/doc/generic/listofitems/README +++ b/Master/texmf-dist/doc/generic/listofitems/README @@ -4,14 +4,14 @@ ___________________________________ listofitems package - v1.3 + v1.4 - 18/11/2016 + 05/10/2017 ___________________________________ Authors : Christian Tellechea, Steven B. Segletes Maintainer: Christian Tellechea -E-mail : unbonpetit@openmailbox.org (CT) +E-mail : unbonpetit@netc.fr (CT) steven.b.segletes.civ@mail.mil (SBS) Comments, bug reports and suggestions are welcome. Licence : Released under the LaTeX Project Public License v1.3c or @@ -27,4 +27,4 @@ dont le s\'eparateur a \'et\'e choisi par l'utilisateur et d'acc\'eder This package allows one to capture all the items of a list, for which the parsing character has been selected by the user, and to access any -of these items with a simple syntax. +of these items with a simple syntax. \ No newline at end of file diff --git a/Master/texmf-dist/doc/generic/listofitems/listofitems-en.pdf b/Master/texmf-dist/doc/generic/listofitems/listofitems-en.pdf index 1d493ffa34d..72eb878b068 100644 Binary files a/Master/texmf-dist/doc/generic/listofitems/listofitems-en.pdf and b/Master/texmf-dist/doc/generic/listofitems/listofitems-en.pdf differ diff --git a/Master/texmf-dist/doc/generic/listofitems/listofitems-en.tex b/Master/texmf-dist/doc/generic/listofitems/listofitems-en.tex index 72f24c410df..d178e5e73f8 100644 --- a/Master/texmf-dist/doc/generic/listofitems/listofitems-en.tex +++ b/Master/texmf-dist/doc/generic/listofitems/listofitems-en.tex @@ -113,7 +113,7 @@ \smallbreak \americanloidate \vskip1.5cm - {Christian \bsc{Tellechea}\footnote{\texttt{unbonpetit@openmailbox.org}}\par Steven B. \bsc{Segletes}\footnote{steven.b.segletes.civ@mail.mil}} + {Christian \bsc{Tellechea}\footnote{\texttt{unbonpetit@netc.fr}}\par Steven B. \bsc{Segletes}\footnote{steven.b.segletes.civ@mail.mil}} \par \endgroup \vskip2cm diff --git a/Master/texmf-dist/doc/generic/listofitems/listofitems-fr.pdf b/Master/texmf-dist/doc/generic/listofitems/listofitems-fr.pdf index 042a368926c..26eb6f8dbff 100644 Binary files a/Master/texmf-dist/doc/generic/listofitems/listofitems-fr.pdf and b/Master/texmf-dist/doc/generic/listofitems/listofitems-fr.pdf differ diff --git a/Master/texmf-dist/doc/generic/listofitems/listofitems-fr.tex b/Master/texmf-dist/doc/generic/listofitems/listofitems-fr.tex index 75e825ea7b6..783dace854f 100644 --- a/Master/texmf-dist/doc/generic/listofitems/listofitems-fr.tex +++ b/Master/texmf-dist/doc/generic/listofitems/listofitems-fr.tex @@ -88,8 +88,8 @@ \catcode`\<13 \catcode`\>13 \def<{\begingroup$\langle$\itshape}\def>{$\rangle$\endgroup}% \@ifstar\@sverb\@verb} \endgroup -\def\longfrloidate@i#1/#2/#3\@nil{#3 \ifcase #2 \or janvier\or février\or mars\or avril\or mai\or juin\or juillet\or aout\or septembre\or octobre\or novembre\or décembre\fi\space#1} -\edef\longfrloidate{\expandafter\longfrloidate@i\loidate\@nil} +\def\longfrloidate@i#1/#2/#3\@nil{\number#3\relax\space \ifcase #2 \or janvier\or février\or mars\or avril\or mai\or juin\or juillet\or aout\or septembre\or octobre\or novembre\or décembre\fi\space#1} +\def\longfrloidate{\expandafter\longfrloidate@i\loidate\@nil} \makeatother \begin{document} \parindent=0pt @@ -105,7 +105,7 @@ \smallbreak \longfrloidate \vskip1.5cm - {Christian \bsc{Tellechea}\footnote{\texttt{unbonpetit@openmailbox.org}}\par Steven B. \bsc{Segletes}\footnote{steven.b.segletes.civ@mail.mil}} + {Christian \bsc{Tellechea}\footnote{\texttt{unbonpetit@netc.fr}}\par Steven B. \bsc{Segletes}\footnote{steven.b.segletes.civ@mail.mil}} \par \endgroup \vskip2cm diff --git a/Master/texmf-dist/tex/generic/listofitems/listofitems.sty b/Master/texmf-dist/tex/generic/listofitems/listofitems.sty index fa8ebc36f3c..4625f5a4608 100644 --- a/Master/texmf-dist/tex/generic/listofitems/listofitems.sty +++ b/Master/texmf-dist/tex/generic/listofitems/listofitems.sty @@ -1,3 +1,3 @@ \input listofitems.tex -\ProvidesPackage\loiname[\loidate\space v\loiver\space Grab items in lists using user-specified sep char] +\ProvidesPackage\loiname[\loidate\space v\loiver\space Grab items in lists using user-specified sep char (CT)] \endinput \ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/listofitems/listofitems.tex b/Master/texmf-dist/tex/generic/listofitems/listofitems.tex index 726b75efb2e..9f787255a2f 100644 --- a/Master/texmf-dist/tex/generic/listofitems/listofitems.tex +++ b/Master/texmf-dist/tex/generic/listofitems/listofitems.tex @@ -3,35 +3,31 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % \def\loiname {listofitems} % -\def\loiver {1.3} % +\def\loiver {1.4} % % % -\def\loidate {2016/11/18} % +\def\loidate {2017/10/05} % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % -------------------------------------------------------------------- -% This work may be distributed and/or modified under the -% conditions of the LaTeX Project Public License, either version 1.3 -% of this license or (at your option) any later version. -% The latest version of this license is in -% -% % http://www.latex-project.org/lppl.txt -% -% and version 1.3 or later is part of all distributions of LaTeX -% version 2005/12/01 or later. -% -------------------------------------------------------------------- -% This work has the LPPL maintenance status `maintained'. -% -% The Current Maintainer of this work is Christian Tellechea -% email: unbonpetit@openmailbox.org -% Commentaires, suggestions et signalement de bugs bienvenus ! -% Comments, bug reports and suggestions are welcome. -% -------------------------------------------------------------------- -% L'extension listofitems est compos\'ee des 7 fichiers suivants : -% - code : listofitems (.tex et .sty) -% - manuel en francais : listofitems-fr (.tex et .pdf) -% - manuel en anglais : listofitems-en (.tex et .pdf) -% - fichier lisezmoi : README +% Author : Christian Tellechea, Steven B. Segletes +% Status : Maintained +% Maintainer : Christian Tellechea +% Email : unbonpetit@netc.fr +% steven.b.segletes.civ@mail.mil +% Package URL: https://www.ctan.org/pkg/listofitems +% Bug tracker: https://framagit.org/unbonpetit/listofitems/issues +% Repository : https://framagit.org/unbonpetit/listofitems/tree/master +% Copyright : Christian Tellechea 2017 +% Licence : Released under the LaTeX Project Public License v1.3c +% or later, see http://www.latex-project.org/lppl.txt +% Files : 1) listofitems.tex +% 2) listofitems.sty +% 3) listofitems-fr.tex +% 4) listofitems-fr.pdf +% 5) listofitems-en.tex +% 6) listofitems-en.pdf +% 7) README % -------------------------------------------------------------------- \expandafter\edef\csname loi_restorecatcode\endcsname{\catcode\number`\_=\number\catcode`\_\relax} \catcode`\_11 @@ -70,19 +66,21 @@ \long\def\loi_second#1#2{#2} \long\def\loi_firsttonil#1#2\_nil{#1} \long\def\loi_antefi#1#2\fi{#2\fi#1} -\long\def\loi_swaparg#1#2{#2{#1}} -\long\def\loi_exparg#1#2{\expandafter\loi_swaparg\expandafter{#2}{#1}} -\long\def\loi_expafternil#1\_nil{\begingroup\def\loi_temp{\endgroup#1}\expandafter\loi_temp} +\long\def\loi_exparg#1#2{\expandafter\loi_exparg_i\expandafter{#2}{#1}}% \loi_exparg{}{} devient {<*b>} +\long\def\loi_exparg_i#1#2{#2{#1}} +\long\def\loi_expafter#1#2{\expandafter\loi_expafter_i\expandafter{#2}{#1}}% \loi_expafter{}{} devient <*b> +\long\def\loi_expafter_i#1#2{#2#1} \def\loi_macroname{\loi_ifinrange\escapechar[[0:255]]{\expandafter\loi_gobarg}{}\string} -\def\loi_argcsname#1#{\begingroup\def\loi_temp{\endgroup#1}\loi_argcsname_i} -\def\loi_argcsname_i#1{\expandafter\loi_temp\csname#1\endcsname} +\def\loi_argcsname#1#{\loi_argcsname_i{#1}} +\def\loi_argcsname_i#1#2{\loi_expafter{#1}{\csname#2\endcsname}} %--- macros de test -\def\loi_ifnum#1{\ifnum#1\expandafter\loi_first\else\expandafter\loi_second\fi} +\long\def\loi_ifnum#1{\ifnum#1\expandafter\loi_first\else\expandafter\loi_second\fi} \long\def\loi_ifx#1{\ifx#1\expandafter\loi_first\else\expandafter\loi_second\fi} \long\def\loi_ifempty#1{\loi_exparg\loi_ifx{\expandafter\relax\detokenize{#1}\relax}} \def\loi_ifstar#1#2{\def\loi_ifstar_i{\loi_ifx{*\loi_nxttok}{\loi_first{#1}}{#2}}\futurelet\loi_nxttok\loi_ifstar_i} -\long\def\loi_ifcs#1{% #1 est-il une sc ? +\long\def\loi_ifprimitive#1{\edef\loi_tempa{\meaning#1}\edef\loi_tempb{\string#1}\loi_ifx{\loi_tempa\loi_tempb}} +\long\def\loi_ifcs#1{% #1 est-il une sc (n'\'etant pas une primitive) ? \loi_ifempty{#1} \loi_second% si #1 est vide, faux {\loi_ifspacefirst{#1} @@ -90,7 +88,9 @@ {\loi_exparg\loi_ifempty{\loi_gobarg#1}% 1 seul token ? {\begingroup \escapechar`\_ \if\expandafter\loi_firsttonil\string#1\_nil\expandafter\loi_firsttonil\string\relax\_nil - \endgroup\expandafter\loi_first + \loi_ifprimitive + {\endgroup\expandafter\loi_second} + {\endgroup\expandafter\loi_first}% \else \endgroup\expandafter\loi_second \fi @@ -106,7 +106,7 @@ % et pages 175 \`a 184 du livre "Apprendre \`a programmer en TeX" \def\loi_fornum#1=#2to#3\do{% \edef#1{\number\numexpr#2}\edef\loi_sgncmp{\ifnum#1<\numexpr#3\relax>+\else<-\fi}% - \loi_argcsname\loi_fornum_i{loi_fornum_\string#1\expandafter}\expandafter{\number\numexpr#3\expandafter}\loi_sgncmp#1% + \expandafter\loi_fornum_i\csname loi_fornum_\string#1\expandafter\endcsname\expandafter{\number\numexpr#3\expandafter}\loi_sgncmp#1% } \long\def\loi_fornum_i#1#2#3#4#5#6{\def#1{\unless\ifnum#5#3#2\relax\loi_antefi{#6\edef#5{\number\numexpr#5#41\relax}#1}\fi}#1} @@ -231,7 +231,7 @@ \advance\loi_nestcnt-1 \loi_argcsname\loi_let\loi_currentsep{loi_listofsep[\number\loi_nestcnt]}% } - {\loi_expafternil\readlist_vi{#2}{}\_nil\loi_currentsep||\loi_quark||#2\_nil{#1}}% aller isoler le 1er item + {\loi_expafter{\readlist_vi{#2}{}}\loi_currentsep||\loi_quark||#2\_nil{#1}}% aller isoler le 1er item } \long\def\readlist_v#1#2{\readlist_vi{#2}{}#1||\loi_quark||#2\_nil}% #1=liste s\'eparateurs (s\'ep=||) #2=chaine de tokens \long\def\readlist_vi#1#2#3||{% #1=liste restante #2=dernier #3= @@ -375,4 +375,11 @@ v1.2 22/10/2016 - macros \greadlist et \gitemtomacro pour la globalit\'e v1.3 18/11/2016 - - bugs corrig\'es dans la gestion de la globalit\'e \ No newline at end of file + - bugs corrig\'es dans la gestion de la globalit\'e + +v1.4 05/10/2017 + - test \loi_ifprimitive ajout\'e au test \loi_ifcs + - suppression de \loi_expafternil, cr\'eation de \loi_expafter, + modification de \loi_argcsname + - correction d'un bug : \setsepchar{\par} ne provoque plus + d'erreur. \loi_ifnum devient \long \ No newline at end of file -- cgit v1.2.3