ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Jörg Weger" <joerg.weger@web.de>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Problem with MkIV and TikZ picture remembering
Date: Sat, 07 Mar 2015 13:08:11 +0100	[thread overview]
Message-ID: <54FAEA2B.7090509@web.de> (raw)
In-Reply-To: <alpine.OSX.2.02.1503031427130.44790@nqv-znpobbx>

Thank you very much Hans and Aditya for your efforts and sorry for only 
replying now — momentarily I am writing a paper (of course typeset with 
ConTeXt :-) ) that has to get finished.

For now I have dropped the idea of using that certain type of 
illustration in the paper as your METAPOST examples are working, but I 
had forgotten to say that I need effectively two arrows from one part of 
a sentence two two others (I am trying to illustrate a linguistic 
ambiguity problem) and I did not manage to get that working starting 
from your examples. Then I need a shape other than a tight frame to 
surround the words, TikZ’ rounded rectangles were too nice for that. In 
the moment I don’t have the time to dive deeper into METAPOST which 
seems to be a mighty beast from what I see in the Metafun manual, but in 
future I shurely will.

The nice thing about TikZ are that you can use the self explaining 
commands rather intuitively (at least having some experience in Lilypond 
and now ConTeXt), that there are many different building blocks 
predefined that you can use and that there are hundreds of examples in 
the internet that you can use as starting point. So I managed to get 
some things working after a self-tought one day crash course – 
Metapost’s learnig curve seems to be a lot steeper to me. It is really a 
pity that ConTeXt mkiv does not save the node coordinates correctly as 
Wolfgang found out.

Greetings Jörg

On 03.03.2015 20:28, Aditya Mahajan wrote:
> On Tue, 3 Mar 2015, Hans Hagen wrote:
>
>> On 3/3/2015 6:12 PM, Aditya Mahajan wrote:
>>> 2. The metafun alternative is a bit inconvenient. Suppose you want to
>>> draw a bunch of such graphics (words connected by arrows). Then, you
>>> will need to ensure that node names are unique. (Is there a way to get
>>> around that?)
>>>
>> \newcounter\connectedwordcounter
>>
>> \starttexdefinition unexpanded fromword [#1]#2
>>     \expandafter\pushmacro\csname cwc>#1\endcsname % nesting hack
>>     \doglobal\increment\connectedwordcounter
>>     \setxvalue{cwc>#1}{\connectedwordcounter}%
>>     \startpositionoverlay{highlightoverlay}
>>         \setMPpositiongraphic
>>           {\getvalue{cwc>#1}>f}
>>           {highlightgraphic}
>>           {from=\getvalue{cwc>#1}>f,to=\getvalue{cwc>#1}>t}
>>     \stoppositionoverlay
>>     \hpos{\getvalue{cwc>#1}>f}{#2}%
>> \stoptexdefinition
>>
>> \starttexdefinition unexpanded toword [#1]#2
>>     \hpos{\getvalue{cwc>#1}>t}{#2}
>>     \expandafter\popmacro\csname cwc>#1\endcsname % nesting hack
>> \stoptexdefinition
>
> Thanks.
>
> Aditya
> ___________________________________________________________________________________
>
> 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
> ___________________________________________________________________________________
___________________________________________________________________________________
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:[~2015-03-07 12:08 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 [this message]
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
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=54FAEA2B.7090509@web.de \
    --to=joerg.weger@web.de \
    --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).