ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* \startMPpage ... \stopMPpage
@ 2005-12-27  5:25 David Arnold
  2005-12-27 21:02 ` Hans Hagen
  0 siblings, 1 reply; 2+ messages in thread
From: David Arnold @ 2005-12-27  5:25 UTC (permalink / raw)


Hans, Taco, et al,

There's a quote in metafun-s.pdf (page 539) that says "You can embed  
the graphic in a \startMPpage construct and process it with TEXEXEC.  
In that case you have the full MetaFun functionality available.  
Before processing the file, TEXEXEC will do a couple of checks on the  
file. It will also make sure that the auxiliary files (mpt for  
textext’s and mpo for outline fonts) are taken care of too."

I am really unsure of what this means as the code below will attest.  
Simply uncomment

% \startMPpage
%   \includeMPgraphic{EnglishRule}
% \stopMPpage

at the end and the file will not compile.

Just what can and cannot be used between a \startMPpage ...  
\stopMPpage pair? This is first introduced in metafun-s.pdf on page  
214 and wish there were more said there.


%output=pdf

\setupcolors[state=start]

\definecolor[gridlines][s=0.7]

\startMPinclusions
   color gridlines; gridlines:=\MPcolor{gridlines};
\stopMPinclusions


\starttext

\setupMPvariables
[EnglishRule]
[height=1ex,
    width=\localhsize,
    color=darkred]

\startuniqueMPgraphic{EnglishRule}{height,width,color}
numeric height; height=\MPvar{height};
x1=0;
x3=\MPvar{width};
x2=x4=.5x3;
y1=y3=0;
y2:=-y4=height/2;
fill z1..z2..z3 & z3..z4..z1 & cycle withcolor \MPvar{color};
\stopuniqueMPgraphic

\defineblank
[EnglishRule]
[medium]

\def\EnglishRule%
{\startlinecorrection[EnglishRule]
   \setlocalhsize
    \noindent \reuseMPgraphic{EnglishRule}
   \stoplinecorrection}

Why is this called an English line?
\startnarrower
   \EnglishRule
     Is it because they cannot draw a straight one? This could be ture
     after a few strong beers, but then, ow do Germans draw a line?
   \EnglishRule
\stopnarrower

\defineblank
[EnglishRule]
[big]

Why is this called an English line?
\startnarrower
   \EnglishRule
     Is it because they cannot draw a straight one? This could be ture
     after a few strong beers, but then, ow do Germans draw a line?
   \EnglishRule
\stopnarrower

% \startMPpage
%   \includeMPgraphic{EnglishRule}
% \stopMPpage

\stoptext


%%% Local Variables:
%%% mode: conTeXt-en
%%% End:

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

* Re: \startMPpage ... \stopMPpage
  2005-12-27  5:25 \startMPpage ... \stopMPpage David Arnold
@ 2005-12-27 21:02 ` Hans Hagen
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen @ 2005-12-27 21:02 UTC (permalink / raw)


David Arnold wrote:

>
> % \startMPpage
> %   \includeMPgraphic{EnglishRule}
> % \stopMPpage

you can only include a simple usable graphic, defined with 
\startuseMPgraphic; unique mp graphics are more tricky and involve

(once we have lua in tex we can find ways around this since then we can 
(1) implement some of the unique housekeeping in lua and (2) fool tex 
with hidden expansions)

Hans

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

end of thread, other threads:[~2005-12-27 21:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-27  5:25 \startMPpage ... \stopMPpage David Arnold
2005-12-27 21:02 ` Hans Hagen

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