Hi Thomas,

thanks for your explanations! The point of my question was: can I feed
the content of tex.dimen["textwidth"] directly back to TeX, and the
answer to this appears to be "no"; you need to add some unit to it
(otherwise, you get an error message). Which was a bit confusing to me
at first, because the name tex.dimen implies that it holds a "real"
dimension, like \newdim does.

Just switch to philosopher mode for a while and ask yourself what implications that would have in the rather fuzzy world of printing.

What is a 'real' dimension? What we call points (pt) is in other application also called points but happens to be basepoints in our universe (bp). Also, imagine that in good american tradition the dimension would have been inches while we all moved on to meters ...

So, Knuth foresaw this (and also wanted predictable calculations and wanted to avoid unportable floating points) so he came up with his own unit: scaled points. So, a \dimen is just a \count but consider it tagged to show you pt for convenience when printed (\the) and the parser permits you to enter these numbers as pt/bp/dd/cc/cm/mm etc.

At the lua end all are just integers (with some limited size but that might change as Taco and I want to play a bit with adding a couple of bytes and see to what extent that will break things).

In metapost the internal unit is bp (because it targets at postscript) and there cm, mm etc are just variables that one multiplies with so there you can change the universe by just saying "in := cm".

Skips are another story (not to speak of boxes as we do have a dimendef but not a boxdef of inserts which are yet another class of animals).

Hans


-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
    tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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