Hash: SHA1


I'm trying to write a document which includes financial data, towards the end I sum up various costs using a counter (\newcounter and all that) and some simple macros. This works fine and gets me the total costs at the end of the document. But I would like to copy the final figure to the start of the document for a summary, and of course I'd like this automatic (even if that means running the document through LaTeX twice after a change).

The approach I'm taking is to try and save the counter value to the .aux file with this command:


The idea is, if "totalcost" is the counter with the final costs, to write in the document at the end:


and then retrieve at the head of the document with


Needless to say it does not work! The error message, with teTeX version 2.0 (downloaded late January 2003) and compiled on Linux:

"(./proposal.toc [1]) [2]Segmentation fault (core dumped)"

Any ideas as to what is wrong? or can anyone suggest an alternative strategy to getting the counter value from the tail of the document printed at the head?

Many thanks for any suggestions,


- -- - ---------------------------------------------------------------------
Dr David C Hendry, School of Engineering and Physical Sciences,
University of Aberdeen, Kings College, Aberdeen, Scotland, AB24 3UE.
Tel UK 01224 272790, Fax UK 01224 272497, www.eng.abdn.ac.uk/~eng186
- ---------------------------------------------------------------------

Version: GnuPG v1.0.1 (GNU/Linux)
Comment: Using GnuPG with Netscape - http://enigmail.mozdev.org


Reply via email to