TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to make an array with some automatic calculations. I use the package ftlpoint.

I made a test, but it does not work:

    \fpMul{\produit}{#1}{#2}% Calculation
    \produit&%print result
    \produit&print result in another cell

On the first cell, no problem, but in the second cell, LaTeX says the command \produit doesn't exist (undefined control sequence).

How can do this?

Ps. Of course, my example is very simplified. I would like to make other calculations as well.

share|improve this question
You example is to simplified ;-) Please add a minimal working example. – Marco Daniel Sep 7 '11 at 15:15
You should use \MyLine instead of \line as I believe that is already defined elsewhere. – Peter Grill Sep 7 '11 at 15:26
Yes, in fact, i work in french, so I use \ligne and not \line – Maïeul Sep 8 '11 at 15:58
up vote 4 down vote accepted

I think you need to make the definition of \produit global. Otherwise it goes out of existence when you move into another table cell.

    \fpMul{\temp}{#1}{#2}\global\edef\produit{\temp}% Calcul                    
    \produit&%seeing result                                                     
    \produit%seeing result on a other cell                                      
share|improve this answer
Instead of \global\edef you could simply use \xdef. – mhp Sep 7 '11 at 15:37
the problem is that I have one value of produit by line. So I can't have an unique value – Maïeul Sep 8 '11 at 9:16
@Maieul --- That doesn't matter. \edef (or \xdef as @mhp suggests) will overwrite any old value that exists. – Ian Thompson Sep 8 '11 at 11:00
@lan Thompson : thank ! I did'nt know the \edef command :) – Maïeul Sep 8 '11 at 15:57
@Maieul: if this answers your question, you can select it. – ℝaphink Sep 10 '11 at 6:54

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.