From: Sanjoy Mahajan <sanjoy@mrao.cam.ac.uk>
Subject: figure directory is sort of searched
Date: Sat, 20 May 2006 01:07:29 -0400 [thread overview]
Message-ID: <E1FhJgX-0004wl-4q@approximate.corpus.cam.ac.uk> (raw)
[-- Attachment #1: Type: text/plain, Size: 1765 bytes --]
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:
\starttext
\setupexternalfigures[directory={1}]
\placefigure[here][ch1fig]{should be 1/fig-1.pdf}{\externalfigure[fig-1.pdf]}
\setupexternalfigures[directory={2}]
\placefigure[here][ch2fig1]{should be 2/fig-1.pdf}{\externalfigure[fig-1.pdf]}
\placefigure[here][ch2fig2]{should be 2/fig-2.pdf}{\externalfigure[fig-2.pdf]}
\stoptext
Probably it's a silly idea to use \setupexternalfigures within the body,
but the same problem happens when using components (where each
component's preamble has a similar line), where it makes more sense.
Here is the directory structure (all the files are attached as a .tgz):
min.tex
1/fig-1.pdf
2/fig-1.pdf
2/fig-2.pdf
The final (third) figure is correctly found as 2/fig-2.pdf. But the
second figure is reused from 1/fig-1.pdf because another fig-1.pdf has
already been found: as 1/fig-1.pdf. Here is the relevant bit from the
texexec output:
<./1/fig-1.pdf>
figures : dimensions of 1/fig-1.pdf loaded from figurefile itself
(./min.tuo) (/home/sanjoy/texmf/tex/context/base/pdfr-ec.tex)
floatblocks : 1 placed
figures : figureobject fig-1.pdf is reused <===== The problem??
floatblocks : 2 placed
<./2/fig-2.pdf>
figures : dimensions of 2/fig-2.pdf loaded from figurefile itself
floatblocks : 3 placed
One part of ConTeXt does know the right figure path. A
\getfiguredimensions[fig-1.pdf] after the second \placefigure will
trigger a kpathsea search for 2/fig-1.pdf, which it finds. But it still
loads 1/fig-1.pdf, which is why I've said 'sort of searched' in the
subject line.
-Sanjoy
[-- Attachment #2: test files --]
[-- Type: application/x-gtar, Size: 15220 bytes --]
[-- Attachment #3: Type: text/plain, Size: 139 bytes --]
_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context
next reply other threads:[~2006-05-20 5:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-20 5:07 Sanjoy Mahajan [this message]
2006-05-23 17:21 ` Sanjoy Mahajan
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
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=E1FhJgX-0004wl-4q@approximate.corpus.cam.ac.uk \
--to=sanjoy@mrao.cam.ac.uk \
--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).