diff options
author | Karl Berry <karl@freefriends.org> | 2013-01-23 23:53:17 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-01-23 23:53:17 +0000 |
commit | 943d3f44319a81bca1245e19f0e0e894cf404a87 (patch) | |
tree | bfb103f098d6ad816bdcfca7075f19ef5a267e10 /Master/texmf-dist/tex/latex/vhistory | |
parent | a0e35f2bf6cf222f13ceb9b0553d3539ab22bb7d (diff) |
vhistory 1.6 (22jan13)
git-svn-id: svn://tug.org/texlive/trunk@28914 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/vhistory')
-rw-r--r-- | Master/texmf-dist/tex/latex/vhistory/vhistory.sty | 98 |
1 files changed, 68 insertions, 30 deletions
diff --git a/Master/texmf-dist/tex/latex/vhistory/vhistory.sty b/Master/texmf-dist/tex/latex/vhistory/vhistory.sty index 07ebb0e5e68..da90e99c2e5 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.5 %% -%% DATE: 2010-07-17 %% +%% VERSION: 1.6 %% +%% DATE: 2013-01-22 %% %% %% %% LICENSE: This program may be distributed and/or modified under the %% %% conditions of the LaTeX Project Public License, either version 1.2 %% @@ -44,6 +44,7 @@ %% supported. %% %% - 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 %% %% %% %% REQUIRED PACKAGES: %% %% - sets: Works well with version 1.2 or higher %% @@ -111,10 +112,10 @@ \fi \fi \vh@Ifundefined{l@german}\else - \ifnum \language=\l@german\relax - \vh@GermanCaptions - \fi - \fi + \ifnum \language=\l@german\relax + \vh@GermanCaptions + \fi + \fi \vh@Ifundefined{l@austrian}\else \ifnum \language=\l@austrian\relax \vh@GermanCaptions @@ -130,6 +131,11 @@ \vh@DutchCaptions \fi \fi + \vh@Ifundefined{l@croatian}\else + \ifnum \language=\l@croatian\relax + \vh@CroatianCaptions + \fi + \fi } \def \vh@EnglishCaptions{% @@ -163,6 +169,14 @@ \def\vhauthorname{Auteur(s)}% \def\vhchangename{Beschrijving}% } + +\def \vh@CroatianCaptions{% + \def\vhhistoryname{Povijest verzija}% + \def\vhversionname{Verzija}% + \def\vhdatename{Datum}% + \def\vhauthorname{Autor(ica)}% + \def\vhchangename{Opis Promjena}% +} %% --------------------------------------------------------------------------- %% -- Options ---------------------------------------------------------------- @@ -170,11 +184,14 @@ \def \vh@nochapter{0} % By default, a new chapter will be started \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 + \DeclareOption{tocentry}{\def \vh@tocentry{1}}% \DeclareOption{nochapter}{\def \vh@chapter{}}% \DeclareOption{owncaptions}{\vh@setcaptions \def \vh@owncaptions{1}}% \DeclareOption{hideauthorcolumn}{\def \vh@hideauthor{1}}% +\DeclareOption{tablegrid}{\def \vh@tablegrid{1}}% %% This macro starts a new chapter. If \chapter is undefined, \section is %% used (To work with document class article). The option nochapter will @@ -188,16 +205,16 @@ \markright{\vhhistoryname}% \ifnum \vh@tocentry=1\relax \section{\vhhistoryname}% - \else - \section*{\vhhistoryname}% - \fi + \else + \section*{\vhhistoryname}% + \fi + \else + \markboth{\vhhistoryname}{\vhhistoryname}% + \ifnum \vh@tocentry=1\relax + \chapter{\vhhistoryname}% \else - \markboth{\vhhistoryname}{\vhhistoryname}% - \ifnum \vh@tocentry=1\relax - \chapter{\vhhistoryname}% - \else - \chapter*{\vhhistoryname}% - \fi + \chapter*{\vhhistoryname}% + \fi \fi } @@ -293,7 +310,7 @@ \vh@undeclarevhEntry \IfFileExists{\jobname.ver}{% file exists \LTXtable{\textwidth}{\jobname.ver}}% - {\@latex@warning{Rerun LaTeX to get the history of versions.}}% + {\@latex@warning{Rerun LaTeX to get the history of versions.}}% } @@ -315,12 +332,16 @@ \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 - \vh@verbwrite \vh@verfile { & ##4\\} + \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 }% } @@ -360,14 +381,27 @@ \immediate \closeout \vh@hstfile% } +\def \vhAuthorColWidth{.5\hsize} +\def \vhChangeColWidth{1.5\hsize} + \def \vh@showAuthorHead{% - \vh@verbwrite \vh@verfile {% - \begin{longtable}{@{}ll>{\hsize=.5\hsize}X>{\hsize=1.5\hsize}X@{}}% - } + \ifnum \vh@tablegrid=0\relax + \vh@verbwrite \vh@verfile {% + \begin{longtable}{@{}ll>{\hsize=\vhAuthorColWidth}X>{\hsize=\vhChangeColWidth}X@{}}% + }% + \else + \vh@verbwrite \vh@verfile {% + \begin{longtable}{@{}|l|l|>{\hsize=\vhAuthorColWidth}X|>{\hsize=\vhChangeColWidth}X|@{}}\hline% + }% + \fi } \def \vh@hideAuthorHead{% - \vh@verbwrite \vh@verfile {\begin{longtable}{@{}llX@{}}} + \ifnum \vh@tablegrid=0\relax + \vh@verbwrite \vh@verfile {\begin{longtable}{@{}llX@{}}}% + \else + \vh@verbwrite \vh@verfile {\begin{longtable}{@{}|l|l|X|@{}}}\hline% + \fi } %% This macro is called at the beginning of a versionhistory environment. It @@ -377,16 +411,20 @@ \def \vh@writeTable{% \immediate \openout \vh@verfile=\jobname.ver% \ifnum \vh@hideauthor=0\relax - \vh@showAuthorHead + \vh@showAuthorHead \else - \vh@hideAuthorHead + \vh@hideAuthorHead \fi \vh@verbwrite \vh@verfile {\textbf{\vhversionname}}% \vh@verbwrite \vh@verfile { & \textbf{\vhdatename}}% \ifnum \vh@hideauthor=0\relax - \vh@verbwrite \vh@verfile { & \textbf{\vhauthorname}}% + \vh@verbwrite \vh@verfile { & \textbf{\vhauthorname}}% + \fi + \ifnum \vh@tablegrid=0\relax + \vh@verbwrite \vh@verfile { & \textbf{\vhchangename}\\[1ex]}% + \else + \vh@verbwrite \vh@verfile { & \textbf{\vhchangename}\\\hline}% \fi - \vh@verbwrite \vh@verfile { & \textbf{\vhchangename}\\[1ex]}% } |