I've got a problem with Pascal triangle example at Paul Gaborit's solution.

When I compile it with one of my personal class file, it compiles OK. But when I compile it with another class, using the same options for tikz libraries, I get an error on the line


The triangle is produced, as well as the rest of the document, but I get an error message :

./cours_denombrement.tex:810: Missing = inserted for \ifnum.
l.810 \end{document}

./cours_denombrement.tex:810: Missing number, treated as zero.
<to be read again> 
l.810 \end{document}

I think it has something to do with the interaction with another package, so I'm gonna investigate on my class file, but maybe someone has an idea about what is going on ?

Thanks for any help.


  • 2
    I can compile it without problems when using pdflatex. Which compiler do you use? Does replacing that line by \xdef\value{\value} help?
    – user121799
    Nov 17, 2018 at 16:28
  • It gives a different error message : "Use of \value doesn't match its definition.". I use pdflatex too, and the most recent TeXLive. What I don't understand is that if I use a different class, the code compiles OK... Nov 17, 2018 at 16:59
  • 1
    When you are saying "a differen class": which classes work and which don't? Notice that \value in this code is just a placeholder, you could replace all \values by \myvalue, then. (It is arguably even a bit unfortunate that \value is used here as this is a standard command that can be used to e.g. get the value of a counter, so \myvalue is probably even cleaner.)
    – user121799
    Nov 17, 2018 at 17:26
  • Your last "intuition" did the trick : replacing "value" by another name gave no error. I suppose I have some package loaded by my "courses" class that uses this name. Nov 17, 2018 at 18:02
  • Glad to hear. What should we do now? I could write an answer because I actually do not think this is your fault, or one of us leaves a comment under the linked answer, hoping that \value gets replaced by something less dangerous. What do you think?
    – user121799
    Nov 17, 2018 at 18:10


You must log in to answer this question.

Browse other questions tagged .