[texhax] boites.sty: translations
Susan Dittmar
SDittmar at eureca.de
Thu Jan 29 16:14:49 CET 2009
Hello,
spurred on by a discussion on a german TeX users' mailing list, I dared an
attempt at translating the french comments in boites.sty to english.
My last contact with the french language has been more than 15 years ago,
so I would appreciate if anyone with knowledge of this language could have
a look at those translations. All lines I added start with '%%SD'.
I already contacted Vincent Zoonekynd, and hope that -- if my translations
find approval -- those translations find their way to CTAN eventually.
Thanks for your help,
Susan Dittmar
%%%%%%%% boites.sty with translations: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% boites.sty
% (c) 1998-1999 Vincent Zoonekynd <zoonek at math.jussieu.fr>
% Distributed under the GNU Public Licence
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%SD%% January 2009 : Translations of the french comments by
%%SD%% Susan Dittmar <Susan.Dittmar at gmx.de>
%%SD%% (all marked by %%SD at the beginning of
%%SD%% of the line)
%% Mars 1999 : Il y a certaines lignes à ne pas numéroter (par
%% exemple, celles qui ne contiennent que des espaces
%% verticaux avant ou après une énumération).
%% Mars 1999 : commentaires
%%
%% Modifiations par VZ, Juillet 1998
%%
%% Il y a quelques bugs, en particulier des traits qui sont trop
%% longs, trop courts, trop épais ou trop fins. Si Quelqu'un sait à
%% quoi c'est dû, qu'il me le dise.
%%
%% Il ne devrait plus y avoir de problème à cause d'un environement de
%% type liste (itemize, enumerate, etc.) à l'intérieur des boites.
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% D'après :
%%SD%% March 1999 : Some lines are not taken in correctly (for example
%%SD%% those that contain only vertical space before or after
%%SD%% an enumeration).
%%SD%% March 1999 : comments
%%SD%%
%%SD%% Modifications by VZ, July 1998
%%SD%%
%%SD%% There are some bugs, in particular some lengths that are too long,
%%SD%% too short, too low, or too fine. If someone knows what causes this,
%%SD%% please tell me.
%%SD%%
%%SD%% The problem with list environments (itemize, enumerate, etc.) inside
%%SD%% the boite environment should not longer exist.
%%SD%%
%%SD%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%SD%% based upon:
% eclbkbox.sty by Hideki Isozaki, 1992
% Date: May 28, 1993
\ProvidesFile{boites.sty} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ProvidesPackage{boites} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newbox\bk at bxb
\newbox\bk at bxa
\newif\if at bkcont
\newif\ifbkcount
\newcount\bk at lcnt
\def\breakboxskip{2pt}
\def\breakboxparindent{1.8em}
%% Paramètres modifiables
%%SD%% parameters that can be modified
%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\bkvz at before@breakbox{\ifhmode\par\fi\vskip\breakboxskip\relax} %%%
% Ce que l'on met à gauche du texte, par exemple, une ligne verticale
% pour faire un cadre, ou une ligne qui ondule.
%%SD% What should be put on the left of the text, for example a vertical
%%SD% line for a frame, or a wavy line
\def\bkvz at left{\vrule \@width\fboxrule\hskip\fboxsep} %%%%%%%%%%%%%%%%%
% De même, ce que l'on met à droite,
%%SD% Analog; what should be put on the right,
\def\bkvz at right{\hskip\fboxsep\vrule \@width\fboxrule} %%%%%%%%%%%%%%%%
% en haut
%%SD% above
\def\bkvz at top{\hrule\@height\fboxrule} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% ou en bas
%%SD% and below.
\def\bkvz at bottom{\hrule\@height\fboxrule} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Si vous modifiez l'une de ces macros, il ne faut pas oublier de
% modifier aussi la suivante, qui change la valeur de \linewidth en
% lui retirant la largeur de tout ce que l'on vient de mettre sur le
% côté.
%%SD% If you modify one of those macros, don't forget to modify also
%%SD% the following. It reduces the value of \linewidth by the width
%%SD% of all that will be put on the edges.
\def\bkvz at set@linewidth{\advance\linewidth -2\fboxrule %%%%%%%%%%%%%%%%
\advance\linewidth -2\fboxsep} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% FIN DES PARAMÈTRES MODIFIABLES
%%SD%% END OF PARAMETERS THAT CAN BE MODIFIED
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Le début de l'environement
%%SD%% The start of the environment
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\breakbox{%
% On n'est pas nécessairement en mode vertical.
% C'est \bkvz at before@breakbox qui s'en occupe (ou non).
%%SD% Start is not necessarily in vertical mode.
%%SD% \bkvz at before@breakbox deals with this (if necessary).
\bkvz at before@breakbox
% on met tout dans une \vbox (\bk at bxb)
%%SD% put all in one \vbox (\bk at bxb)
\setbox\bk at bxb\vbox\bgroup
% À l'intérieur de cette \vbox, on change la valeur de \hsize (et
% aussi \linewidth).
%%SD% Inside this \vbox, change \hsize (and \linewidth).
\bkvz at set@linewidth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\hsize\linewidth
% je ne sais pas ce que fait la commande \@parboxrestore.
%%SD% I do not know what \@parboxrestore does.
\@parboxrestore
% On indente éventuellement, si l'utilisateur le désire.
%%SD% Indent if the user so desires.
\parindent\breakboxparindent\relax}
%% On coupe la boite
%% Cut the box
%%%%%%%%%%%%%%%%%%%%%%
% \@tempdimb: amount of vertical skip
% between the first line (\bk at bxa) and the rest (\bk at bxb)
\def\bk at split{%
% On calcule la hauteur totale (hauteur + profondeur) de la boite.
%%SD% Calculate the total height (height + depth) of the box.
\@tempdimb\ht\bk at bxb % height of original box
\advance\@tempdimb\dp\bk at bxb
% On coupe, à l'aide de la commande \vsplit... to 0pt
% Le morceau du haut se retrouve dans \bk at bxa,
% celui du bas dans \bk at bxb.
%%SD% Cut with the help of \vsplit... to 0pt
%%SD% The height can then be found in \bk at bxa,
%%SD% the depth in \bk at bxb.
\setbox\bk at bxa\vsplit\bk at bxb to\z@ % split it
% L'un des problèmes, c'est que la première boite a une hauteur vide.
% On peut lui redonner sa hauteur initiale grace à \vbox{\unvbox...}
%%SD% A problem arises if the first box has an empty height.
%%SD% It can be given back its initial height via \vbox{\unvbox...}
\setbox\bk at bxa\vbox{\unvbox\bk at bxa}% recover height & depth of \bk at bxa
% L'autre problème, c'est que l'on a perdu l'espace (interligne) entre
% nos deux boites. Pour le récupérer, on ajoute la hauteur de ces deux
% boites, et on fait la différence avec la hauteur initiale.
%%SD% The other problem is to forget the (interline) space between our
%%SD% our two boxes. To regain it, add the height of the two boxes
%%SD% and subtract that from the initial height.
\setbox\@tempboxa\vbox{\copy\bk at bxa\copy\bk at bxb}% naive concatenation
\advance\@tempdimb-\ht\@tempboxa
\advance\@tempdimb-\dp\@tempboxa
% Désormais, \@tempdimb contient l'espace entre les deux boites, que
% l'on utilisera avec \bk at addskipdp.
%%SD% Now, \@tempdimb contains the space between the two boxes,
%%SD% which will be used with \bk at addskipdp.
}% gap between two boxes
%% Rajouter \fboxsep à la première ligne
%%SD%% Add \fboxsep to the first line
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \@tempdima: height of the first line (\bk at bxa) + fboxsep
\def\bk at addfsepht{%
\setbox\bk at bxa\vbox{\vskip\fboxsep\box\bk at bxa}}
%% cette macro n'est pas utilisée
%%SD%% This macro is not used anywhere
\def\bk at addskipht{%
\setbox\bk at bxa\vbox{\vskip\@tempdimb\box\bk at bxa}}
%% Rajouter \fboxsep à la dernière ligne
%%SD%% Add \fboxsep to the last line
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \@tempdima: depth of the first line (\bk at bxa) + fboxsep
\def\bk at addfsepdp{%
\@tempdima\dp\bk at bxa
\advance\@tempdima\fboxsep
\dp\bk at bxa\@tempdima}
%% Rajouter l'espace qui a été perdu par \vsplit... to 0pt
%%SD%% Add the space that had been lost by \vsplit... to 0pt
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \@tempdima: depth of the first line (\bk at bxa) + vertical skip
\def\bk at addskipdp{%
\@tempdima\dp\bk at bxa
\advance\@tempdima\@tempdimb
\dp\bk at bxa\@tempdima}
%% On ne compte pas toutes les lignes, mais uniquement celles qui en
%% sont vraiment. J'ai pris comme critère une largeur supérieure à
%% 1mm. La même distance se retrouve un peu plus loin, dans
%% \bk at line.
%%SD%% Not all lines are computed, only cells that truely are there.
%%SD%% I have taken as criterion a size of minimum 1mm.
%%SD%% The same distance can be found further on, in \bk at line.
\def\bkvz at countlines{%
\ifdim\wd\bk at bxa>1mm\advance\bk at lcnt\@ne\fi
}
%% Afficher la ligne que l'on vient de couper
%%SD%% show the line we had cut
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\bk at line{%
\hbox to \linewidth{%
\ifdim\wd\bk at bxa>1mm %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifbkcount\smash{\llap{\the\bk at lcnt\ }}\fi
\fi %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\bkvz at left %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\box\bk at bxa
% Il arrive que la boite ne soit pas aussi large que la ligne
% (par exemple, espace avant une énumération)
%%SD% Sometimes the box is not big enough for a line (for example,
%%SD% space before an enumeration)
\hfil %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\bkvz at right}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% La fin de l'environement
%%SD%% The end of the environment
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\endbreakbox{%
% On ferme la \vbox (\bk at bxb)
%%SD% Close the \vbox (\bk at bxb)
\egroup
%\ifhmode\par\fi
{\noindent
% On remet le compteur de lignes à un.
%%SD% Set line count back to one.
\bk at lcnt 0%
% Le booléen que nous allons utiliser dans la boucle plus loin.
%%SD% The boolean we will use in the following loop
\@bkconttrue
% Comme on va empiler des boites, on met certains ressorts à zéro,
% pour éviter les espaces verticaux non désirés.
%%SD% While putting together the boxes, some ajustable lengths are set
%%SD% to zero to avoid undesired vertical space.
\baselineskip\z@
\lineskiplimit\z@
\lineskip\z@
\vfuzz\maxdimen
% On coupe la boite
%%SD% split the boxes
\bk at split
% On ajoute un peu d'espace vertical (\fboxsep) au dessus
%%SD% Add a bit of vertical space (\fboxsep) above
\bk at addfsepht
% On ajoute en dessous l'espace qui avait été perdu par la commande
% \vsplit.
%%SD% Add below the space that had been forgotten due to the use of
%%SD% the \vsplit command.
\bk at addskipdp
% De deux choses l'une,
%%SD% First of two,
\ifvoid\bk at bxb
% Soit, il n'y a qu'une ligne
%%SD% In case there's only one line
\def\bk at fstln{%
% On rajoute un peu d'espace (\fboxsep) en dessous.
%%SD% Add a bit of space (\fboxsep) below.
\bk at addfsepdp
% On construit la boite : le haut, le milieu (qui contient la gauche
% et la droite) et le bas.
%%SD% Construct the box: the top, the middle (which contains
%%SD% the left and right parts) and the foot.
\bkvz at countlines
\vbox{\bkvz at top\bk at line\bkvz at bottom}}% %%%%%%%%%%%%%%%%%%%%%%%%%%
% Soit, il y en a plusieurs.
%% In case there's more to do.
\else
\def\bk at fstln{%
% On met le haut
%%SD% Put in the top
\bkvz at countlines
\vbox{\bkvz at top\bk at line}% %%%%%%%%%%%%%%%%%%%%%%%%%%%
% ??? (Si on l'enlève, ça ne marche plus.)
%%SD% ??? (If this is removed, it does not work any more.)
\hfil
% On commence à compter les lignes
%%SD% Continue counting lines
%\advance\bk at lcnt\@ne %%%%%%%%%%%%%%%%%%%% Voir \bkvz at countlines
% Début de la boucle
%%SD% Begin of the loop
\loop
% On coupe ce qui reste de la boite.
%%SD% Cut out the next bit of the box
\bk at split
% On rajoute l'espace vertical qui a été perdu.
%%SD% Add the vertical space that has been left out.
\bk at addskipdp
% Éventuellement, on augmente le numéro de la ligne
%%SD% advance number of lines if necessary
\bkvz at countlines
% ???
\leavevmode
% S'il s'agit de la dernière ligne
%%SD% If it's the last line
\ifvoid\bk at bxb
% On met le booléen indiquant que la boucle doit se poursuivre à FAUX.
%%SD% Set the boolean that indicates continuing the loop to FALSE.
\@bkcontfalse
% On met un peu d'espace vertical (\fboxsep)
%%SD% Add a bit of vertical space (\fboxsep)
\bk at addfsepdp
% En envoie la dernière ligne.
%%SD% Add the last line.
% POURQUOI \vtop ??? Pour que l'éventuel numéro de ligne soit à la
% bonne hauteur.
%%SD% WHY \vtop ??? Because the line number has correct height.
\vtop{\bk at line\bkvz at bottom}% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\else % 2,...,(n-1)
\bk at line
\fi
\hfil
%\advance\bk at lcnt\@ne %%%%%%%%%%%%%%%% Voir \bkvz at countlines
%%SD% See \bkvz at countlines
\if at bkcont\repeat}%
\fi
\leavevmode\bk at fstln\par}\vskip\breakboxskip\relax}
\bkcountfalse
%%%%%%%% end of boites.sty %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://tug.org/pipermail/texhax/attachments/20090129/7f36230b/attachment.bin
More information about the texhax
mailing list