ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: \showmathcharacters problems with TeXlive 2009 on Win 7 64bit
Date: Wed, 10 Feb 2010 18:40:12 +0100	[thread overview]
Message-ID: <4B72EF7C.60604@wxs.nl> (raw)
In-Reply-To: <4B72D8EF.1020202@googlemail.com>

[-- Attachment #1: Type: text/plain, Size: 1016 bytes --]

On 10-2-2010 17:03, commb07@googlemail.com wrote:
> \mainlanguage[de]
> \enableregime[windows]
> \setuplayout[backspace=1cm, rightmargin=0.58cm, width=fit, topspace=1cm,
> header=1cm, footer=1cm, height=fit]
>
> \starttext
>
> \showmathcharacters
>
> \stoptext

ok, this was the problem:

the math definition files are read and then the column width is 
calculated which is used in a second read

as the files to be used now have the mkii suffix, no file is read and we 
end up with 24 columns which is too much for tex's calculations

I now intercept that as well as fixedthe loading (to use mkii files)

Hans

-- 

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------

[-- Attachment #2: math-run.mkii --]
[-- Type: text/plain, Size: 4110 bytes --]

%D \module
%D   [     file=math-run,
%D      version=2001.23.04,
%D        title=\CONTEXT\ Math Macros,
%D     subtitle=Runtime Macros,
%D       author=Hans Hagen,
%D         date=\currentdate,
%D    copyright=Hans Hagen \& Ton Otten]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.

\writestatus{loading}{ConTeXt Math Macros / Runtime Macros}

\unprotect

\ifx\showmathmodern\undefined \global\chardef\showmathmodern\zerocount \fi

\gdef\showmathcharacters% nearly \showcharacters
  {\par
   \bgroup
   \ifcase\showmathmodern\or\ifx\modern\undefined\chardef\showmathmodern\zerocount\fi\fi
   \setuptextrules[\c!bodyfont=,\c!style=]
   \starttextrule{math characters -- \currentmathcollection}
   \whitespace
   \dontcomplain
   \forgetall
   \def\startmathcollection[##1]{}
   \let\stopmathcollection\relax
   \dimen0\zeropoint
   \dimen2\zeropoint
   \def\definemathsymbol   {\dosixtupleempty\dodefinemathsymbol}
   \def\definemathcharacter{\dosixtupleempty\dodefinemathcharacter}
   \def\definemathcommand  {\dotripleempty  \dodefinemathcommand}
   %\newcounter\mathcolor
   \def\dodefinemathsymbol[##1][##2][##3][##4][##5][##6]%
     {%\doifcolorelse{math \purefamilyhex{##3}}{}
      %  {\increment\mathcolor
      %   \definecolor[math \purefamilyhex{##3}][\mathcolor]}%
      \setbox0\hbox spread 1em{\mathematics{\getvalue{##1}{}{}{}}}%
      \ifdim\wd0>\dimen0 \dimen0=\wd0 \fi
      \setbox2\hbox spread 1em{\hbox to 1em{\tttf\purefamilyhex{##3}\hss}\box0 ##1}%
      \ifdim\wd2>\dimen2 \dimen2=\wd2 \fi}
   \def\dodefinemathcharacter[##1][##2][##3][##4][##5][##6]{}
   \def\dodefinemathcommand  [##1][##2][##3]##4{}
   \readsysfile{\f!mathprefix tex.mkii}\!!doneatrue\!!doneafalse
   \readsysfile{\f!mathprefix ams.mkii}\!!donebtrue\!!donebfalse
   \if!!donea
     \if!!doneb
       \edef\encwidth{\the\dimen0}
       \dimen0=\hsize
       \advance\dimen0 2em
       \advance\dimen2 2em
       \ifcase\showmathmodern\or\advance\dimen2 4em\fi
       \divide \dimen0 by \dimen2 \advance\dimen0 1sp
       \edef\enccols{\number\dimen0}
       \startcolumns[\c!n=\enccols,\c!distance=2em]
       \def\dodefinemathsymbol[##1][##2][##3][##4][##5][##6]%
         {%\localcolortrue
          %\color
          %  [math \purefamilyhex{##3}]
             {\hbox
                {\ifcase\showmathmodern\or
                   \hbox to \encwidth{\modern\let\mathcollection\nomathcollection\mathematics{\getvalue{##1}{}{}{}}\hss}%
                 \fi
                 \hbox to \encwidth{\mathematics{\getvalue{##1}{}{}{}}\hss}%
                 \hbox to 1em{\tttf\purefamilyhex{##3}\hss}##1}\par}}
       \readsysfile{\f!mathprefix tex.mkii}\donothing\donothing
       \readsysfile{\f!mathprefix ams.mkii}\donothing\donothing
       \stopcolumns
     \else
       \par \tttf no chars in \f!mathprefix ams\par
     \fi
   \else
     \par \tttf no chars in \f!mathprefix tex\par
   \fi
   \stoptextrule
   \egroup}

% \definecolor[math \purefamilyhex{mr}] [darkred]
% \definecolor[math \purefamilyhex{mi}] [darkgreen]
% \definecolor[math \purefamilyhex{sy}] [darkblue]
% \definecolor[math \purefamilyhex{ex}] [darkmagenta]
% \definecolor[math \purefamilyhex{nn}] [darkyellow]
% \definecolor[math \purefamilyhex{ma}] [lightred]
% \definecolor[math \purefamilyhex{mb}] [lightgreen]
% \definecolor[math \purefamilyhex{mc}] [lightblue]
% \definecolor[math \purefamilyhex{md}] [lightmagenta]

\gdef\showmathtoken#1%
  {\starttabulate[|lT|lT|lT|l|]
   \NC token         \NC #1 \NC \NR
   \NC collection    \NC \ifcsname\@mt@\mathcollection#1\endcsname
                           \mathcollection
                         \else\ifcsname\@mt@\nomathcollection#1\endcsname
                           \nomathcollection
                         \else
                           ?%
                         \fi\fi \NC \NR
   \NC visualization \NC \mathematics{\getvalue{#1}} \NC \NR
   \NC definition    \NC \tttf \@EA\defconvertedcommand\@EA\ascii\csname\@mt@\mathcollection#1\endcsname \ascii \NC \NR
   \stoptabulate}

\protect \endinput

[-- Attachment #3: Type: text/plain, Size: 486 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2010-02-10 17:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-09 20:03 commb07
2010-02-09 22:15 ` Hans Hagen
2010-02-10 13:10   ` commb07
2010-02-10 14:47   ` commb07
2010-02-10 15:41     ` Hans Hagen
2010-02-10 16:03       ` commb07
2010-02-10 17:40         ` Hans Hagen [this message]
2010-02-10 17:49           ` commb07
2010-02-10 17:41         ` Hans Hagen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B72EF7C.60604@wxs.nl \
    --to=pragma@wxs.nl \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).