On Tue, Sep 03, 2002 at 10:32:00PM +1000, John Sheahan wrote:
> Hi
> 
> In my lyx doc I'd like to be able to add up a couple of 
> numbers, perhaps in a table, maybe in a paragraph, get a total
> 
> and then be able to copy the result (sort of like a label)
> somewhere else in the document, as a summary.
> 
> Is this possible somehow?

It is possible using latex code:
\newcounter{tmp}
\setcounter{tmp}{0}
\addtocounter{tmp}{10}
\addtocounter{tmp}{5}
\arabic{tmp}

To save typing, you can use
\newcommand{\add}[1]{\addtocounter{tmp}{#1}}
and then you can write \add{10} instead of \addtocounter{tmp}{10}

Reply via email to