summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-09-26 18:38:29 +0000
committerKarl Berry <karl@freefriends.org>2010-09-26 18:38:29 +0000
commitc5986713ad700e9170a486a46cba3bdfdc8ec1de (patch)
treeed76651eea6ca69ca614e28cc3b47ebebbd60780 /Master/texmf-dist/tex
parenta13c28d352a7eec8a95b8b66883fc623a57f3094 (diff)
vhistory (19jul10)
git-svn-id: svn://tug.org/texlive/trunk@19901 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/vhistory/sets.sty57
-rw-r--r--Master/texmf-dist/tex/latex/vhistory/vhistory.sty79
2 files changed, 97 insertions, 39 deletions
diff --git a/Master/texmf-dist/tex/latex/vhistory/sets.sty b/Master/texmf-dist/tex/latex/vhistory/sets.sty
index 4042752545c..a2c26bd103c 100644
--- a/Master/texmf-dist/tex/latex/vhistory/sets.sty
+++ b/Master/texmf-dist/tex/latex/vhistory/sets.sty
@@ -3,8 +3,8 @@
%% FILE: sets.sty %%
%% %%
%% AUTHOR: Jochen Wertenauer %%
-%% VERSION: 1.2 %%
-%% DATE: 2009-03-01 %%
+%% VERSION: 1.3 %%
+%% DATE: 2010-07-17 %%
%% %%
%% LICENSE: This program may be distributed and/or modified under the %%
%% conditions of the LaTeX Project Public License, either version 1.2 %%
@@ -53,18 +53,17 @@
%% Helper Methods ------------------------------------------------------------
-\let \sets@xpa \expandafter
-\def \sets@xxpa{\sets@xpa\sets@xpa\sets@xpa}
+\def \sets@xxpa{\expandafter\expandafter\expandafter}
\def \sets@empty{\empty}
%% Appends #1 to the definition of macro #2.
-\def \sets@append #1\to#2{\sets@xpa \def \sets@xpa #2\sets@xpa{#2#1}}
+\def \sets@append #1\to#2{\expandafter \def \expandafter #2\expandafter{#2#1}}
%% Removes the first character of the content of #2 and stores the result in
-%% #1. Note that \sets@xpa\sets@xpa\sets@xpa cannot be replaced by \sets@xxpa here!
+%% #1. Note that \expandafter\expandafter\expandafter cannot be replaced by \sets@xxpa here!
\def \sets@gobblefirst #1#2{%
- \sets@xxpa \def \sets@xpa\sets@xpa\sets@xpa #1\sets@xpa\sets@xpa\sets@xpa {\sets@xpa\@gobble #2}}
+ \sets@xxpa \def \expandafter\expandafter\expandafter #1\expandafter\expandafter\expandafter {\expandafter\@gobble #2}}
%% Deletes everthing to the next occurance of > inludung the >.
\def \sets@erasetobrace #1>{}
@@ -77,7 +76,7 @@
%% \if ...
%% \repeat
\def \sets@loop #1\repeat{%
- \def \iterate {#1\sets@xpa \iterate\fi}%
+ \def \iterate {#1\expandafter \iterate\fi}%
\iterate \let\iterate\relax}
\long\def \sets@ReturnFi #1\fi{\fi #1}
@@ -99,11 +98,11 @@
%% The macros are based on a sort algorithm by Klaus Lagally.
\def \sets@compStrings #1#2{%
\def \sets@CSti{#1}%
- \edef\sets@ctempi{\sets@xpa\sets@erasetobrace\meaning \sets@CSti}%
+ \edef\sets@ctempi{\expandafter\sets@erasetobrace\meaning \sets@CSti}%
\def \sets@CStii{#2}%
- \edef\sets@ctempii{\sets@xpa\sets@erasetobrace\meaning \sets@CStii}%
+ \edef\sets@ctempii{\expandafter\sets@erasetobrace\meaning \sets@CStii}%
\sets@lessfalse\sets@greaterfalse
- \sets@xxpa\sets@compI \sets@xpa\sets@ctempi\sets@xpa|\sets@xpa\\\sets@ctempii|\relax
+ \sets@xxpa\sets@compI \expandafter\sets@ctempi\expandafter|\expandafter\\\sets@ctempii|\relax
}
@@ -153,7 +152,7 @@
%% Stores the size of set #1 in the LaTeX counter #2. #2 has to be existing.
\def \sizeofset #1\is#2{%
\setcounter{#2}{0}%
- \sets@xpa\sets@sizeofset #1|\endset{#2}%
+ \expandafter\sets@sizeofset #1|\endset{#2}%
}
% Helper method for \sizeofset. Recursively calls itself. Implemented straight
@@ -178,15 +177,25 @@
\def \setseparator{, }
%% Prints the contents of set #1. Elements will be separated by \setseparator.
-\def \listset #1{\sets@xpa\sets@listset #1|\empty\endset}
+%\def \listset #1{\expandafter\sets@listset #1|\empty\endset}
+\def \listset #1{\expandafter\sets@listset #1|\endset|}
+
%% Helper method for \listset.
-\def \sets@listset #1|#2\endset{%
+%\def \sets@listset #1|#2\endset{%
+% #1%
+% \def\temps@t{#2}%
+% \ifx \temps@t\sets@empty{}\else
+% \setseparator
+% \sets@ReturnFi{\sets@listset #2\endset}%
+% \fi
+%}
+
+\def \sets@listset #1|#2|{%
#1%
- \def\temps@t{#2}%
- \ifx \temps@t\sets@empty{}\else
- \setseparator
- \sets@ReturnFi{\sets@listset #2\endset}%
+ \ifx\endset #2%
+ \else
+ \setseparator\sets@ReturnFi{\sets@listset#2|}%
\fi
}
%-----------------------------------------------------------------------------
@@ -211,7 +220,7 @@
\endgroup
\sets@Returntrue
\fi}%
- \sets@xpa\lookup \sets@xpa |#2|#1|\endset%
+ \expandafter\lookup \expandafter |#2|#1|\endset%
}
%-----------------------------------------------------------------------------
@@ -221,7 +230,7 @@
%% This macro finds alle duplicate elements in the SORTED set #1 and removes
%% them. The result set (still sorted) is stored in #2.
-\def \deleteduplicates #1#2{\sets@xpa\sets@duplicates#1|\endset#2}
+\def \deleteduplicates #1#2{\expandafter\sets@duplicates#1|\endset#2}
%% Helper method for \deleteduplicates. Does some preparations and catches the
%% special case of an set with size <= 1. Parameter #3 is the result set.
@@ -295,7 +304,7 @@
\def \sets@sortset #1#2{%
\let \sorttemps@t #1%
\sets@loop
- \sets@xpa\sets@bubblesortRun \sorttemps@t|\endset\sorttemps@t
+ \expandafter\sets@bubblesortRun \sorttemps@t|\endset\sorttemps@t
\addtocounter{s@tlength}{-1}%
\ifnum 1<\value{s@tlength}\relax
\repeat
@@ -358,7 +367,7 @@
\else
\let \uniontemps@t=\uniont@mpi
\ifx \uniont@mpii\empty \else
- \sets@xpa\sets@append\sets@xpa{\sets@xpa|#2}\to\uniontemps@t
+ \expandafter\sets@append\expandafter{\expandafter|#2}\to\uniontemps@t
\fi
\fi
\sortset{\uniontemps@t}{\uniontemps@t}%
@@ -373,7 +382,7 @@
%% sorted, too. If #1 contains duplicates, #3 may also contain duplicates.
\def \intersectsets #1#2\to#3{%
\def \tempinters@ct{}%
- \sets@xpa \sets@intersectsets #1|\endset#2\tempinters@ct
+ \expandafter \sets@intersectsets #1|\endset#2\tempinters@ct
\ifx \tempinters@ct\empty
\def #3{}%
\else
@@ -404,7 +413,7 @@
%% will be part if it is in #2.
\def \minussets #1\minus#2\to#3{%
\def \@tempminus{}%
- \sets@xpa \sets@minussets #1|\endset#2\@tempminus
+ \expandafter \sets@minussets #1|\endset#2\@tempminus
\ifx \@tempminus\empty
\def #3{}%
\else
diff --git a/Master/texmf-dist/tex/latex/vhistory/vhistory.sty b/Master/texmf-dist/tex/latex/vhistory/vhistory.sty
index 7b9812bc6a8..07ebb0e5e68 100644
--- a/Master/texmf-dist/tex/latex/vhistory/vhistory.sty
+++ b/Master/texmf-dist/tex/latex/vhistory/vhistory.sty
@@ -3,8 +3,8 @@
%% FILE: vhistory.sty %%
%% %%
%% AUTHOR: Jochen Wertenauer %%
-%% VERSION: 1.4 %%
-%% DATE: 2009-03-01 %%
+%% VERSION: 1.5 %%
+%% DATE: 2010-07-17 %%
%% %%
%% LICENSE: This program may be distributed and/or modified under the %%
%% conditions of the LaTeX Project Public License, either version 1.2 %%
@@ -81,7 +81,6 @@
\RequirePackage{ltxtable, sets}
%% Helper methods ------------------------------------------------------------
-\let \vh@xpa=\expandafter
\def \vh@empty{\empty}
\def \vh@iwrite{\immediate\write}
@@ -91,12 +90,12 @@
\def \vh@Ifundefined #1{\expandafter\ifx\csname#1\endcsname\relax}
%% Prints the content of macro #1 without expansion.
-\long \def \vh@verbprint #1{\vh@xpa\vh@eraseToBrace\meaning #1}
+\long \def \vh@verbprint #1{\expandafter\vh@eraseToBrace\meaning #1}
%% This macro writes #2 verbatim to the (open) file #1.
\long \def \vh@verbwrite #1#2{%
\long \def \vh@verbtemp{#2}%
- \vh@xpa\vh@iwrite\vh@xpa#1\vh@xpa{\vh@xpa\vh@eraseToBrace \meaning\vh@verbtemp}%
+ \expandafter\vh@iwrite\expandafter#1\expandafter{\expandafter\vh@eraseToBrace \meaning\vh@verbtemp}%
}
%% Deletes everything before the next > e.g. "macro ->". Used by \vh@verbprint
@@ -121,14 +120,24 @@
\vh@GermanCaptions
\fi
\fi
+ \vh@Ifundefined{l@french}\else
+ \ifnum \language=\l@french\relax
+ \vh@FrenchCaptions
+ \fi
+ \fi
+ \vh@Ifundefined{l@dutch}\else
+ \ifnum \language=\l@dutch\relax
+ \vh@DutchCaptions
+ \fi
+ \fi
}
\def \vh@EnglishCaptions{%
- \def\vhhistoryname{History of versions}%
- \def\vhversionname{Version}%
+ \def\vhhistoryname{Revision History}%
+ \def\vhversionname{Revision}%
\def\vhdatename{Date}%
\def\vhauthorname{Author(s)}%
- \def\vhchangename{Changes}%
+ \def\vhchangename{Description}%
}
\def \vh@GermanCaptions{%
@@ -138,6 +147,22 @@
\def\vhauthorname{Autor(en)}%
\def\vhchangename{\"Anderungen}%
}
+
+\def \vh@FrenchCaptions{%
+ \def\vhhistoryname{Historique}%
+ \def\vhversionname{Version}%
+ \def\vhdatename{Date}%
+ \def\vhauthorname{Auteur(s)}%
+ \def\vhchangename{Modifications}%
+}
+
+\def \vh@DutchCaptions{%
+ \def\vhhistoryname{Wijzigingen}%
+ \def\vhversionname{Herziening}%
+ \def\vhdatename{Datum}%
+ \def\vhauthorname{Auteur(s)}%
+ \def\vhchangename{Beschrijving}%
+}
%% ---------------------------------------------------------------------------
%% -- Options ----------------------------------------------------------------
@@ -196,15 +221,39 @@
%% Prints the contents of \vhAllAuthorsSet but regards the elements as
%% commands. Instead of XY, the definition of the command \XY will be used.
-\def \vhListAllAuthorsLong{\vh@xpa\vh@longlistset \vhAllAuthorsSet|\empty\endset}
+\def \vhListAllAuthorsLong{\expandafter\vh@longlistset\vhAllAuthorsSet|\endset|}
+
+%% Helper method for \vhListAllAuthorsLong.
+\def \vh@longlistset #1|#2|{%
+ \expandafter\ifx\csname#1\endcsname\relax
+ #1%
+ \else
+ \csname#1\endcsname % Create command and expand
+ \fi
+ \ifx\endset#2%
+ \else
+ \setseparator\sets@ReturnFi{\vh@longlistset#2|}%
+ \fi
+}
+
+%% Prints the contents of \vhAllAuthorsSet but regards the elements as
+%% commands. Instead of XY, the definition of the command \XY will be used.
+\def \vhListAllAuthorsLongWithAbbrev{\expandafter\vh@longlistsetWithAbbrev\vhAllAuthorsSet|\endset|}
+
+\def \vhAbbrevSeparator{\ }
+\def \vhAbbrevLeft{(}
+\def \vhAbbrevRight{)}
%% Helper method for \vhListAllAuthorsLong.
-\def \vh@longlistset #1|#2\endset{%
- \csname #1\endcsname % Create command and expand
- \def\vh@tmp{#2}%
- \ifx\vh@tmp\vh@empty{}\else
- \setseparator
- \vh@ReturnFi{\vh@longlistset #2\endset}%
+\def \vh@longlistsetWithAbbrev #1|#2|{%
+ \expandafter\ifx\csname#1\endcsname\relax
+ #1%
+ \else
+ \csname#1\endcsname\vhAbbrevSeparator\vhAbbrevLeft #1\vhAbbrevRight%
+ \fi
+ \ifx\endset#2%
+ \else
+ \setseparator\sets@ReturnFi{\vh@longlistsetWithAbbrev#2|}%
\fi
}