ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Mojca Miklavec" <mojca.miklavec.lists@gmail.com>
Subject: Re: scaling reusableMPgraphic & some ConTeXt programming
Date: Tue, 25 Jul 2006 15:55:16 +0200	[thread overview]
Message-ID: <6faad9f00607250655y79e03bc5ue9a89f37bf5514c0@mail.gmail.com> (raw)
In-Reply-To: <44C48CD7.3030700@wxs.nl>

On 7/24/06, Hans Hagen wrote:
> Mojca Miklavec wrote:
> > Hello,
> >
> > the answers to these three questions are most probably one-liners, but
> > I don't know which ones ;)
> >
> > 1. How can I scale (an already defined) reusableMPgraphic? Simplified
> > example of what I currently (want to) have:
> >
> > % how should I change this definition?
> > \def\usemygraphic[#1][#2]{\reuseMPgraphic{#1}}
> > \usemygraphic[name][width=.7\textwidth]
> >
> \def\usemygraphic[#1][#2]{\scale[#2]{\reuseMPgraphic{#1}}
>
> \usempgraphic[name][width=4cm,height=5cm]
>
> \scale accepts the same scaling options as externalfigure

Thanks to both you and Taco!

> why do you need a counter

> > 3. I would like to change \usemygraphic, so that
> > \usemygraphic[othername] or \usemygraphic[othername][height=5cm] would
> > resolve to
> >     \dorecurse{2}{\useMPgraphic{gpg:othername:\recurselevel}}
> > and \usemygraphic[name][n={1,3},width=8cm] (syntax might be different
> > if necessary) to
> >     \reuseMPgraphic{gpg:name:1}
> >     \reuseMPgraphic{gpg:name:3}
> > (with proper scaling if possible).
> >
> you want all graphics?
>
> \def\usemygraphic#1%
>   {\doloop
>      {\doifMPgraphicelse{gpg:#1:\recurselevel}
>         {\reuseMPgraphic{gpg:name:\recurselevel}}
>         {\exitloop}}}
>
> or so ...

Wow! No, I don't need a counter in that case ;)

Just a little detail: Yes, I want all the graphics except if the user
provides "n={1,3}" or "n=4", then I would like to output only the ones
specified. I know that this is a trivial question, but how do I
extract the argument of "n=..." to \processcommalist on it?

And yet another short&stupid question: when does \c!something=\v!value
work? I tried to change \setupGNUPLOT[terminal=context] into
[\c!terminal=\v!context] (in \unprotect-ed area), but I get a
command-undefined error.

Thanks,
    Mojca

  reply	other threads:[~2006-07-25 13:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-23  6:14 Mojca Miklavec
2006-07-24  9:03 ` Taco Hoekwater
2006-07-24  9:03 ` Hans Hagen
2006-07-25 13:55   ` Mojca Miklavec [this message]
2006-07-25 21:51     ` Hans Hagen
2006-07-25 21:52     ` Hans Hagen
2006-07-26  7:58       ` Mojca Miklavec

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=6faad9f00607250655y79e03bc5ue9a89f37bf5514c0@mail.gmail.com \
    --to=mojca.miklavec.lists@gmail.com \
    --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).