ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
Subject: Re: TeX trigger in MP macro
Date: Fri, 04 Aug 2006 01:01:06 +0200	[thread overview]
Message-ID: <44D28032.4010902@wxs.nl> (raw)
In-Reply-To: <44D1EC33.9030203@gmx.net>

Peter Rolf wrote:
> Hi all,
>
> Currently I am using
>
> \startuniqueMPgraphic{foo}
>   ...
>   if (\DbgFill=0) :
>     fill whatever
>   fi
>   ...
> \stopuniqueMPgraphic
>
> in my MP graphics. \DbgFill (0|1) is just a trigger, which prevents
> filling in case of visual debugging. Instead of always writing this
> 'long' form, it should be possible to use a self written mp-macro
> instead. But my naive approach
>
> def dbg_fill (expr p) =
>   if (\DbgFill=0) :
>     fill p ;
>   fi
> enddef ;
>
> doesn't work. I get
>
>   
>>> DbgFill
>>>       
> ! Unknown relation will be considered false.
>
>
> How do I realize this trigger inside pure MP code and set it outside in
> TeX? The trigger should be global and can change during runtime. Any
> help is welcome.
>   
can you make a test file? 

Hans 

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

  reply	other threads:[~2006-08-03 23:01 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-03 12:29 Peter Rolf
2006-08-03 23:01 ` Hans Hagen [this message]
2006-08-04 10:57   ` Peter Rolf
2006-08-04 11:14     ` Taco Hoekwater
2006-08-04 11:17       ` Taco Hoekwater
2006-08-04 12:27         ` Peter Rolf
2006-08-04 12:42           ` Taco Hoekwater
2006-08-04 13:04             ` Peter Rolf
2006-08-04 14:26         ` Peter Rolf
2006-08-04 14:42           ` stange error in Live ConTeXt Taco Hoekwater
2006-08-04 16:22             ` Peter Rolf
2006-09-06 18:54             ` Patrick Gundlach

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=44D28032.4010902@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).