ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Getting closer
@ 1999-06-02 20:51 David Arnold
  1999-06-02 22:16 ` Hans Hagen
  0 siblings, 1 reply; 3+ messages in thread
From: David Arnold @ 1999-06-02 20:51 UTC (permalink / raw)


All,

This works pretty well. Still, I don't feel like I am doing this correctly.
More advice needed. 

I can resize the graphics in Metapost, but how would I scale and resize in
Context one the graphics are already drawn?

% interface=en output=pdf

\starttext

\setuppapersize[S6][S6]

\setupbodyfont[pos,14.4pt]

\setupcolors[state=start]

\setupinteraction[state=start]

There is a \gotobox {\tooltip {last page} {indeed, klicking here
will bring you to the last page}} [nextpage] too in this document.

\MPinclusions{input mp-tool}

\startMPgraphic
 path squares[];
 numeric side;
 side=8cm;
 squares0=unitsquare scaled side;
 draw squares0;
 y1=0;x2=side;
 x1=side/25;y2=x1;
 d=angle(z2-z1);
 r=abs(z2-z1)/side;
 for i:=1 upto 80:
 squares[i]:=squares[i-1] shifted (-side/2,-side/2)
 rotated d scaled r shifted (side/2,side/2);
 draw squares[i] withcolor (i/100)[blue,green];
 endfor
\stopMPgraphic

\loadcurrentMPgraphic{setups}

\placefigure
 [][fig1]
 {My metapost graphic.}
 {\placeMPgraphic}

\page

>From this it follows that there is also a \gotobox {\tooltip
{first page} {this button lets you go to the first page}}
[firstpage].

\stoptext


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

* Re: Getting closer
  1999-06-02 20:51 Getting closer David Arnold
@ 1999-06-02 22:16 ` Hans Hagen
  0 siblings, 0 replies; 3+ messages in thread
From: Hans Hagen @ 1999-06-02 22:16 UTC (permalink / raw)
  Cc: ntg-context

David Arnold wrote:

> I can resize the graphics in Metapost, but how would I scale and resize in
> Context one the graphics are already drawn?

Hm. The graphics you're refering too concern backgound and graphics
generated with the right dimensions. You can reuse them by putting them
in a buffer: 

\starttext

\startbuffer[hans]
  \startuseMPgraphic{dummy}
    fill unitsquare scaled 100 withcolor red ;
  \stopuseMPgraphic
  \useMPgraphic{dummy}
\stopbuffer

\externalfigure[hans.tmp][width=3cm]
\externalfigure[hans.tmp][width=2cm]
\externalfigure[hans.tmp][width=1cm]

\useexternalfigure[bighans][hans.tmp][width=3cm]
\useexternalfigure[medhans][hans.tmp][width=4cm]

\placefigure{One}{\externalfigure[bighans]}
\placefigure{Two}{\externalfigure[medhans]}

\stoptext

Actually, this can be done with tables and text too! Using reusable
graphic is sort of redundant here. 

Normally graphics are external. In that case you make a MP graphic
(separate file) and just include it with: 

\externalfigure[something.2][width=4cm]

given that beginfig(2) etc is used. 

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


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

* getting closer
@ 2000-01-11 19:58 Johannes Hüsing
  0 siblings, 0 replies; 3+ messages in thread
From: Johannes Hüsing @ 2000-01-11 19:58 UTC (permalink / raw)


Hi,

browsing through older mails I blushingly recall that I have asked
those kind of questions before, when I tried to install ConTeXt the
first time. This time Berend's answer to Denis helped me out: renaming
the "cont-??.ini" to "cont-??.tex" in the fmtutil config file helped at
least texexec --make not exit with an error. Running texexec on a
sample ConTeXt file doesn't succeed yet, as sh wouldn't find "cont-en".
Indeed, on my first installation, some binaries reside in /usr/bin. Now
how do I build these binaries again... 

Thanks for help

Johannes
--
Johannes Hüsing <hannes@ruhrau.de> 
[Sydney Organising Committee for the Olympic Games] spokesman Milton Cockburn 
said the organisation had expert advice that [making online live results 
accessible to the blind] would cost $2 million and take more than a year.


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

end of thread, other threads:[~2000-01-11 19:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-06-02 20:51 Getting closer David Arnold
1999-06-02 22:16 ` Hans Hagen
2000-01-11 19:58 getting closer Johannes Hüsing

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