From 35f1ce3dcdb68333a18ffee104162b49936c4c26 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 19 Oct 2011 22:27:29 +0000 Subject: new latex package mversion (19oct11) git-svn-id: svn://tug.org/texlive/trunk@24330 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/mversion/mVersion.sty | 69 +++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 Master/texmf-dist/tex/latex/mversion/mVersion.sty (limited to 'Master/texmf-dist/tex/latex/mversion') diff --git a/Master/texmf-dist/tex/latex/mversion/mVersion.sty b/Master/texmf-dist/tex/latex/mversion/mVersion.sty new file mode 100644 index 00000000000..4492d3b822d --- /dev/null +++ b/Master/texmf-dist/tex/latex/mversion/mVersion.sty @@ -0,0 +1,69 @@ +%% +%% This is file `mVersion.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% mVersion.dtx (with options: `package') +%% +%% This is a generated file. +%% +%% Copyright (C) 2011 by Michael Schmeing +%% +%% 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] +\ProvidesPackage{mVersion} + [2011/10/18 v1.0 easy versioning for LaTeX] +\def\parseline#1;#2 %this space is important +{ + \def\versionnumber{#1} + \def\buildnumber{#2} +} +\IfFileExists{version.dat} +{ } +{ +\newwrite\outfile +\immediate\openout\outfile=version.dat +\immediate\write\outfile{0.0;0} +\immediate\closeout\outfile +} +\newread\versionfile +\openin\versionfile=version.dat +\read\versionfile to \versionline +\closein\versionfile +\expandafter\parseline\versionline +\newcounter{buildcounter} +\setcounter{buildcounter}{\buildnumber} +\newcommand{\version}{\versionnumber.\thebuildcounter} +\newcommand{\setVersion}[1] +{ +\newwrite\outfile +\immediate\openout\outfile=version.dat +\immediate\write\outfile{#1;\thebuildcounter} +\immediate\closeout\outfile +\newread\versionfile +\openin\versionfile=version.dat +\read\versionfile to \versionline +\expandafter\parseline\versionline +\closein\versionfile +} +\newcommand{\increaseBuild} +{ +\stepcounter{buildcounter} +\newwrite\outfile +\immediate\openout\outfile=version.dat +\immediate\write\outfile{\versionnumber;\thebuildcounter} +\immediate\closeout\outfile +} +\endinput +%% +%% End of file `mVersion.sty'. -- cgit v1.2.3