help-gnu-emacs
[Top][All Lists]

## Calc embedded assignment without producing output

 From: Josip Gracin Subject: Calc embedded assignment without producing output Date: Sun, 3 Apr 2011 11:36:20 +0200

Hello!

In a LaTeX document, I'd like to assign some calc variables and have
calc update a bunch of expressions using these variables.  However, I
don't want these assignments to appear in the document.

Here's an example.  I'd like to be able to use calc in the following manner:

\documentclass{article}
\begin{document}
%%% f := 10 %%%

The first value is
$%%% f * 15 => %%% 150$

The second value is
$%%% f * 13 => %%% 130$
\end{document}

So, I'd like assignment f:=10 to be invisible in the document, but
calc always inserts "f \gets 10" after evaluating it.  Also, I'd like
the evaluation of f*13 to only insert "150", and not "\evalto f * 15
\to 150".

Is there a way to get this kind of behavior from calc?

Thanks!