ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* UniqueMPgraphic and empty lines
@ 2001-10-02 12:19 Patrick Gundlach
  2001-10-02 12:58 ` Taco Hoekwater
  0 siblings, 1 reply; 5+ messages in thread
From: Patrick Gundlach @ 2001-10-02 12:19 UTC (permalink / raw)


Hi,

is it a bug or a feature?
-------------------------------------------
\defineoverlay[myhead][\uniqueMPgraphic{mphead}]
\startuniqueMPgraphic{mphead}
w := \overlaywidth;
h := \overlayheight;
path p;
p:=  (0,.1w){left} .. {right}(0,0) .. (.5w,.2h) .. (w,0){right}
     .. {left}(w,.1w);
%
draw p shifted (0,.1h);
draw p reflectedabout ((-infinity,0),(infinity,0));
draw boundingbox currentpicture;
\stopuniqueMPgraphic

\starttext

\framed[background=myhead]{BlaBlaBlubb}

\stoptext
-----------------------------------------------

If I remove the % sign, texexec gives me an error (runaway 
argument).

By redifining 
\def\handleuniqueMPgraphic#1#2#3%
[...]

to 
\long\def\handleuniqueMP.....

it works ok. But I do not know if that has any side effects.

Viele Grüße,

  Patrick Gundlach

- I TeX, therefore I am -


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: UniqueMPgraphic and empty lines
  2001-10-02 12:19 UniqueMPgraphic and empty lines Patrick Gundlach
@ 2001-10-02 12:58 ` Taco Hoekwater
  2001-10-02 13:10   ` Hans Hagen
  2001-10-02 13:21   ` Berend de Boer
  0 siblings, 2 replies; 5+ messages in thread
From: Taco Hoekwater @ 2001-10-02 12:58 UTC (permalink / raw)
  Cc: ntg-context

Hi all,

Actually, I'd be happy if we could change the primitive meaning of \def to 

\def\def{\long\def} 

And likewise redefinede \outer as a no-op 
\def\outer{}

Unf, it is not safe to do this in good old tex (expansion problems), but it
could
be done in etex ...

Patrick Gundlach wrote:
> 
> Hi,
> 
> is it a bug or a feature?
> -------------------------------------------
> \defineoverlay[myhead][\uniqueMPgraphic{mphead}]
> \startuniqueMPgraphic{mphead}
> w := \overlaywidth;
> h := \overlayheight;
> path p;
> p:=  (0,.1w){left} .. {right}(0,0) .. (.5w,.2h) .. (w,0){right}
>      .. {left}(w,.1w);
> %
> draw p shifted (0,.1h);
> draw p reflectedabout ((-infinity,0),(infinity,0));
> draw boundingbox currentpicture;
> \stopuniqueMPgraphic
> 
> \starttext
> 
> \framed[background=myhead]{BlaBlaBlubb}
> 
> \stoptext
> -----------------------------------------------
> 
> If I remove the % sign, texexec gives me an error (runaway
> argument).
> 
> By redifining
> \def\handleuniqueMPgraphic#1#2#3%
> [...]
> 
> to
> \long\def\handleuniqueMP.....
> 
> it works ok. But I do not know if that has any side effects.
> 
> Viele Grüße,
> 
>   Patrick Gundlach
> 
> - I TeX, therefore I am -

-- 
groeten,

Taco


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: UniqueMPgraphic and empty lines
  2001-10-02 12:58 ` Taco Hoekwater
@ 2001-10-02 13:10   ` Hans Hagen
  2001-10-02 13:21   ` Berend de Boer
  1 sibling, 0 replies; 5+ messages in thread
From: Hans Hagen @ 2001-10-02 13:10 UTC (permalink / raw)
  Cc: Patrick Gundlach, ntg-context

At 02:58 PM 10/2/2001 +0200, Taco Hoekwater wrote:

>Hi all,
>
>Actually, I'd be happy if we could change the primitive meaning of \def to
>
>\def\def{\long\def}

indeed, unfortunately this will break unless maybe:

\let\normaldef\def

\unexpanded\def{\long\normaldef}

since this will not expand so often

>And likewise redefinede \outer as a no-op
>\def\outer{}

well, \outer *is* a no-op in context, even plain is loaded under that 
assumption,

Hans
-------------------------------------------------------------------------
                                   Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                       Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: UniqueMPgraphic and empty lines
  2001-10-02 12:58 ` Taco Hoekwater
  2001-10-02 13:10   ` Hans Hagen
@ 2001-10-02 13:21   ` Berend de Boer
  2001-10-02 13:29     ` Taco Hoekwater
  1 sibling, 1 reply; 5+ messages in thread
From: Berend de Boer @ 2001-10-02 13:21 UTC (permalink / raw)
  Cc: Patrick Gundlach, ntg-context

Taco Hoekwater <taco@elvenkind.com> writes:

> Actually, I'd be happy if we could change the primitive meaning of \def to 
> 
> \def\def{\long\def} 
> 
> And likewise redefinede \outer as a no-op 
> \def\outer{}

I always thought this was the default in ConTeXt already??

-- 
Groetjes,

Berend. (-:


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: UniqueMPgraphic and empty lines
  2001-10-02 13:21   ` Berend de Boer
@ 2001-10-02 13:29     ` Taco Hoekwater
  0 siblings, 0 replies; 5+ messages in thread
From: Taco Hoekwater @ 2001-10-02 13:29 UTC (permalink / raw)


Only while reading plain.tex

(but yes, there are no \outer control sequences in context)

Berend de Boer wrote:
> 
> Taco Hoekwater <taco@elvenkind.com> writes:
> 
> > Actually, I'd be happy if we could change the primitive meaning of \def to
> >
> > \def\def{\long\def}
> >
> > And likewise redefinede \outer as a no-op
> > \def\outer{}
> 
> I always thought this was the default in ConTeXt already??

-- 
groeten,

Taco


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2001-10-02 13:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-02 12:19 UniqueMPgraphic and empty lines Patrick Gundlach
2001-10-02 12:58 ` Taco Hoekwater
2001-10-02 13:10   ` Hans Hagen
2001-10-02 13:21   ` Berend de Boer
2001-10-02 13:29     ` Taco Hoekwater

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).