At 12:30 PM 9/5/2001 +0200, Eckhart Guth�hrlein wrote:
>I want to use a comma as the decimal sign, and I want to get rid of the
>extra space after the comma in math mode. Of course, I could say $1{,}1$
>but I don't want to type this each time. With latex, I used
>
>\mathchardef\CommaOrdinary="013B
>\mathchardef\CommaPunct ="613B
>\mathcode`,="8000
>{\catcode`\,=\active
> \gdef ,{\obeyspaces\futurelet\next\CommaCheck}}
>\def\CommaCheck{\if\space\next\CommaPunct\else\CommaOrdinary\fi}
>
>(taken from the dante faq) to be able to type $1,1$ for decimal numbers as
>well as $f(x, y)$ with the comma separating elements of a list. An attempt
>to use this in context led to
>
>! Missing number, treated as zero.
><to be read again>
> \def
>\handlecompoundcharacter #1->\def
> \dohandlecompoundcharacter {\ifx \next
> \bg...
>l.7 \mathchardef\CommaOrdinary="
> 013B
>?
>
>probably due to the use of " for shorthands. I got around this by
>converting the hex numbers to base 10, leading to a working soluting if
>the definitions are at the end of my environment file (i.e. after font
>setups). Furthermore, I would like to include the code in my cont-sys.tex,
>but this has no effect at all (because this file is read in first?).
the " is indeed spoiling your little game; normally such def's take place
in files, so you can fake a file:
\startreadingfile
your defs using "
\stopreadingfile
will work. I think that the \obeyspaces is useless here. Also, you may
consider
\definemathsymbol [mathcomma] [ord] [mi] ["3B]
\definemathsymbol [textcomma] [punct] [mi] ["3B]
and use \mathcomma and \textcomma instead of the latex names.
Of course
\definemathpunctuation , mathcomma textcomma
is nicer so i will make that one later,
Hans
-------------------------------------------------------------------------
Hans Hagen | PRAGMA ADE | [EMAIL PROTECTED]
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------