ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Mojca Miklavec" <mojca.miklavec.lists@gmail.com>
Subject: Re: figure directory is sort of searched
Date: Wed, 16 Aug 2006 19:02:34 +0200	[thread overview]
Message-ID: <6faad9f00608161002w28c0419bue1e40d88f87fb0c4@mail.gmail.com> (raw)
In-Reply-To: <44E183D7.1060001@elvenkind.com>

On 8/15/06, Taco Hoekwater wrote:
>
> Hi,
>
> Sanjoy Mahajan wrote:
> > I still can't figure this problem one out, from a few months ago, and it
> > happens with a recent ConTeXt (2006.08.08 21:51).  The figure searching
> > code gets confused if a file of the same basename (but in a different
> > directory) has already been loaded.  Here is a minimal min.tex to show
> > what I mean:
>
> I remember I ran into that as well (more than a year ago) and I ended
> up renaming my figures to figure1-1.pdf etc. It actually turned out
> to be easier for me, because that way I could use the figure filename
> as the reference.

While reading Taco's response something else came to my mind: here's
what I did in one of the presentations:

\startsetups award:gold
\useexternalfigure[medal][medal_gold][height=7.5cm]
\stopsetups

\startsetups award:silver
\useexternalfigure[medal][medal_silver][height=7.5cm]
\stopsetups

\startsetups award:bronze
\useexternalfigure[medal][medal_bronze][height=7.5cm]
\stopsetups

After that I just issued \setups{award:gold} at the top of "product
file" for gold medallists while using the same page layout for all the
medallists (with a simple \externalfigure[medal] which was good for
any medallist).

I guess that you could also do something like

\startsetups chapter:1
\useexternalfigure[fig-1][1/fig-1.pdf]
\useexternalfigure[fig-2][1/fig-2.pdf]
\stopsetups

\startsetups chapter:2
\useexternalfigure[fig-1][2/fig-1.pdf]
...
\stopsetups

\starttext
\setups{chapter:1}
\externalfigure[fig-1]
\externalfigure[fig-2]
\setups{chapter:2}
\externalfigure[fig-1]
\stoptext


Just out of curiosity I tried the following:

\startsetups chapter:1
	\dorecurse{10}{\useexternalfigure[fig-\recurselevel][1/fig-\recurselevel.pdf]}
\stopsetups

\startsetups chapter:2
	\dorecurse{10}{\useexternalfigure[fig-\recurselevel][2/fig-\recurselevel.pdf]}
\stopsetups

But you should ask someone else where to "expand" stuff to make it work.

Mojca

  parent reply	other threads:[~2006-08-16 17:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-15  3:50 Sanjoy Mahajan
2006-08-15  8:20 ` Taco Hoekwater
2006-08-15 17:38   ` Sanjoy Mahajan
2006-08-16 17:02   ` Mojca Miklavec [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-05-20  5:07 Sanjoy Mahajan
2006-05-23 17:21 ` Sanjoy Mahajan

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=6faad9f00608161002w28c0419bue1e40d88f87fb0c4@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).