ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Mojca Miklavec <mojca.miklavec.lists@gmail.com>
Cc: andrea valle <andrea.valle@unito.it>
Subject: Re: importing figures in metapost
Date: Mon, 13 Jun 2005 19:00:09 +0200	[thread overview]
Message-ID: <42ADBB99.3030804@gmail.com> (raw)
In-Reply-To: <5cb206ae0906c2ecc362adec9d49c24a@di.unito.it>

andrea valle wrote:
> Thanks Mojca,
> (I put again the discussion on the list)
> 
>> andrea valle wrote:
> It seems to me that this:

Btw: take a look at the thread "MetaFun questions" in ConTeXt archive 
and at the command naturalfigure(expr name) defined in mp-figs.mp.

> externalfigure "mptext.pdf"
>     xyscaled (10cm, 8cm);
> 
> and
> 
> externalfigure "mptext.pdf"
>     xyscaled (10cm, 8cm)
>     shifted (3cm, 6cm);
> 
> ...have the same results.

Of course they do. Metapost is clever enough to calculate the proper 
bounding box. If you "draw origin" or "draw origin shifted 
anypointyoucanthinkof" and if that is the only thing you draw, than both 
figures will be identical.

If you would like the figure to be different, you can set the bounding 
box explicitely with:

setbounds currentpicture to unitsquare xyscaled ... shifted ...;

If you want your graphic to appear somewhere else on the page than you 
have to handle that with plain TeX/ConTeXt commands to achieve the 
desired placing ... or using layers in MetaFun.

> So, how do I know all the options I can use? Simply I can't?

The command externalfigure in MetaFun has no additional 
options/parameters. The best place to learn metafont/post/fun is:
- take The METAPOSTBook in a library (not necessary)
- metapost manual: http://www.tug.org/tutorials/mp/mpman.pdf
- MetaFun manual: http://www.pragma-ade.com/general/manuals/metafun-s.pdf
- sources: go to http://source.contextgarden.net/ and search for 
externalfigure for example

I usually use the metapost and metafun manual and simply the search 
function in Adobe Acrobat fo find what I'm looking for. Reading the 
whole metafun manual is no bad idea anyway.

If you're looking for ConTeXt documentation: well, yes, than you start 
reading one manual after another, keep looking into the source code and 
search through the mailing list archive & contribute to Wiki. I'm 
affraid there's no other way for the moment.

Mojca

  reply	other threads:[~2005-06-13 17:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-11 14:52 andrea valle
2005-06-12 15:50 ` Mojca Miklavec
     [not found]   ` <b8288e98f6a2750159050409b84b09f0@unito.it>
     [not found]     ` <42ADA01B.4010604@gmail.com>
2005-06-13 15:52       ` andrea valle
2005-06-13 15:56       ` andrea valle
2005-06-13 17:00         ` Mojca Miklavec [this message]
2005-06-13 17:20         ` Taco Hoekwater
2005-06-13 19:35           ` andrea valle
2005-06-14  3:04   ` h h extern

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=42ADBB99.3030804@gmail.com \
    --to=mojca.miklavec.lists@gmail.com \
    --cc=andrea.valle@unito.it \
    --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).