From: Hans Hagen <pragma@wxs.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Problem with MkIV and TikZ picture remembering
Date: Sun, 08 Mar 2015 23:17:25 +0100 [thread overview]
Message-ID: <54FCCA75.4090307@wxs.nl> (raw)
In-Reply-To: <9C23D0A3-4E81-46A4-B7D0-DB9D6B9167BC@gmail.com>
On 3/8/2015 7:07 PM, Wolfgang Schuster wrote:
>
>> Am 08.03.2015 um 18:39 schrieb Hans Hagen <pragma@wxs.nl>:
>>
>> On 3/8/2015 1:04 PM, Wolfgang Schuster wrote:
>>>
>>>> Am 08.03.2015 um 12:55 schrieb Hans Hagen <pragma@wxs.nl
>>>> <mailto:pragma@wxs.nl>>:
>>>>
>>>> On 3/8/2015 12:26 PM, Wolfgang Schuster wrote:
>>>>>
>>>>>> Am 08.03.2015 um 11:11 schrieb Hans Hagen <pragma@wxs.nl
>>>>>> <mailto:pragma@wxs.nl>
>>>>>> <mailto:pragma@wxs.nl>>:
>>>>>>
>>>>>> this should help:
>>>>>>
>>>>>> \unexpanded\def\writeviatex#1#2%
>>>>>> {\ifx\normalwrite\relax\else
>>>>>> % the \detokenize makes sure we don't expand \noexpanded macros
>>>>>> \normalwrite#1{\detokenize{#2}}%
>>>>>> \fi}
>>>>>>
>>>>>> (in future version i might replace write completely)
>>>>>
>>>>> Only partially because the saved positions from \pdfsavepos are wrong.
>>>>
>>>> in what sense wrong?
>>>
>>> Content of the external file from MkIV (the entries on the first page show 0
>>> and the values on page 2 and 3 are always the same):
>>>
>>> 1:0:0
>>> 2:0:0
>>> 3:4661756:45255023
>>> 4:4661756:45255023
>>> 5:4661756:45255023
>>> 6:4661756:45255023
>>>
>>> Content of the external file from MkII (different values for the first
>>> and second position on each page):
>>>
>>> 1:6526435:46204089
>>> 2:4661756:45256000
>>> 3:6526435:46204089
>>> 4:4661756:45256000
>>> 5:6526435:46204089
>>> 6:4661756:45256000
>>
>> ypositions can differ a bit because we use different fonts and so does the interlinespace
>
> But the values for both positions should be different which isn’t the case for MkIV
> and the first page saves 0 for the x and y positions.
It's a side effect of expansion at the wrong time (where such primitives
can return wrong values but at least they return something) but
something like this works:
\def\syst_write#1#2%
{\ctxcommand{write(\number#1,\!!bs\normalunexpanded{#2}\!!es)}}
\unexpanded\def\writeviatex#1#2%
{\ifx\normalwrite\relax\else
\normalwrite#1{#2}%
\fi}
--
-----------------------------------------------------------------
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
___________________________________________________________________________________
next prev parent reply other threads:[~2015-03-08 22:17 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-03 7:23 Jörg Weger
2015-03-03 7:25 ` Jörg Weger
2015-03-03 7:54 ` Wolfgang Schuster
2015-03-03 12:38 ` Ulrike Fischer
2015-03-03 13:11 ` Mojca Miklavec
2015-03-03 13:27 ` Ulrike Fischer
2015-03-03 15:29 ` Mojca Miklavec
2015-03-03 13:51 ` Ulrike Fischer
2015-03-03 17:12 ` Aditya Mahajan
2015-03-03 19:04 ` Hans Hagen
2015-03-03 19:28 ` Aditya Mahajan
2015-03-07 12:08 ` Jörg Weger
2015-03-07 14:52 ` Hans Hagen
2015-03-07 17:30 ` Jörg Weger
2015-03-07 18:22 ` Wolfgang Schuster
2015-03-08 10:11 ` Hans Hagen
2015-03-08 11:26 ` Wolfgang Schuster
2015-03-08 11:55 ` Hans Hagen
2015-03-08 12:04 ` Wolfgang Schuster
2015-03-08 17:39 ` Hans Hagen
2015-03-08 18:07 ` Wolfgang Schuster
2015-03-08 19:04 ` Hans Hagen
2015-03-08 22:17 ` Hans Hagen [this message]
2015-03-13 13:17 ` Jörg Weger
2015-03-13 13:32 ` Wolfgang Schuster
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=54FCCA75.4090307@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).