On Mon, Jun 13, 2011 at 2:15 PM, Christoph Redecker
<christoph.redec...@tu-harburg.de> wrote:
> Hi,
>
> I want to measure and typeset the lower case alphabet length. The LaTeX
> method doesn't work:
>
> \newlength{\alphabetlength}
> \settowidth{\alphabetlength}{abcdefghijklmnopqrstuvwxyz}
> \the\alphabetlength
>
> ConTeXt gives me an error saying that \newlength{...} is undefined. Is it
> undefined because ConTeXt is built around TeX and not LaTeX and \newlength
> is a LaTeX command (I do not know if it actually is)?
yes

> How can I do the same thing in ConTeXt?
plain TeX is ok, for example,
\newdimen\AlphaBet
\bgroup \setbox10=\hbox{abcdefghijklmnopqrstuvwxyz}
\global\AlphaBet=\wd10\egroup
\the\AlphaBet

Use CamelCase to avoid conflits with ConTeXt names.

There are much more at
http://wiki.contextgarden.net/Category:ConTeXt_programming
-- 
luigi
___________________________________________________________________________________
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 via email to