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>
Cc: Mojca Miklavec <mojca.miklavec.lists@gmail.com>
Subject: Re: Ugly bug with TikZ in recent ConTeXt MKIV
Date: Thu, 18 Nov 2010 18:32:32 +0100	[thread overview]
Message-ID: <4CE56330.9030308@wxs.nl> (raw)
In-Reply-To: <AANLkTimRBV6gVOLWasHYfnOHqUrowRD=10vdV46oOtAN@mail.gmail.com>

On 18-11-2010 5:56, Vedran Miletić wrote:
> 2010/11/18 Hans Hagen<pragma@wxs.nl>
>
>> After some tracing and hard thinking Taco and I found interesting spaces
>> showing up in the output that result from a kludge in tikz:
>>
>> Normally one will use \ignorespaces to catch spurious spaces but tikz
>> invokes \nullfont assuming that its fontdimen 2 is zero. But, in context it
>> no longer is (prelude to delayed font loading).
>>
>> You can put this in cont-new.mkiv as a temporary hack
>>
>> \let\normalnullfont\nullfont
>>
>> \def\nullfont
>>   {\fontdimen1\normalnullfont\zeropoint
>>    \fontdimen2\normalnullfont\zeropoint
>>    \fontdimen3\normalnullfont\zeropoint
>>    \fontdimen4\normalnullfont\zeropoint
>>    \fontdimen5\normalnullfont\zeropoint
>>    \fontdimen6\normalnullfont\zeropoint
>>    \fontdimen7\normalnullfont\zeropoint
>>    \normalnullfont}
>>
>>
> Perhaps this should be forwared to Christian Feuersaenger. He is very open
> to bug reports and will probably be willing to fix it in some way in TikZ.

feel free to do so; probably something like this is needed:

\def\pushnullfont
   {\edef\popnullfont
      {\fontdimen2\nullfont\the\fontdimen2\nullfont
       \fontdimen3\nullfont\the\fontdimen3\nullfont
       \fontdimen4\nullfont\the\fontdimen4\nullfont}%
    \fontdimen2\nullfont 0pt\relax
    \fontdimen3\nullfont 0pt\relax
    \fontdimen4\nullfont 0pt\relax}

\pushnullfont
....
\popnullfont

as fontdimens are assigned global.

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	other threads:[~2010-11-18 17:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-17 23:00 Mojca Miklavec
2010-11-18  8:25 ` Alan BRASLAU
2010-11-18  8:48 ` Hans Hagen
2010-11-18  9:03   ` Mojca Miklavec
2010-11-18  9:49     ` Hans Hagen
2010-11-18 16:56       ` Vedran Miletić
2010-11-18 17:32         ` Hans Hagen [this message]
2010-11-18 10:39     ` Hans Hagen
2010-11-18 13:06       ` Mojca Miklavec

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=4CE56330.9030308@wxs.nl \
    --to=pragma@wxs.nl \
    --cc=mojca.miklavec.lists@gmail.com \
    --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).