A question on drawing functions in MetaFun
I tried to generate "Figure 9.2 An example of a graphic with labels along the axes." in metafun-p.pdf (p.209), but could get only graphics without labels. I used the codes in the page 208 as follows (see the attached file) \startMPpage StartPage ; ... codes in p.208 here ... StopPage ; \stopMPpage In this case, the generated MPS file (ch93-1-mpgraph.1) had the bounding box (0, 0, 420, 596). When I used \startuseMPgraphic instead of \startMPpage, the generated MPS file had the different bounding box (-47, -17, 300, 575), and I could see the right one. Please tell me what I missed. Best, ChoF. ~~~~~~~~~~~~~~~~~~~~~~~~~ *** | Cho, Jin-Hwan == ChoF | ^ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ o | Dept. of Mathematics | --- | The University of Suwon | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | Korean TeX Users Group | | | http://www.ktug.or.kr | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | chofchof@ktug.or.kr | *** ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Jin-Hwan Cho wrote:
\startMPpage StartPage ; ... codes in p.208 here ... StopPage ; \stopMPpage
In this case, the generated MPS file (ch93-1-mpgraph.1) had the bounding box (0, 0, 420, 596).
When I used \startuseMPgraphic instead of \startMPpage, the generated MPS file had the different bounding box (-47, -17, 300, 575), and I could see the right one.
StartPage .. StopPage will make a graphic as large as the current page; dimensions are passed by context to mp, but this happens before the graphic is drawn; so, the graphic becomes (default) a4. just omit the StartPage .. StopPage (the inner ones) 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 -----------------------------------------------------------------
On Aug 11, 2005, at 8:26 AM, Hans Hagen wrote:
StartPage .. StopPage will make a graphic as large as the current page; dimensions are passed by context to mp, but this happens before the graphic is drawn; so, the graphic becomes (default) a4. just omit the StartPage .. StopPage (the inner ones)
Got it. Thanks a lot. Could you tell me the answer of my previous posting on Aug 11, about \Shaped definition? Best, ChoF.
Jin-Hwan Cho wrote:
On Aug 11, 2005, at 8:26 AM, Hans Hagen wrote:
StartPage .. StopPage will make a graphic as large as the current page; dimensions are passed by context to mp, but this happens before the graphic is drawn; so, the graphic becomes (default) a4. just omit the StartPage .. StopPage (the inner ones)
Got it. Thanks a lot. Could you tell me the answer of my previous posting on Aug 11, about \Shaped definition?
Try to play with \defineframed[Shaped][...=...] \Shaped{...} vit
On Aug 12, 2005, at 7:15 PM, Vit Zyka wrote:
\defineframed[Shaped][...=...]
Thanks. However what I wanted to know was the definition of \Shaped which generates the second figure in p.145 of metafun-p.pdf (the oval shape in the second line went to under the first oval). Best, ChoF.
Jin-Hwan Cho wrote:
On Aug 12, 2005, at 7:15 PM, Vit Zyka wrote:
\defineframed[Shaped][...=...]
Thanks. However what I wanted to know was the definition of \Shaped which generates the second figure in p.145 of metafun-p.pdf (the oval shape in the second line went to under the first oval).
\startbuffer[def] \defineframed[Shaped][background=Shape,frame=off,location=low] \stopbuffer \getbuffer[def] We can now put this background shape behind the running text, for instance with: \startbuffer .... some \inframed[background=Shape]{text} with a frame ... .... some \Shaped{text} with a frame ... \stopbuffer \typebuffer \startlines \getbuffer \stoplines The \type {\Shaped} macro was defined as: \typebuffer[def]
this last line had no [def] so the wrong buffer was shown; it's indeed defined by \defineframed[Shapes]
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 -----------------------------------------------------------------
On Aug 13, 2005, at 1:10 AM, Hans Hagen wrote:
\defineframed[Shaped][background=Shape,frame=off,location=low]
Thanks. Still I could not get the right figure with \setuplayer[BackLayer][direction=reverse] Even though "direction=reverse" option was given, I got only the first figure. Means that the option did not work. Hope anyone fix my problem by checking the attached sample. Best, ChoF.
Jin-Hwan Cho wrote:
On Aug 13, 2005, at 1:10 AM, Hans Hagen wrote:
\defineframed[Shaped][background=Shape,frame=off,location=low]
Thanks. Still I could not get the right figure with
\setuplayer[BackLayer][direction=reverse]
Even though "direction=reverse" option was given, I got only the first
Ou, now I understand. I got exactly the same result as you. Seems 'direction' is ommited. The only relevant occurence in the source is in the core-lyr.tex, but sorry, I have no solution. vit
figure. Means that the option did not work. Hope anyone fix my problem by checking the attached sample.
Best, ChoF.
Vit Zyka wrote:
Jin-Hwan Cho wrote:
On Aug 13, 2005, at 1:10 AM, Hans Hagen wrote:
\defineframed[Shaped][background=Shape,frame=off,location=low]
Thanks. Still I could not get the right figure with
\setuplayer[BackLayer][direction=reverse]
Even though "direction=reverse" option was given, I got only the first
Ou, now I understand. I got exactly the same result as you. Seems 'direction' is ommited. The only relevant occurence in the source is in the core-lyr.tex, but sorry, I have no solution.
i'll have a look at it 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 -----------------------------------------------------------------
Jin-Hwan Cho wrote:
On Aug 13, 2005, at 1:10 AM, Hans Hagen wrote:
\defineframed[Shaped][background=Shape,frame=off,location=low]
Thanks. Still I could not get the right figure with
\setuplayer[BackLayer][direction=reverse]
Even though "direction=reverse" option was given, I got only the first figure. Means that the option did not work. Hope anyone fix my problem by checking the attached sample.
it took me a while to uncover but ... in page-lyr, \doifnotvalue{\layerparameter\c!direction}\v!reverse{\box\layerpagebox}% should be \doifnot{\layerparameter\c!direction}\v!reverse{\box\layerpagebox}% (bug introduced when \layerparameter was added) 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 -----------------------------------------------------------------
participants (3)
-
Hans Hagen
-
Jin-Hwan Cho
-
Vit Zyka