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

The polynom style (version “2006/04/20 0.17 (CH,HA)” from texlive 2012) has to be told about which tokens represent variables. The manual has an example like this:

\polyset{vars=XYZ\xi,  % make X, Y, Z, and \xi into variables
         delims={[}{]}}% nongrowing brackets

When I try to typeset this in a minimal document


I get the following error message:

! Missing \endcsname inserted.
<to be read again> 
l.4 \polyset{vars=XYZ\xi,delims={[}{]}}

So there appears to be a problem trating greek letters as variable tokens. Can anyone suggest a way to resolve this, i.e. to actually typeset a ξ or similar greek letter as a variable in a polynom long division?

share|improve this question
up vote 6 down vote accepted

The manual seems wrong about this: you must use simple letters for your polynomials; but you can use a devious hack:




Just choose an unused letter for your Greek one, et voilà.

enter image description here

A bit of explanation is in order. When TeX is in math mode, it looks at letters (more precisely, character tokens of category 11 or 12) as math characters, which have a mathcode attached to them. Control sequences can denote a mathcode and this is the case for the Greek letters: the definition one finds in fontmath.ltx


ultimately boils down to the primitive statement


where the first digit 0 tells TeX \xi is an ordinary symbol; the second digit is the "math group" (1 corresponds to letters); the third and fourth digits tell the slot in the font where the symbol should be taken from.



we assign A a mathcode with the same specifications; actually we don't need to know what mathcode is associated to \xi, because any control sequence defined with \mathchardef can be used as a number when the syntax of TeX requires one. So with


we're saying that any A in a math formula, from that point on, will just behave like \xi. Of course this respect grouping, so all of this takes place in a group; I delimited it with \begingroup and \endgroup, { and } would be good too, but the former delimiters pose less problems than the latter in certain situations.

share|improve this answer
I would +1 this 10 times! I just spent 1 hour looking for the source of this error. Thanks! – willem Mar 6 '13 at 16:55

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.