From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rainer M Krug Subject: Re: Result from evaluation of code in Title or footer (fancyhdr)? Date: Tue, 03 May 2016 12:00:00 +0200 Message-ID: References: <87mvo81gw6.fsf@skimble.plus.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48130) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1axX84-0001DQ-HA for emacs-orgmode@gnu.org; Tue, 03 May 2016 06:00:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1axX7r-00041H-P0 for emacs-orgmode@gnu.org; Tue, 03 May 2016 06:00:27 -0400 Received: from mout.kundenserver.de ([212.227.17.10]:57934) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1axX7r-0003pn-Ee for emacs-orgmode@gnu.org; Tue, 03 May 2016 06:00:19 -0400 In-Reply-To: <87mvo81gw6.fsf@skimble.plus.com> (Sharon Kimble's message of "Mon, 02 May 2016 18:58:17 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Sharon Kimble Cc: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Sharon Kimble writes: > Rainer M Krug writes: > >> Hi >> >> I have a DESCRIPTION file, in which I store the version of the document, >> which I extract with the following code: >> >> src_sh{sed -n '/^Version: /s///p' ./DESCRIPTION} >> > > Have you looked at the latex package 'mversion'? I use it and have it > working on my document, with it in the date place of my title it shows > "Build - \version", and the "version.dat" shows '2.0;0000' meaning > version 2.0 and it being increased in the '0000' field with every build. > You can put it in your header or footer, whichever you want. Brilliant - mVersion works nicely. Exactly what I was looking for. I only had to adjust latexmk as it ran into an endless loop by adding =2D-8<---------------cut here---------------start------------->8--- $hash_calc_ignore_pattern{'dat'} =3D '^[0-9]'; =2D-8<---------------cut here---------------end--------------->8--- to my latexmk config file. Thanks, Rainer > > Thanks > Sharon. > >> >> At the moment, I have one Header, which contains the version. >> >> * Version src_sh{sed -n '/^Version: /s///p' ./DESCRIPTION} :p= aper: >> :PROPERTIES: >> :header-args: :exports results >> :header-args+: :tangle no >> :END: >> Version src_sh{sed -n '/^Version: /s///p' ./DESCRIPTION} >> >> Is there a way, that I can have this dynamically in the Title of the >> document, or in a footer after LaTeX export (using fancyhdr)? >> >> Thanks, >> >> Rainer =2D-=20 Rainer M. Krug email: Rainerkrugsde PGP: 0x0F52F982 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBCAAGBQJXKHakAAoJENvXNx4PUvmCfPkIAOetOL5Tzw+hnU/SfWQaQZTk IqP/IPnRsYd0iYq/uKEd+uz3wsYFYaNUlfQFltEg8BUk77Hkroq3oC+Oy4gDHsyn w7x1L4s3nnnTkC+hImATHWV/QqcEVWizhNXHZFmyoYcUEd0JCFMYdTsKCNjYiTpA goImdreebbnUvpGVRrdvoeipkvQJKXaJ5KUMkE8wJNh2sAZwdFtXrBdc2ASW8K+d 1hfxJBclp9N6ciUAYC/cnwBgeFrX1Qynx04Su/uUrhfUU1vSUqCDDXCgRda8j82L n6VaxJGdSmhUfAbHNZOVJouOB7noQ+0ciqaNn7c0jwpAb+vptGUD1c+3hWROZz0= =qVHu -----END PGP SIGNATURE----- --=-=-=--