summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/vhistory/vhistory.sty
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/vhistory/vhistory.sty')
-rw-r--r--macros/latex/contrib/vhistory/vhistory.sty76
1 files changed, 56 insertions, 20 deletions
diff --git a/macros/latex/contrib/vhistory/vhistory.sty b/macros/latex/contrib/vhistory/vhistory.sty
index b4e515923e..66a5ea39f5 100644
--- a/macros/latex/contrib/vhistory/vhistory.sty
+++ b/macros/latex/contrib/vhistory/vhistory.sty
@@ -3,8 +3,7 @@
%% FILE: vhistory.sty %%
%% %%
%% AUTHOR: Jochen Wertenauer %%
-%% VERSION: 1.6.1 %%
-%% DATE: 2013-01-28 %%
+%% VERSION: 1.8.0 %%
%% %%
%% LICENSE: This program may be distributed and/or modified under the %%
%% conditions of the LaTeX Project Public License, either version 1.2 %%
@@ -45,6 +44,8 @@
%% - hideauthorcolumn: The history of versions does not contain the column %%
%% listing the name(s) of the author(s). %%
%% - tablegrid: If provided, the version history will display gridlines %%
+%% - omittable: If provided, the table with the version history will not be %%
+%% printed, but you can still call \vhCurrentVersion etc. %%
%% %%
%% REQUIRED PACKAGES: %%
%% - sets: Works well with version 1.2 or higher %%
@@ -136,6 +137,16 @@
\vh@CroatianCaptions
\fi
\fi
+ \vh@Ifundefined{l@spanish}\else
+ \ifnum \language=\l@spanish\relax
+ \vh@SpanishCaptions
+ \fi
+ \fi
+ \vh@Ifundefined{l@portuguese}\else
+ \ifnum \language=\l@portuguese\relax
+ \vh@PortugueseCaptions
+ \fi
+ \fi
}
\def \vh@EnglishCaptions{%
@@ -177,6 +188,23 @@
\def\vhauthorname{Autor(ica)}%
\def\vhchangename{Opis Promjena}%
}
+
+\def \vh@SpanishCaptions{%
+ \def\vhhistoryname{Historial de Revisiones}%
+ \def\vhversionname{Versi\'{o}n}%
+ \def\vhdatename{Fecha}%
+ \def\vhauthorname{Autor(es)}%
+ \def\vhchangename{Descripci\'{o}n}%
+}
+
+\def \vh@PortugueseCaptions{%
+ \def\vhhistoryname{Tabela de Revis\~{o}es}%
+ \def\vhversionname{Revis\~{a}o}%
+ \def\vhdatename{Data}%
+ \def\vhauthorname{Autor(es)}%
+ \def\vhchangename{Descri\c{c}\~{a}o}%
+}
+
%% ---------------------------------------------------------------------------
%% -- Options ----------------------------------------------------------------
@@ -185,6 +213,7 @@
\def \vh@owncaptions{0} % By default, the build in captions are used.
\def \vh@hideauthor{0} % By default, the authors of a change are shown
\def \vh@tablegrid{0} % By default, there is no tablegrid
+\def \vh@omittable{0} % By default, we want to see a table
\DeclareOption{tocentry}{\def \vh@tocentry{1}}%
@@ -192,6 +221,7 @@
\DeclareOption{owncaptions}{\vh@setcaptions \def \vh@owncaptions{1}}%
\DeclareOption{hideauthorcolumn}{\def \vh@hideauthor{1}}%
\DeclareOption{tablegrid}{\def \vh@tablegrid{1}}%
+\DeclareOption{omittable}{\def \vh@omittable{1}}%
%% This macro starts a new chapter. If \chapter is undefined, \section is
%% used (To work with document class article). The option nochapter will
@@ -286,7 +316,7 @@
%% The environment versionhistory.
%%
-%% At first the macro \decl@revhEntry will be called to allow the user to add
+%% At first the macro \vh@declarevhEntry will be called to allow the user to add
%% entries to the version history. Second step is to write the tables's head.
%% Third step is to delete previous contents of vhAllAuthorsSet. Now the
%% captions of the actual language are loaded. Last step is to start a new
@@ -298,19 +328,23 @@
%%
\newenvironment{versionhistory}{%
\vh@declarevhEntry
- \vh@writeTable
\newsetsimple \vhAllAuthorsSet{}%
- \ifnum \vh@owncaptions=0\relax% Defined by the options
- \vh@setcaptions
+ \ifnum \vh@omittable=0\relax
+ \vh@writeTable
+ \ifnum \vh@owncaptions=0\relax% Defined by the options
+ \vh@setcaptions
+ \fi
+ \vh@chapter
\fi
- \vh@chapter
}{
- \vh@writeEndTable
\vh@writeHstFile
\vh@undeclarevhEntry
- \IfFileExists{\jobname.ver}{% file exists
- \LTXtable{\textwidth}{\jobname.ver}}%
- {\@latex@warning{Rerun LaTeX to get the history of versions.}}%
+ \ifnum \vh@omittable=0\relax
+ \vh@writeEndTable
+ \IfFileExists{\jobname.ver}{% file exists
+ \LTXtable{\textwidth}{\jobname.ver}}%
+ {\@latex@warning{Rerun LaTeX to get the history of versions.}}%
+ \fi
}
@@ -332,15 +366,17 @@
\gdef \vhCurrentVersion{##1}% Update version number
\gdef \vhCurrentDate{##2}% Update date
\vh@add{##3}%
- \vh@verbwrite \vh@verfile {##1}%
- \vh@verbwrite \vh@verfile { & ##2}%
- \ifnum \vh@hideauthor=0\relax
- \vh@verbwrite \vh@verfile { & \listset{##3}}%
- \fi
- \ifnum \vh@tablegrid=0\relax
- \vh@verbwrite \vh@verfile { & ##4\\}%
- \else
- \vh@verbwrite \vh@verfile { & ##4\\\hline}%
+ \ifnum \vh@omittable=0\relax
+ \vh@verbwrite \vh@verfile {##1}%
+ \vh@verbwrite \vh@verfile { & ##2}%
+ \ifnum \vh@hideauthor=0\relax
+ \vh@verbwrite \vh@verfile { & \listset{##3}}%
+ \fi
+ \ifnum \vh@tablegrid=0\relax
+ \vh@verbwrite \vh@verfile { & ##4\\}%
+ \else
+ \vh@verbwrite \vh@verfile { & ##4\\\hline}%
+ \fi
\fi
}%
}