summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-11-01 22:08:53 +0000
committerKarl Berry <karl@freefriends.org>2018-11-01 22:08:53 +0000
commit15360daf880519448794c8bc606dad9d850bb7a8 (patch)
tree000acb2a60c239c5c54e58d01cd8309a5cf616a7 /Master/texmf-dist/doc/generic
parent17df798d5ce5a412d77eb1d5d5689cd92d1f2e08 (diff)
listofitems (1nov18)
git-svn-id: svn://tug.org/texlive/trunk@49044 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/generic')
-rw-r--r--Master/texmf-dist/doc/generic/listofitems/README6
-rw-r--r--Master/texmf-dist/doc/generic/listofitems/listofitems-en.pdfbin369041 -> 445669 bytes
-rw-r--r--Master/texmf-dist/doc/generic/listofitems/listofitems-en.tex100
-rw-r--r--Master/texmf-dist/doc/generic/listofitems/listofitems-fr.pdfbin332265 -> 410667 bytes
-rw-r--r--Master/texmf-dist/doc/generic/listofitems/listofitems-fr.tex93
5 files changed, 189 insertions, 10 deletions
diff --git a/Master/texmf-dist/doc/generic/listofitems/README b/Master/texmf-dist/doc/generic/listofitems/README
index da5ba85fc01..a0a2b663d33 100644
--- a/Master/texmf-dist/doc/generic/listofitems/README
+++ b/Master/texmf-dist/doc/generic/listofitems/README
@@ -4,9 +4,9 @@ ___________________________________
listofitems
package
- v1.53
+ v1.6
- 13/03/2018
+ 01/11/2018
___________________________________
Authors : Christian Tellechea, Steven B. Segletes
@@ -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 af87b5379a3..71e03fd55fe 100644
--- a/Master/texmf-dist/doc/generic/listofitems/listofitems-en.pdf
+++ b/Master/texmf-dist/doc/generic/listofitems/listofitems-en.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/listofitems/listofitems-en.tex b/Master/texmf-dist/doc/generic/listofitems/listofitems-en.tex
index d44bae56932..4c8736fa396 100644
--- a/Master/texmf-dist/doc/generic/listofitems/listofitems-en.tex
+++ b/Master/texmf-dist/doc/generic/listofitems/listofitems-en.tex
@@ -9,6 +9,7 @@
\usepackage[margin=3cm]{geometry}
\usepackage{fancybox}
\usepackage{xcolor}
+\usepackage{listings,MnSymbol}
\def\listofitems{\textsf{\loiname}\xspace}
\def\eTeX{\hbox{$\varepsilon$-\TeX}}
\makeatletter
@@ -485,4 +486,103 @@ And returned on the previous night.}
A word = \word|
The macro \verb|\gitemtomacro| makes a global assignment.
+
+\section{Balanced Tokens}
+
+For the parsing of items, it is possible, with version 1.6, to take into
+ account the presence of \emph{balanced tokens}.
+Thus, if a list of paired tokens is defined, then each parsed item
+ in the list will extend to the first \verb|<separator>|, while assuring
+ that any paired tokens are balanced (i.e., occur in matched pairs within
+ the item).
+
+To define a list of balanced-token pairs, we use
+
+\code|\defpair{<tok1><tok2><tok3><tok4>...}|
+
+where the token list is read in pairs to form each matched-token pair.
+A \verb|<token>| that serves within a matched pair must consist of
+ a single character---%
+macros, primitives, spaces, braces, the token
+ "\verb|#|", as well as sets of several-tokens-between-%
+ braces are all forbidden.
+The two tokens which form a pair \emph{must} be different from
+ each other.
+
+\exemple/\setsepchar{+||-}
+\defpair{()[]}
+\readlist\terms{1+2*[3+4*(5+6-7)+8]-9+10}
+\showitems\terms/
+
+To return to the package's default behavior, that is, without
+ paired tokens, you must execute
+
+\code|\defpair{}|
+
+In an expression, in order to store in a macro that which
+ is between two matched tokens, we can call on
+
+\code|\insidepair<tok1><tok2>{<expression>}\macro|
+
+which will put in the \verb|\macro| that which lies between the pair
+ \verb|<tok1><tok2>| in the \verb|<expression>|.
+
+\exemple/\setsepchar{+||-}
+\defpair{()}
+\readlist\terms{1+2*(3+4*(5+6-7)+8)-9+10}
+\showitems\terms
+
+\itemtomacro\terms[2]\parenterm
+In the outer parenthesis:
+\insidepair()\parenterm\inbigparen
+"\inbigparen"
+
+In the inner parenthesis:
+\insidepair()\inbigparen\insmallparen
+"\insmallparen"/
+
+\section{The Code}
+
+Any suggestion, bug report, remark, request, addition or modification
+ of functionality is welcome; in this case, I invite users of
+ \listofitems to send me an email to \verb|unbonpetit@netc.fr|.\medbreak
+
+The code below is the exact verbatim of the file \verb|listofitems.tex|.
+I hope that the few comments scattered throughout it will
+ be enough for the user or the curious to understand the internal
+ machinery of this package:
+
+
+\lstinputlisting[
+ language=TeX,
+ inputencoding=latin1,
+ moretexcs={unless,ifcsname,ifdefined,detokenize,numexpr,dimexpr,glueexpr,unexpanded},
+ basicstyle=\small\ttfamily\color{black!25},
+ identifierstyle=\bfseries\color{white},%
+ backgroundcolor=\color{black!85},
+ keywordstyle=\bfseries\color{orange},
+ commentstyle=\color{cyan!66},
+ columns=fixed,
+ alsoletter={\_},
+ tabsize=2,
+ extendedchars=true,
+ showspaces=false,
+ showstringspaces=false,
+ numbers=left,
+ numberstyle=\tiny\ttfamily\color{black},
+ breaklines=true,
+ prebreak={\hbox{$\rhookswarrow$}},
+ breakindent=3em,
+ breakautoindent=true,
+ xleftmargin=1em,
+ xrightmargin=0pt,
+ lineskip=0pt,
+ numbersep=1em,
+ classoffset=1,
+ alsoletter={\_},
+ morekeywords={defpair,insidepair,setsepchar,greadlist,readlist,listlen,foreachitem,%
+ showitems,showitemsmacro,itemtomacro,gitemtomacro,ignoreemptyitems,reademptyitems},
+ keywordstyle=\bfseries\color{red!85!black},
+ classoffset=0,
+ ]{listofitems.tex}
\end{document} \ No newline at end of file
diff --git a/Master/texmf-dist/doc/generic/listofitems/listofitems-fr.pdf b/Master/texmf-dist/doc/generic/listofitems/listofitems-fr.pdf
index c45ae6e8ecd..21abdb8218d 100644
--- a/Master/texmf-dist/doc/generic/listofitems/listofitems-fr.pdf
+++ b/Master/texmf-dist/doc/generic/listofitems/listofitems-fr.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/listofitems/listofitems-fr.tex b/Master/texmf-dist/doc/generic/listofitems/listofitems-fr.tex
index 27e44bf8764..d1efe06030b 100644
--- a/Master/texmf-dist/doc/generic/listofitems/listofitems-fr.tex
+++ b/Master/texmf-dist/doc/generic/listofitems/listofitems-fr.tex
@@ -1,16 +1,16 @@
-% Ceci est la documentation du package "listofitems"%
+% !TeX encoding = UTF-8
+% Ceci est la documentation du package "listofitems"
%
% Fichier compilé avec pdflatex
-\documentclass[frenchb,a4paper]{article}
+\documentclass[french,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
-\usepackage{listofitems,babel,xspace}
+\usepackage{listofitems,babel}
\usepackage[bottom]{footmisc}
\usepackage{libertine}\usepackage[italic,frenchmath]{mathastext}
\usepackage[scaled=0.8]{luximono}
\usepackage[margin=3cm]{geometry}
-\usepackage{fancybox}
-\usepackage{xcolor}
+\usepackage{fancybox,xcolor,xspace,listings,MnSymbol}
\def\listofitems{\loiname\xspace}
\def\eTeX{\hbox{$\varepsilon$-\TeX}}
\makeatletter
@@ -23,6 +23,9 @@
\let\do\@makeother \dospecials
\ttfamily\small\@noligs
\obeylines\obeyspaces
+ \catcode`\<13 \catcode`\>13
+ \begingroup\lccode`\~`\<\lowercase{\endgroup\def~{\begingroup$\langle$\itshape}}%
+ \begingroup\lccode`\~`\>\lowercase{\endgroup\def~{\/$\rangle$\endgroup}}%
\def\code@ii##1#1{##1\par\medbreak\endgroup}%
\code@ii
}
@@ -88,7 +91,7 @@
\catcode`\<13 \catcode`\>13 \def<{\begingroup$\langle$\itshape}\def>{$\rangle$\endgroup}%
\@ifstar\@sverb\@verb}
\endgroup
-\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@i#1/#2/#3\@nil{\number#3\relax\ifnum#3=1 \ier\fi\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}
@@ -111,7 +114,7 @@
\vskip2cm
\leftskip=.2\linewidth \rightskip=.2\linewidth \small
Cette petite extension pour est destinée à lire une liste d'éléments dont le séparateur peut être choisi par l'utilisateur. Une fois la liste lue, ses éléments sont stockés dans une structure qui se comporte comme un tableau unidimensionnel et ainsi, il devient très facile d'accéder à un élément de la liste par son numéro. Par exemple, si la liste est stockée dans la macro \verb|\foo|, l'élément \no3 est désigné par \verb|\foo[3]|.
-
+
Un élément peut à son tour être une liste disposant d'un autre séparateur que celui de la liste de niveau supérieur, ce qui ouvre la voie à des imbrications et donne une syntaxe rappelant celle des tableaux à plusieurs dimensions du type \verb|\foo[3,2]| pour accéder à l'élément \no2 de la liste contenue dans l'élément \no3 de la liste de plus haut niveau.
\end{titlepage}
\def\listofitems{\textsf\loiname\xspace}
@@ -354,4 +357,80 @@ Rêve des chers instants qui la délasseront.}% 2e strophe de << Green >>, Paul
Un mot = \mot|
La macro \verb|\gitemtomacro| fait une assignation globale.
+
+\section{Tokens appariés}
+Pour le découpage des items, il est possible à partir de la version 1.6, de tenir compte de la présence de caractères \emph{appariés}. Ainsi, si une liste de caractères appariés est définie, chaque item s'étend jusqu'au prochain \verb|<séparateur>| qui équilibre les tokens appariés.
+
+Pour définir une liste de tokens appariés, on utilise
+
+\code|\defpair{<tok1><tok2><tok3><tok4>...}|
+
+où les tokens sont lus deux par deux pour former les paires d'appariement. Un \verb|<token>| d'appariement doit être constitué d'un seul caractère; les macros, primitives, espaces, accolades, token «\verb|#|», ensembles de plusieurs tokens entre accolades sont interdits. Deux tokens formant une paire \emph{doivent} être différents.
+
+\exemple/\setsepchar{+||-}
+\defpair{()[]}
+\readlist\termes{1+2*[3+4*(5+6-7)+8]-9+10}
+\showitems\termes/
+
+Pour revenir au comportement par défaut, c'est-à-dire sans tokens appariés, il faut exécuter
+
+\code|\defpair{}|
+
+Dans une expression, pour stocker dans une macro ce qui se trouve entre deux tokens appariés, on peut faire appel à
+
+\code|\insidepair<tok1><tok2>{<expression>}\macro|
+
+qui mettra dans la \verb|\macro| ce qui de trouve entre la paire \verb|<tok1><tok2>| dans l'\verb|<expression>|.
+
+\exemple/\setsepchar{+||-}
+\defpair{()}
+\readlist\termes{1+2*(3+4*(5+6-7)+8)-9+10}
+\showitems\termes
+
+\itemtomacro\termes[2]\parenterm
+Dans la parenthèse extérieure :
+\insidepair()\parenterm\inbigparen
+"\inbigparen"
+
+Dans la parenthèse intérieure :
+\insidepair()\inbigparen\insmallparen
+"\insmallparen"/
+
+\section{Le code}
+Toute suggestion, remontée de bug, remarque, demande, ajout ou modification de fonctionnalité est bienvenue; dans ce cas, j'invite les utilisateurs de \listofitems à m'envoyer un email à \verb|unbonpetit@netc.fr|.\medbreak
+
+Le code ci-dessous est l'exact verbatim du fichier \verb|listofitems.tex|. J'espère que les quelques commentaires qui le parsèment de-ci de-là seront suffisants pour que l'utilisateur ou le curieux comprenne la machinerie interne de ce package :
+
+\lstinputlisting[
+ language=TeX,
+ inputencoding=latin1,
+ moretexcs={unless,ifcsname,ifdefined,detokenize,numexpr,dimexpr,glueexpr,unexpanded},
+ basicstyle=\small\ttfamily\color{black!25},
+ identifierstyle=\bfseries\color{white},%
+ backgroundcolor=\color{black!85},
+ keywordstyle=\bfseries\color{orange},
+ commentstyle=\color{cyan!66},
+ columns=fixed,
+ alsoletter={\_},
+ tabsize=2,
+ extendedchars=true,
+ showspaces=false,
+ showstringspaces=false,
+ numbers=left,
+ numberstyle=\tiny\ttfamily\color{black},
+ breaklines=true,
+ prebreak={\hbox{$\rhookswarrow$}},
+ breakindent=3em,
+ breakautoindent=true,
+ xleftmargin=1em,
+ xrightmargin=0pt,
+ lineskip=0pt,
+ numbersep=1em,
+ classoffset=1,
+ alsoletter={\_},
+ morekeywords={defpair,insidepair,setsepchar,greadlist,readlist,listlen,foreachitem,%
+ showitems,showitemsmacro,itemtomacro,gitemtomacro,ignoreemptyitems,reademptyitems},
+ keywordstyle=\bfseries\color{red!85!black},
+ classoffset=0,
+ ]{listofitems.tex}
\end{document} \ No newline at end of file