From e0c6872cf40896c7be36b11dcc744620f10adf1d Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 2 Sep 2019 13:46:59 +0900 Subject: Initial commit --- macros/latex/contrib/drac/LISEZMOI | 64 ++++++ macros/latex/contrib/drac/Makefile | 139 +++++++++++++ macros/latex/contrib/drac/README | 60 ++++++ macros/latex/contrib/drac/drac-en.dtx | 344 ++++++++++++++++++++++++++++++++ macros/latex/contrib/drac/drac-fr.dtx | 361 ++++++++++++++++++++++++++++++++++ macros/latex/contrib/drac/drac-fr.pdf | Bin 0 -> 383214 bytes macros/latex/contrib/drac/drac.ins | 70 +++++++ macros/latex/contrib/drac/drac.pdf | Bin 0 -> 361792 bytes macros/latex/contrib/drac/drac.sty | 60 ++++++ 9 files changed, 1098 insertions(+) create mode 100644 macros/latex/contrib/drac/LISEZMOI create mode 100644 macros/latex/contrib/drac/Makefile create mode 100644 macros/latex/contrib/drac/README create mode 100644 macros/latex/contrib/drac/drac-en.dtx create mode 100644 macros/latex/contrib/drac/drac-fr.dtx create mode 100644 macros/latex/contrib/drac/drac-fr.pdf create mode 100644 macros/latex/contrib/drac/drac.ins create mode 100644 macros/latex/contrib/drac/drac.pdf create mode 100644 macros/latex/contrib/drac/drac.sty (limited to 'macros/latex/contrib/drac') diff --git a/macros/latex/contrib/drac/LISEZMOI b/macros/latex/contrib/drac/LISEZMOI new file mode 100644 index 0000000000..82940ea93c --- /dev/null +++ b/macros/latex/contrib/drac/LISEZMOI @@ -0,0 +1,64 @@ +-*- coding: utf-8 -*- +Time-stamp: <2008-08-14T12:54:48 (cest) [yvon sur hypatie]> + +Ceci est le fichier LISEZMOI.txt du lot drac + +====================================================================== + + DRAC.STY v1 2008-08-20 + +====================================================================== + +Ce lot contient les fichiers + +Makefile + -> pour les machines sous *nix ; taper make pour obtenir l'aide +drac.ins + -> fichier « d'installation » du module +drac.sty + -> le fichier d'extension + +version anglaise : +README.txt +drac-en.dtx +drac.pdf + +version française : +LISEZMOI.txt + -> ce fichier +drac-fr.dtx + -> source du module et de sa documentation +drac-fr.pdf + -> version française de la documentation + +====================================================================== + +Ce module définit la commande \DeclareRobustActChar dont l'utilisation +est semblable à celle de \DeclareRobustCommand mais qui protège le +caractère actif, voir ltdefns.dtx dans /latex/base. Cela permet, par +exemple, d'écrire ce caractère dans un fichier auxiliaire sans qu'il +soit développé. Il est donc devenu « robuste » au sens des arguments +« mobiles » de LaTeX. + +Il définit également \ReDeclareRobActChar qui est à +\DeclareRobustActChar ce que \renewcommand est à \newcommand. + +====================================================================== + +Avec un *nix vous pouvez utiliser le Makefile fourni. + +Vous pouvez obtenir la documentation française avec drac-fr.dtx. +Pour obtenir une documentation avec le code, placez un % devant +\OnlyDescription dans le fichier drac-fr.dtx (ligne 54). + +Lancez latex (ou pdflatex) sur drac-fr.dtx puis + makeindex -s gind drac-fr + makeindex -s gglo -o drac-fr.gls drac-fr.glo +et enfin relancez latex (ou pdflatex) sur drac-fr.dtx. + +Sous *nix vous pouvez utiliser le Makefile fourni en lançant +« make docfr ». + +-- +Le \TeX nicien de surface +Yvon.Henel@wanadoo.fr diff --git a/macros/latex/contrib/drac/Makefile b/macros/latex/contrib/drac/Makefile new file mode 100644 index 0000000000..d92d118a0c --- /dev/null +++ b/macros/latex/contrib/drac/Makefile @@ -0,0 +1,139 @@ +# --------------------------------------------------------------- +# Makefile for the paresse package by Y. Henel +# modified version of the Makefile of the kerntest package +# many thanks to Harald Harders whose kerntest.xml I have also +# hacked to obtain my paresse.xml +# --------------------------------------------------------------- +PKGNAME=drac +VERSION=1 # first version on CTAN + +SOURCE= \ + Makefile \ + $(PKGNAME)-fr.dtx \ + $(PKGNAME)-en.dtx \ + $(PKGNAME).ins \ + LISEZMOI \ + README + +COMPDFDOC= \ + $(PKGNAME).pdf \ + +PDFDOC= \ + $(PKGNAME)-fr.pdf \ + $(PKGNAME)-en.pdf + +SRCDOC= \ + $(PKGNAME)-fr.dtx \ + $(PKGNAME)-en.dtx + +DOC= \ + $(PDFDOC)\ + $(SRCDOC)\ + +CTANDOC= \ + $(PKGNAME)-fr.pdf \ + $(COMPDFDOC) + +DECHETS = \ + $(PKGNAME)-fr.pdf\ + $(COMPDFDOC)\ + $(TEXDOC) + +REPERTS = \ + doc \ + tex \ + source + +TEX = $(PKGNAME).sty + + +# --------------------------------------------------------------- + +.SUFFIXES: .sty .ins .dtx .pdf + +# --------------------------------------------------------------- +.ins.sty: + latex $< + +.dtx.pdf: + pdflatex $< + pdflatex $< + makeindex -s gind.ist $(*D)/$(*F) + makeindex -s gglo.ist -o $(*D)/$(*F).gls $(*D)/$(*F).glo + pdflatex $< + +.tex.pdf: + pdflatex $< + pdflatex $< + +# --------------------------------------------------------------- + +all: $(PKGNAME).sty $(PDFDOC) + @-mv $(PKGNAME)-en.pdf $(PKGNAME).pdf + +help: + @-echo "******************************************************" + @-echo "** Choisir une des options : *" + @-echo "== Choose one of the options: *" + @-echo "** 'all' pour produire tous les fichiers *" + @-echo "== 'all' to produce all the files *" + @-echo "** 'clean' suppression des fichiers auxiliaires *" + @-echo "== 'clean' delete the auxiliary files *" + @-echo "** 'distclean' pour ne conserver que les sources *" + @-echo "== 'distclean' to keep only the sources *" + @-echo "******************************************************" + +dist: all clean + +# --------------------------------------------------------------- + +clean: + @-rm -f *.{out,glo,gls,idx,ilg,ind,aux,log,toc} + @-rm -f *~ + +distclean: clean + @-rm -f $(DECHETS) + @-rm -f $(PKGNAME).sty + +# --------------------------------------------------------------- + +texlive: dist + @-rm -rf $(REPERTS) + @-mkdir -p tex/latex/$(PKGNAME) + @-mkdir -p doc/latex/$(PKGNAME) + @-mkdir -p source/latex/$(PKGNAME) + @-cp $(TEX) tex/latex/$(PKGNAME) + @-cp $(CTANDOC) doc/latex/$(PKGNAME) + @-cp $(SOURCE) source/latex/$(PKGNAME) + @-mkdir -p $(PKGNAME) + @-cp $(CTANDOC) ./$(PKGNAME) + @-cp $(SOURCE) ./$(PKGNAME) + @-cp $(PKGNAME).sty ./$(PKGNAME) + +# --------------------------------------------------------------- + +zip: texlive + @-rm -f $(PKGNAME).zip + @-zip -r $(PKGNAME) $(REPERTS) + @-rm -rf $(REPERTS) + @mv $(PKGNAME).zip $(PKGNAME).tds.zip + @zip -r $(PKGNAME) $(PKGNAME) + @zip -r $(PKGNAME) $(PKGNAME).tds.zip + @-rm -rf $(PKGNAME) + @-rm -f $(PKGNAME).tds.zip + +# --------------------------------------------------------------- + +ctan: zip distclean + +# --------------------------------------------------------------- +docfr: $(PKGNAME)-fr.pdf $(PKGNAME)-fr.dtx + +docen: $(PKGNAME)-en.pdf $(PKGNAME)-en.dtx +# --------------------------------------------------------------- + +$(PKGNAME).sty: $(PKGNAME).ins $(PKGNAME)-fr.dtx +$(PDFDOC): $(SRCDOC) +# --------------------------------------------------------------- +# echu e an abaden +# Le \TeX nicien de surface 2005-03-01 diff --git a/macros/latex/contrib/drac/README b/macros/latex/contrib/drac/README new file mode 100644 index 0000000000..206f7de427 --- /dev/null +++ b/macros/latex/contrib/drac/README @@ -0,0 +1,60 @@ +Time-stamp: <2008-08-14T12:55:06 (cest) [yvon sur hypatie]> + +This is the README.txt file of the drac bundle. + +====================================================================== + + DRAC.STY v1 2008-08-20 + +====================================================================== + +This bundle should contain + +Makefile + -> for *nix machine; run make to obtain help +drac.ins +drac.sty + +English version: +README + -> this file +drac.pdf + -> the only description English documentation +drac-en.dtx + -> source of drac package and documentation + +French version: +LISEZMOI +drac-fr.dtx +drac-fr.pdf + +====================================================================== + +This package provides the \DeclareRobustActChar macro the use of which +is similar to the one of \DeclareRobustCommand but which protects the +active character when it appears in a moving argument, see ltdefns.dtx +in /latex/base. + +It provides also the \ReDeclareRobActChar macro which is to +\DeclareRobustActChar as \renewcommand is to \newcommand. + +====================================================================== + +If you're running a *nix, you can use the provided Makefile. For help +type 'make help'. + +You can obtain the doc (complete with commented code if +\OnlyDescription [line 54] is commented out) with drac-en.dtx. + +Just latex (or pdflatex) it once then + makeindex -s gind drac-en + makeindex -s gglo -o drac-en.gls drac-en.glo +then latex (or pdflatex) it once again. + +Or use the provided Makefile and type 'make docen'. + +Happy TeXing and all that. + +-- +Le \TeX nicien de surface +Yvon.Henel@wanadoo.fr diff --git a/macros/latex/contrib/drac/drac-en.dtx b/macros/latex/contrib/drac/drac-en.dtx new file mode 100644 index 0000000000..332d27026b --- /dev/null +++ b/macros/latex/contrib/drac/drac-en.dtx @@ -0,0 +1,344 @@ +% \iffalse meta-comment +%-*- coding: iso-8859-15 -*- +% -------------------------------------------------------------------- +% +% Copyright (C) 2004, 2008 by Josselin Noirel et Yvon Henel +% +% Y. Henel dit « le TeXnicien de surface » +% +% +% -------------------------------------------------------------------- +% +% This file may be distributed and/or modified under the conditions of +% the LaTeX Project Public License, either version 1.2 of this license +% or (at your option) any later version. The latest version of this +% license is in: +% +% +% +% and version 1.2 or later is part of all distributions of LaTeX +% version 1999/12/01 or later. +% +% -------------------------------------------------------------------- +% \fi +% +% \iffalse +%\NeedsTeXFormat{LaTeX2e}[1999/12/01] +%\def\fileversion{v1} +%\def\filedate{2008/08/14} +%\def\fileinfo{fichier drac.sty par J. Noirel et Y. Henel} +%\ProvidesPackage{drac} +% [\filedate\space\fileversion\space\fileinfo] +% +%<*driver> +\documentclass[a4paper]{ltxdoc} +\usepackage{drac} +\usepackage{url,array} +\usepackage[latin1]{inputenc} +\usepackage[T1]{fontenc} +\IfFileExists{lmodern.sty}{\usepackage{lmodern}}{} +\usepackage{ifpdf} +\usepackage{textcomp} +\usepackage{calc, xspace} % c'est pour moi (TdS) ! +\let\cs=\relax +\DeclareRobustCommand*{\cs}[1]{{\normalfont\ttfamily\char`\\#1}} +\renewcommand*{\meta}[1]{{\normalfont\textlangle{\itshape #1\/}\textrangle}} +\newcommand*{\fctt}{{\normalfont\ttfamily fr.comp.text.tex}} +\makeatletter +\DoNotIndex{\@tempa,\@tempb,\@tempc,\csname,\endcsname,\noexpand,\def,^^A + \edef,\ifx,\else,\endinput,\expandafter,\fi,\let,\newcommand,\relax,^^A + \string,\@ifstar} +\makeatother +\usepackage[frenchb,english]{babel} +% comment out the following line to obtain the full code with explanations +\OnlyDescription +\EnableCrossrefs +\CodelineIndex +\RecordChanges +\newcommand\BOP{\discretionary{}{}{}} +\begin{document} +\DocInput{drac-en.dtx} +\end{document} +% +% \fi +% \CheckSum{68} +% +% \CharacterTable +% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +% Digits \0\1\2\3\4\5\6\7\8\9 +% Exclamation \! Double quote \" Hash (number) \# +% Dollar \$ Percent \% Ampersand \& +% Acute accent \' Left paren \( Right paren \) +% Asterisk \* Plus \+ Comma \, +% Minus \- Point \. Solidus \/ +% Colon \: Semicolon \; Less than \< +% Equals \= Greater than \> Question mark \? +% Commercial at \@ Left bracket \[ Backslash \\ +% Right bracket \] Circumflex \^ Underscore \_ +% Grave accent \` Left brace \{ Vertical bar \| +% Right brace \} Tilde \~} +% +% \changes{v0}{2004/04/22}{Missed to be the 1st public version} +% \changes{v0.1}{2004/05/17}{Almost have been the 1st public version} +% \changes{v0.1}{2004/05/17}{Introduces \cs{ReDeclareRobActChar}} +% \changes{v1}{2008/08/14}{First public version} +% \GetFileInfo{drac.sty} +% +% \title{The \textsf{drac} package\thanks{This document corresponds to +% the file \textsf{drac}~\fileversion, dated \filedate.}} +% \author{Josselin Noirel and Yvon Henel} +% +% \maketitle +% \begin{abstract} +% This package provides \cs{DeclareRobustActChar} and +% \cs{Re}\BOP|Declare|\BOP|Rob|\BOP|Act|\BOP|Char| macros. +% +% One uses \cs{DeclareRobustActChar} as \cs{DeclareRobustCommand} +% but the macro \cs{protect}s the active character when it appears +% in a moving argument, see~\path{ltdefns.dtx} in +% \path{/latex/base/}. +% +% \cs{ReDeclareRobActChar} redefines the active character, +% previously defined with \cs{DeclareRobustActChar}, the way +% \cs{renewcommand} does for usual commands. +% \end{abstract} +% \begin{otherlanguage}{french} +% \begin{abstract} +% Ce module définit \cs{DeclareRobustActChar} et +% \cs{ReDeclareRobActChar}. +% +% Vous devriez avoir obtenu, avec ce document, les fichiers +% \path{drac-fr.dtx} et \path{drac-fr.pdf} qui donnent la version +% française de cette documentation. +% \end{abstract} +% \end{otherlanguage} +% +% \tableofcontents +% +% \section{Introduction} +% \begingroup\footnotesize{} +% +% When the macro appeared on \fctt{} in the thread ``la question à +% 100~euros\footnote{The 100~euro question.}'', dated +% \oldstylenums{8}th april \oldstylenums{2004}, its name was +% \cs{DeclareRobustActiveCharacter} which had the advantage to be +% totally descriptive but one drawback viz.\ it was really long. To +% alleviate the pains of the typist but \emph{mainly} to avoid a +% complete mess in the index of this document, I have taken it upon +% myself to rename it \cs{DeclareRobustActChar}. +% +% When reading the above mentioned thread, one can easily see that I +% ---{i\@. e\@.} Yvon Henel, \TeX nicien de surface--- just asked for +% code which was provided, very friendly and efficiently, by Josselin +% Noirel. +% +% I played a bit with Josselin's code but some months later life hit +% me hard which would not have been a surprise if I had really +% understood the classical wisdom I have been educated in during +% my younger days. But ``the light, which experience gives, is a +% lantern on the stern, which shines only on the waves behind us'' as +% wrote Samuel Taylor Coleridge. Thence when Josselin, who was rather +% busy as a student, sent me with an email in February +% \oldstylenums{2005} a second version where \cs{ReDeclareRobActChar} +% appeared I was in no state to benefit from it. +% +% Then time, the great healer, did fly\dots I'm back to the world and +% Josselin has left for other shores. +% +% The code exists and works. So instead of leaving it to rot somewhere +% on my hard disk and for I have spent somme hours to update my own +% packages I have decided to launch \texttt{drac} on the vast ocean of +% life. I just provide the wrapping and push the tiny thing on the +% nearest CTAN server. +% +% I do suppose that one understood that I can't promise to maintain +% the following code I hardly understand and that only because of the +% comments given by Josselin. So now is the time to let Josselin be +% at the helm\dots and the keyboard. +% +% \hspace*{\stretch{4}}Le \TeX nicien de surface\hspace*{\stretch{1}} +% +% \endgroup +% +% \section{Usage} +% +% This command has the usual syntax of the \cs{newcommand} and +% friends: it accepts a starred form depending on wether the active +% character accepts \cs{long} arguments (\emph{i.e.} an argument could +% contain a paragraph ending) or not; next comes the active character; +% an optionnal number of arguments, an optionnal argument which is the +% optionnal value of the first argument, and then the actual +% definition. Here are the valid syntaxes: +% ^^A +% \begin{list}{}{\ttfamily\leftmargin=\leftmargini}\item +% \cs{DeclareRobustActChar}\marg{active character}[\(n\)]\%\\ +% \ \ \oarg{default value of the first argument}\marg{definition}\par +% \cs{DeclareRobustActChar}\marg{active character}[\(n\)]\marg{definition}\par +% \cs{DeclareRobustActChar}\marg{active character}\marg{definition}\par +% \cs{DeclareRobustActChar}*\marg{active character}[\(n\)]\%\\ +% \ \ \oarg{default value of the first argument}\marg{definition}\par +% \cs{DeclareRobustActChar}*\marg{active character}[\(n\)]\marg{definition}\par +% \cs{DeclareRobustActChar}*\marg{active character}\marg{definition} +% \end{list} +% ^^A +% Then one will be able to use the active character in moving +% arguments (in the arguments of \cs{caption} for instance) and in +% other cases which demand robust commands +% (\cs{protected@edef},\cs{protected@write}, and so on). +% +% Similarly \cs{ReDeclareRobActChar} has the same syntax than +% \cs{renewcommand} so here are the possible syntaxes: +% ^^A +% \begin{list}{}{\ttfamily\leftmargin=\leftmargini}\item +% \cs{ReDeclareRobActChar}\marg{active character}[\(n\)]\%\\ +% \ \ \oarg{default value of the first argument}\marg{definition}\par +% \cs{ReDeclareRobActChar}\marg{active character}[\(n\)]\marg{definition}\par +% \cs{ReDeclareRobActChar}\marg{active character}\marg{definition}\par +% \cs{ReDeclareRobActChar}*\marg{active character}[\(n\)]\%\\ +% \ \ \oarg{default value of the first argument}\marg{definition}\par +% \cs{ReDeclareRobActChar}*\marg{active character}[\(n\)]\marg{definition}\par +% \cs{ReDeclareRobActChar}*\marg{active character}\marg{definition} +% \end{list} +% ^^A +% \StopEventually{\PrintChanges\PrintIndex} +% +% \section{The code} +% \begin{macro}{\DeclareRobustActChar} +% We begin whith the definition of \cs{DeclareRobustActChar} (which +% does not make a lot in fact). +% ^^A +% \begin{macrocode} +% \iffalse +%<*package> +% \fi +\newcommand*{\DeclareRobustActChar}{ + \@ifstar{% + \def\@tempc{\newcommand*}\@declarerobustactchar}{% + \def\@tempc{\newcommand}\@declarerobustactchar}% +} +% \end{macrocode} +% \end{macro} +% ^^A +% \begin{macro}{\ReDeclareRobActChar} +% And immediately we define \cs{ReDeclareRobActChar} (which, as the +% preceding one does not make a lot but slightly differently.) +% ^^A +% \begin{macrocode} +\newcommand*{\ReDeclareRobActChar}{\@ifstar{% + \def\@tempc{\renewcommand*}\@declarerobustactchar}{% + \def\@tempc{\renewcommand}\@declarerobustactchar}% +} +% \end{macrocode} +% ^^A +% \cs{@ifstar} checks the presence of a star and \cs{@tempc} is +% defined accordingly. \cs{@tempc} will in its time undertake the +% definition. Then \cs{@declarerobustactchar} is summoned. +% \end{macro} +% \begin{macro}{\@declarerobustactchar} +% Here comes the macro which does work: +% \cs{@declarerobustactchar}. It takes an argument which is the +% active character (which is supposed to be \emph{already} active +% when\cs{DeclareRobustActChar} is called in). +% ^^A +% \begin{macrocode} +\newcommand*{\@declarerobustactchar}[1]{% +% \end{macrocode} +% ^^A +% The present values of \cs{protect} and \cs{@typeset@protect} are +% preserved to be restored later. +% ^^A +% \begin{macrocode} + \let\@tempa=\protect + \let\@tempb=\@typeset@protect +% \end{macrocode} +% ^^A +% \cs{protect} and \cs{@typeset@protect} are defined as equivalent to +% \cs{relax} for them not to `move' during the process of expansion in +% \cs{edef}. +% ^^A +% \begin{macrocode} + \let\protect=\relax + \let\@typeset@protect\relax % Should be the case +% \end{macrocode} +% ^^A +% The active character is defined. Caution: if the character is not +% active when one uses \cs{DeclareRobustActChar} there is a +% considerable risk of making \TeX{} growls about an `inaccessible' +% command. The \meta{active character} is defined as: +% ^^A +% \begin{flushleft}\begin{tabular}{@{}l@{}l@{}} +% \meta{active character} $\stackrel{\mathrm{def}}{\equiv}$ \hskip0pt & +% \cs{ifx}\cs{protect}\cs{@typeset@protect} \\ +% & \ttfamily\ \ \cs{expandafter}\cs{DRAC@real@\meta{active character}} \\ +% & \cs{else} \\ +% & \ttfamily\ \ \cs{protect}\meta{active character} \\ +% & \cs{fi} \\ +% \end{tabular}\end{flushleft} +% ^^A +% The \cs{ifx} test enables us to know whether we are in the context +% of a moving argument or not. The result of the test is `true' if it +% is not the case; then \cs{DRAC@real@\meta{active character}} is +% executed: it is the effecting command which will contain in some +% time the \meta{definition} to which we were refering above. When +% the test is `false', because we are in the context of a moving +% argument we simply \cs{protect} the \meta{active character} and put +% it back. The \cs{expandafter} is there to make the chunk of code +% `\cs{else}\linebreak[0]\dots\linebreak[0]\cs{fi}' disappear. +% ^^A +% \begin{macrocode} + \edef#1{% + \noexpand\ifx\protect\@typeset@protect + \noexpand\expandafter + \expandafter\noexpand + \csname DRAC@real@\string#1\endcsname + \noexpand\else + \protect + \noexpand#1% + \noexpand\fi + }% +% \end{macrocode} +% ^^A +% The initial values of \cs{protect} and \cs{@typeset@protect} are +% restored. +% ^^A +% \begin{macrocode} + \let\protect=\@tempa + \let\@typeset@protect=\@tempb +% \end{macrocode} +% ^^A +% Now we define with \cs{newcommand} ---~by means of \cs{@tempc}, do +% you remember?~--- the effecting command \cs{DRAC@read@\meta{active +% character}}. It is the use of \cs{newcommand} which enables us +% to protect the syntax. But one will note that it prevents, in +% particular, the redifinition of the command (in other words this +% package might still be improved). +% ^^A +% \begin{macrocode} + \expandafter\@tempc\csname DRAC@real@\string#1\endcsname +} +% \end{macrocode} +% ^^A +% ``THE END'' +% ^^A +% \begin{macrocode} +\endinput +% \end{macrocode} +% \end{macro} +% \iffalse +% +% \fi +% ^^A +% \section{Bugs and restrictions} +% No known bugs at present. The restrictions are numerous: this +% package has no pretence. +% +% It can \emph{a priori} work with commands as well but we advise you to +% use \cs{DeclareRobustCommand} instead in such a case. +% \Finale +\endinput +%%% Local Variables: +%%% mode: doctex +%%% TeX-master: t +%%% fill-column: 70 +%%% End: diff --git a/macros/latex/contrib/drac/drac-fr.dtx b/macros/latex/contrib/drac/drac-fr.dtx new file mode 100644 index 0000000000..931fa59eb8 --- /dev/null +++ b/macros/latex/contrib/drac/drac-fr.dtx @@ -0,0 +1,361 @@ +% \iffalse meta-comment +% -*- coding: iso-8859-15 -*- +% -------------------------------------------------------------------- +% +% Copyright (C) 2004, 2008 by Josselin Noirel et Yvon Henel +% +% Y. Henel dit « le TeXnicien de surface » +% +% +% -------------------------------------------------------------------- +% +% This file may be distributed and/or modified under the conditions of +% the LaTeX Project Public License, either version 1.2 of this license +% or (at your option) any later version. The latest version of this +% license is in: +% +% +% +% and version 1.2 or later is part of all distributions of LaTeX +% version 1999/12/01 or later. +% +% -------------------------------------------------------------------- +% \fi +% +% \iffalse +%\NeedsTeXFormat{LaTeX2e}[1999/12/01] +%\def\fileversion{v1} +%\def\filedate{2008/08/14} +%\def\fileinfo{fichier drac.sty par J. Noirel et Y. Henel} +%\ProvidesPackage{drac} +% [\filedate\space\fileversion\space\fileinfo] +% +%<*driver> +\documentclass[a4paper]{ltxdoc} +\usepackage{drac} +\usepackage{url,array,xspace} +\usepackage[latin9]{inputenc} +\usepackage[T1]{fontenc} +\IfFileExists{lmodern.sty}{\usepackage{lmodern}}{} +\usepackage{ifpdf} +\usepackage{textcomp} +\usepackage{calc} +\let\cs=\relax +\DeclareRobustCommand*{\cs}[1]{{\normalfont\ttfamily\char`\\#1}} +\renewcommand*{\meta}[1]{{\normalfont\textlangle{\itshape #1\/}\textrangle}} +\newcommand*{\fctt}{{\normalfont\ttfamily fr.comp.text.tex}} +\makeatletter +\DoNotIndex{\@tempa,\@tempb,\@tempc,\csname,\endcsname,\noexpand,\def,^^A + \edef,\ifx,\else,\endinput,\expandafter,\fi,\let,\newcommand,\relax,^^A + \string,\@ifstar} +\makeatother +\usepackage[english,frenchb]{babel} +% Commentez la ligne suivante pour avoir un document avec le code commenté +\OnlyDescription +\EnableCrossrefs +\CodelineIndex +\RecordChanges +\GlossaryPrologue{% + \section*{{Changements}}} +\IndexPrologue{\section*{Index}% + Les nombres en italique renvoient à la page où l'entrée est décrite; les + nombres soulignés renvoient à la ligne de code de la définition; les + nombres en caractères romains renvoient à la ligne de code où l'entrée est + utilisée.} +\newcommand\BOP{\discretionary{}{}{}} +\begin{document} +\DocInput{drac-fr.dtx} +\end{document} +% +% \fi +% \CheckSum{72} +% +% \CharacterTable +% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +% Digits \0\1\2\3\4\5\6\7\8\9 +% Exclamation \! Double quote \" Hash (number) \# +% Dollar \$ Percent \% Ampersand \& +% Acute accent \' Left paren \( Right paren \) +% Asterisk \* Plus \+ Comma \, +% Minus \- Point \. Solidus \/ +% Colon \: Semicolon \; Less than \< +% Equals \= Greater than \> Question mark \? +% Commercial at \@ Left bracket \[ Backslash \\ +% Right bracket \] Circumflex \^ Underscore \_ +% Grave accent \` Left brace \{ Vertical bar \| +% Right brace \} Tilde \~} +% +% \changes{v0}{2004/04/22}{A failli être la première version publique} +% \changes{v0.1}{2004/05/17}{A manqué de peu d'être la première +% version publique} +% \changes{v0.1}{2004/05/17}{Ajout de \cs{ReDeclareRobActChar}} +% \changes{v1}{2008/08/14}{1\iere version publique} +% \GetFileInfo{drac.sty} +% +% \title{Le module \textsf{drac}\thanks{Ce document correspond au +% fichier \textsf{drac}~\fileversion, du \filedate.}} +% \author{Josselin Noirel et Yvon Henel} +% +% \maketitle +% \begin{abstract} +% Ce module définit \cs{DeclareRobustActChar} et +% \cs{ReDeclareRobActChar}. +% +% On utilise \cs{DeclareRobustActChar} comme +% \cs{DeclareRobustCommand} mais elle protège le caractère actif, +% voir~\path{ltdefns.dtx} dans \path{/latex/base/}. Cela permet, par +% exemple, d'écrire ce caractère dans un fichier auxiliaire sans +% qu'il soit développé. Il est donc devenu \og robuste\fg au sens +% des arguments \og mobiles\fg de \LaTeX. +% +% \cs{ReDeclareRobActChar} permet de redéfinir le caractère actif +% défini préalablement par +% \cs{Declare}\BOP|Robust|\BOP|Act|\BOP|Char| à la manière de +% \cs{renewcommand}. +% \end{abstract} +% \begin{otherlanguage}{english} +% \begin{abstract} +% This package provides \cs{DeclareRobustActChar} and +% \cs{Re}\BOP|Declare|\BOP|Rob|\BOP|Act|\BOP|Char| macros. +% +% You should have downloaded with this file a file +% \path{drac-en.dtx} and a file \path{drac.pdf} which +% give the English documentation of this package. +% \end{abstract} +% \end{otherlanguage} +% \tableofcontents +% +% \section{Introduction} +% \begingroup\footnotesize{} +% Lorsqu'elle apparut pour la première fois, le \oldstylenums{8}~avril +% \oldstylenums{2004}, sur \fctt{} dans le fil de discussion \og la +% question à \oldstylenums{100}~euros\fg, le nom de la macro était +% \cs{DeclareRobustActiveCharacter} qui avait l'avantage d'être +% totalement descriptif mais l'inconvénient d'être long. Pour alléger +% quelque peu le travail du codeur mais \emph{surtout} pour éviter un +% joyeux bazar dans l'index de cette documentation, j'ai pris sur moi +% de la renommer \cs{DeclareRobustActChar}. +% +% À la lecture du fil mentionné ci-dessus, on s'appercevra sans peine +% que ce que je --- je c.-à-d. Y. Henel, \TeX nicien de surface --- +% fis ce fut de passer commande d'un code que Josselin Noirel me +% fournit très aimablement et tout aussi efficacement. +% +% Je fis mumuse un moment avec le code fourni par Josselin puis +% quelques mois plus tard la vie m'asséna un de ces coups dont la +% fréquentation assidue des classiques auraient du me prévenir mais, +% pour citer un de ses fameux (pseudo?) proverbe chinois, \og +% l'expérience n'éclaire que le chemin parcouru\fg. Ce qui fait que +% même si Josselin, de son côté assez occupé avec la fin de ses +% études, me fit parvenir, dans un courriel de février +% \oldstylenums{2005}, une \oldstylenums{2}\ieme version dans laquelle +% apparut \cs{ReDeclareRobActChar} dans un courriel de février +% \oldstylenums{2005} je n'étais guère en état d'en tirer profit. +% +% Puis le temps a passé\dots j'ai sorti la tête de l'eau et Josselin +% est parti vers d'autres cieux. +% +% Le code existe et fonctionne. Alors, plutôt que de le laisser moisir +% dans un coin obscur de mon disque dur, et puisque j'ai passé +% quelques heures à mettre à jour mes extensions, je me suis décidé à +% lancer \texttt{drac} dans le vaste monde. Je me contente de fournir +% l'emballage et porter le bébé dans mes bras velus jusqu'au serveur +% CTAN le plus proche. +% +% On aura compris que je ne m'engage pas du tout à assurer la +% maintenance de ce code si jamais le besoin s'en faisait +% sentir. J'arrive à peu près à comprendre ce que fait Josselin en +% suivant pas à pas ses explications mais je suis bien incapable de me +% hausser à de telles hauteurs. Il est donc temps maintenant de céder +% le clavier à Josselin. +% +% \hspace*{\stretch{4}}Le \TeX nicien de surface\hspace*{\stretch{1}} +% \endgroup +% +% \section{Utilisation} +% +% +% La macro \cs{DeclareRobustActChar} a la syntaxe habituelle des +% \cs{newcommand} et cons½urs: elle admet une forme étoilée selon +% que le caractère actif acceptera ou non des arguments \cs{long}s +% (c.-à-d. un argument pourra comporter une fin de paragraphe); +% ensuite vient le caractère actif; un nombre optionnel d'arguments, +% un argument optionnel qui est la valeur optionnelle du premier +% argument, enfin la définition proprement dite. Voilà les syntaxes +% valides: ^^A +% \begin{list}{}{\ttfamily\leftmargin=\leftmargini}\item +% \cs{DeclareRobustActChar}\marg{caractère actif}[\(n\)]\%\\ +% \ \ \oarg{valeur par défaut du premier argument}\marg{définition}\par +% \cs{DeclareRobustActChar}\marg{caractère actif}[\(n\)]\marg{définition}\par +% \cs{DeclareRobustActChar}\marg{caractère actif}\marg{définition}\par +% \cs{DeclareRobustActChar}*\marg{caractère actif}[\(n\)]\%\\ +% \ \ \oarg{valeur par défaut du premier argument}\marg{définition}\par +% \cs{DeclareRobustActChar}*\marg{caractère actif}[\(n\)]\marg{définition}\par +% \cs{DeclareRobustActChar}*\marg{caractère actif}\marg{définition} +% \end{list} +% ^^A +% Suite à quoi le caractère actif pourra être utilisé dans les +% arguments mobiles (dans les arguments de \cs{caption} par exemple) +% et dans les autres cas qui requièrent des commandes robustes +% (\cs{protected@edef}, \cs{protected@write}, etc.) +% +% De même \cs{ReDeclareRobActChar} a la syntaxe de \cs{renewcommand} +% d'où les syntaxes possibles: +% ^^A +% \begin{list}{}{\ttfamily\leftmargin=\leftmargini}\item +% \cs{ReDeclareRobActChar}\marg{caractère actif}[\(n\)]\%\\ +% \ \ \oarg{valeur par défaut du premier argument}\marg{définition}\par +% \cs{ReDeclareRobActChar}\marg{caractère actif}[\(n\)]\marg{définition}\par +% \cs{ReDeclareRobActChar}\marg{caractère actif}\marg{définition}\par +% \cs{ReDeclareRobActChar}*\marg{caractère actif}[\(n\)]\%\\ +% \ \ \oarg{valeur par défaut du premier argument}\marg{définition}\par +% \cs{ReDeclareRobActChar}*\marg{caractère actif}[\(n\)]\marg{définition}\par +% \cs{ReDeclareRobActChar}*\marg{caractère actif}\marg{définition} +% \end{list} +% ^^A +% \StopEventually{\PrintChanges\PrintIndex} +% \section{Le code} +% \begin{macro}{\DeclareRobustActChar} +% Nous commençons par définir \cs{DeclareRobustActChar} (qui ne fait +% pas grand-chose en réalité). +% ^^A +% \begin{macrocode} +% \iffalse +%<*package> +% \fi +\newcommand*{\DeclareRobustActChar}{ + \@ifstar{% + \def\@tempc{\newcommand*}\@declarerobustactchar}{% + \def\@tempc{\newcommand}\@declarerobustactchar}% +} +% \end{macrocode} +% \end{macro} +% ^^A +% \begin{macro}{\ReDeclareRobActChar} +% Et dans la foulée nous définissons \cs{ReDeclareRobActChar} (qui, +% comme la précédente, ne fait pas grand-chose mais légèrement +% différemment). +% ^^A +% \begin{macrocode} +\newcommand*{\ReDeclareRobActChar}{\@ifstar{% + \def\@tempc{\renewcommand*}\@declarerobustactchar}{% + \def\@tempc{\renewcommand}\@declarerobustactchar}% +} +% \end{macrocode} +% ^^A +% \cs{@ifstar} teste la présence d'une étoile. Selon le cas on +% définit \cs{@tempc} en conséquence. \cs{@tempc} sera utilisé à +% terme pour prendre en charge la définition. On appelle ensuite +% \cs{@declarerobustactchar}. +% \end{macro} +% \begin{macro}{\@declarerobustactchar} +% Vient la macro qui abat vraiment du travail: +% \cs{@declarerobustactchar}. Elle prend un argument qui est le +% caractère actif (qui est supposé être \emph{déjà} actif au moment de +% l'appel à \cs{DeclareRobustActChar}). +% ^^A +% \begin{macrocode} +\newcommand*{\@declarerobustactchar}[1]{% +% \end{macrocode} +% ^^A +% On conserve les valeurs actuelles de \cs{protect} et +% \cs{@typeset@protect} pour les restituer plus tard. +% ^^A +% \begin{macrocode} + \let\@tempa=\protect + \let\@tempb=\@typeset@protect +% \end{macrocode} +% ^^A +% \cs{protect} et \cs{@typeset@protect} sont définis équivalents à +% \cs{relax} pour qu'ils ne \og bougent\fg pas pendant le processus de +% développement dans \cs{edef}. +% ^^A +% \begin{macrocode} + \let\protect=\relax + \let\@typeset@protect\relax % Devrait être le cas +% \end{macrocode} +% ^^A +% On définit le caractère actif. Attention s'il n'est pas actif au +% moment de l'utilisation de \cs{DeclareRobustActChar} on risque +% fortement de voir \TeX{} râler à cause d'une commande +% \og inaccessible\fg. Le \meta{caractère actif} prend comme +% définition: +% ^^A +% \begin{flushleft}\begin{tabular}{@{}l@{}l@{}} +% \meta{caractère actif} $\stackrel{\mathrm{def}}{\equiv}$ \hskip0pt & +% \cs{ifx}\cs{protect}\cs{@typeset@protect} \\ +% & \ttfamily\ \ \cs{expandafter}\cs{DRAC@real@\meta{caractère actif}} \\ +% & \cs{else} \\ +% & \ttfamily\ \ \cs{protect}\meta{caractère actif} \\ +% & \cs{fi} \\ +% \end{tabular}\end{flushleft} +% ^^A +% Le test \cs{ifx} permet de connaître si l'on est dans un contexte +% d'argument mobile ou non. Le résultat du test est \og vrai\fg si ce +% n'est pas le cas; alors \cs{DRAC@real@\meta{caractère actif}} est +% exécutée: c'est la commande effectrice qui contiendra dans quelque +% temps la \meta{définition} dont nous parlions plus haut. +% Dans le cas où le test est \og faux\fg, étant dans un contexte +% d'argument mobile on replace simplement le \meta{caractère actif} en +% le \cs{protégeant}. +% Le \cs{expandafter} est là pour faire disparaître la portion de code +% \og \cs{else}\linebreak[0]\dots\linebreak[0]\cs{fi}\fg. +% ^^A +% \begin{macrocode} + \edef#1{% + \noexpand\ifx\protect\@typeset@protect + \noexpand\expandafter + \expandafter\noexpand + \csname DRAC@real@\string#1\endcsname + \noexpand\else % \noexpand\expandafter [JN : pas bon] + \protect % \noexpand\expandafter [JN : idem] + \noexpand#1% + \noexpand\fi + }% +% \end{macrocode} +% ^^A +% Les valeurs initiales de \cs{protect} et \cs{@typeset@protect} sont +% restituées. +% ^^A +% \begin{macrocode} + \let\protect=\@tempa + \let\@typeset@protect=\@tempb +% \end{macrocode} +% ^^A +% Maintenant on définit avec \cs{newcommand} --- par l'intermédiaire +% de \cs{@tempc}, vous souvenez-vous? --- la commande effectrice +% \cs{DRAC@read@\meta{caractère actif}}. C'est l'utilisation de +% \cs{newcommand} qui permet d'en propager la syntaxe. Mais on notera +% que cela interdit notamment la redéfinition de la commande +% (autrement dit il se pourrait que le package s'améliore encore). +% ^^A +% \begin{macrocode} + \expandafter\@tempc\csname DRAC@real@\string#1\endcsname +} +% \end{macrocode} +% ^^A +% \og FIN\fg +% ^^A +% \begin{macrocode} +\endinput +% \end{macrocode} +% \end{macro} +% ^^A +% \section{Papillons et limitations} +% Pas de bogue connu à ce jour. Les limitations elles sont +% nombreuses: ce package n'a pas de grande prétention. +% +% Bien que les macros ici définies puissent \emph{a priori} +% fonctionner avec les commandes aussi, nous recommandons d'utiliser +% \cs{DeclareRobustCommand} dans ce but. +% \Finale +% \iffalse +% +% \fi +\endinput +%%% Local Variables: +%%% mode: doctex +%%% TeX-master: t +%%% fill-column: 70 +%%% End: diff --git a/macros/latex/contrib/drac/drac-fr.pdf b/macros/latex/contrib/drac/drac-fr.pdf new file mode 100644 index 0000000000..31b60febec Binary files /dev/null and b/macros/latex/contrib/drac/drac-fr.pdf differ diff --git a/macros/latex/contrib/drac/drac.ins b/macros/latex/contrib/drac/drac.ins new file mode 100644 index 0000000000..f3d5882310 --- /dev/null +++ b/macros/latex/contrib/drac/drac.ins @@ -0,0 +1,70 @@ +%% +%% Copyright (C) 2004, 2008 by Josselin Noirel et Yvon Henel +%% +%% Y. Henel dit « le TeXnicien de surface » +%% +%% +%% This file may be distributed and/or modified under the conditions +%% of the LaTeX Project Public License, either version 1.2 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.2 or later is part of all distributions of LaTeX +%% version 1999/12/01 or later. +%% + +\input docstrip.tex +\keepsilent + +\preamble +This is a generated file. + +Copyright (C) 2004, 2008 by Josselin Noirel et Yvon Henel + +Y. Henel dit « le TeXnicien de surface » + + +This file may be distributed and/or modified under the conditions +of the LaTeX Project Public License, either version 1.2 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.2 or later is part of all distributions of LaTeX +version 1999/12/01 or later. +\endpreamble + +\askforoverwritefalse +\generate{\file{drac.sty}{\from{drac-fr.dtx}{package}}} +\obeyspaces +\Msg{*****************************************************************} +\Msg{* *} +\Msg{* To finish the installation you have to move the following *} +\Msg{* file into a directory searched by TeX: *} +\Msg{* *} +\Msg{* drac.sty *} +\Msg{*****************************************************************} +\Msg{* Pour finir l'installation vous devez placer *} +\Msg{* le fichier suivant dans un répertoire parcouru par TeX. *} +\Msg{* *} +\Msg{* drac.sty *} +\Msg{*****************************************************************} +\Msg{* To produce the documentation read the README file *} +\Msg{* Pour produire la documentation lire le fichier LISEZMOI *} +\Msg{* *} +\Msg{** Happy TeXing **} +\Msg{** TeXez dans la joie ! **} +\Msg{*****************************************************************} +\endbatchfile + + + + + + + + + diff --git a/macros/latex/contrib/drac/drac.pdf b/macros/latex/contrib/drac/drac.pdf new file mode 100644 index 0000000000..648786eefb Binary files /dev/null and b/macros/latex/contrib/drac/drac.pdf differ diff --git a/macros/latex/contrib/drac/drac.sty b/macros/latex/contrib/drac/drac.sty new file mode 100644 index 0000000000..5530c0f7c0 --- /dev/null +++ b/macros/latex/contrib/drac/drac.sty @@ -0,0 +1,60 @@ +%% +%% This is file `drac.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% drac-fr.dtx (with options: `package') +%% This is a generated file. +%% +%% Copyright (C) 2004, 2008 by Josselin Noirel et Yvon Henel +%% +%% Y. Henel dit « le TeXnicien de surface » +%% +%% +%% This file may be distributed and/or modified under the conditions +%% of the LaTeX Project Public License, either version 1.2 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.2 or later is part of all distributions of LaTeX +%% version 1999/12/01 or later. +\NeedsTeXFormat{LaTeX2e}[1999/12/01] +\def\fileversion{v1} +\def\filedate{2008/08/14} +\def\fileinfo{fichier drac.sty par J. Noirel et Y. Henel} +\ProvidesPackage{drac} + [\filedate\space\fileversion\space\fileinfo] +\newcommand*{\DeclareRobustActChar}{ + \@ifstar{% + \def\@tempc{\newcommand*}\@declarerobustactchar}{% + \def\@tempc{\newcommand}\@declarerobustactchar}% +} +\newcommand*{\ReDeclareRobActChar}{\@ifstar{% + \def\@tempc{\renewcommand*}\@declarerobustactchar}{% + \def\@tempc{\renewcommand}\@declarerobustactchar}% +} +\newcommand*{\@declarerobustactchar}[1]{% + \let\@tempa=\protect + \let\@tempb=\@typeset@protect + \let\protect=\relax + \let\@typeset@protect\relax % Devrait être le cas + \edef#1{% + \noexpand\ifx\protect\@typeset@protect + \noexpand\expandafter + \expandafter\noexpand + \csname DRAC@real@\string#1\endcsname + \noexpand\else % \noexpand\expandafter [JN : pas bon] + \protect % \noexpand\expandafter [JN : idem] + \noexpand#1% + \noexpand\fi + }% + \let\protect=\@tempa + \let\@typeset@protect=\@tempb + \expandafter\@tempc\csname DRAC@real@\string#1\endcsname +} +\endinput +%% +%% End of file `drac.sty'. -- cgit v1.2.3