The manual seems wrong about this: you must use simple letters for your polynomials; but you can use a devious hack:
\documentclass{article}
\usepackage{polynom,amsmath,amssymb}
\begin{document}
\begingroup\mathcode`A=\xi
\polyset{vars=A}
\polylongdiv{A^2-1}{A-1}
\endgroup
\end{document}
Just choose an unused letter for your Greek one, et voilà.
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
\DeclareMathSymbol{\xi}{\mathord}{letters}{"18}
ultimately boils down to the primitive statement
\mathchardef\xi="0118
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.
With
\mathcode`A=<number>
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
\mathcode`A=\xi
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.
The Chalkboard font doesn't contain a full set of Greek characters, nor does it have many symbols. So you'll need to use a different font for the math parts. Probably your best bet is the AMS Euler font. See Handwritten font with math support.
By the way, when using XeLaTeX, you shouldn't load xunicode
and xltxtra
but just load fontspec
(or mathspec
). The xltxtra
package is generally no longer required unless you need the specific functionality it offers (like typesetting the XeTeX logo). The xunicode
package is loaded by fontspec
and it's best not to load it yourself.
Best Answer
I believe the unexpected ess-zett shows up because
\rm
is not a command that takes an argument but, instead, a switch: all subsequent material (until either some other font-changing command is encountered or until the current (math) environment ends) is instructed to show up in "roman" mode. It just so happens that the text-mode glyph that's in the same spot of the respective font table where\pi
would be in the math mode font table happens to be the ess-zett.Rather than using
\rm
-- which is a holdover from (Plain) TeX and is only barely supported by LaTeX -- you really should use either the\text
macro of theamsmath
package (which you're already loading anyway, it would appear) and/or create a few dedicated macros, such asand then write
which will give you the output you'd expect to get. (Aside: You should probably write "s" rather than "sec" for second...)
Addendum Better still, consider loading the siunitx package, e.g., with the instruction
(as well as, of course, the
amsmath
,eulervm
, andbookman
packages). Then you could write the expression in question asand you'd automatically get a proper "thin-space" between the numerals and the associate units.
Finally, you mention encountering some problems with
\mathbf
; that works for (Latin) letters but not for other symbols (including various Greek letters). Use\boldsymbol
for the latter symbols.