ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Mari Voipio <mari.voipio@iki.fi>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: External figures from other folders
Date: Mon, 4 Feb 2013 18:07:23 +0200	[thread overview]
Message-ID: <CAGbDsP3US8pH=bBRGSWE9_uqD1FPXgrK6APD3TmhftfOhc0Cfw@mail.gmail.com> (raw)
In-Reply-To: <510FD433.9040405@swing.be>

On Mon, Feb 4, 2013 at 5:30 PM, Alain Delmotte <esperanto@swing.be> wrote:
>> When I worked with a master file and its translations where some
>> figures had translated text and others didn't, I dumped the translated
>> pics in the same directory with my translated tex file, while all the
>> untouched graphics could be found at the root. So when I compiled e.g.
>> the Swedish tex file, it would first look for graphics in its own
>> directory 'swedish', and only if a graphic could not be found, it
>> followed the paths set by \setupexternalfigures.
>
>
> You were compiling the Swedish tex file from the Swedish directory or from
> the master directory (where the master file was)?
> In other words: the compilation of the Swedish text was called from?? the
> master file? or the Swedish tex file itself?

Background: at that point of time I couldn't figure out about project
structures. And I drew my flow charts in CorelDraw, hadn't taught
myself that, either. :-)

NB. This is a bit simplified example of how things went, the real
thing contains more directories and subdirectories, but those are not
important to explain my idea.


What I had is a directory structure like this

PR-23
 PR-23/swedish
 PR-23/portuguese
 PR-23/spanish
 PR-23/german

It all started with a single-language project, language subdirectories
got added over time when translations turned out to be of essence.
[PR-23 is the name of the product for which the document is written.]

To illustrate the system with graphics, let's say that the main
directory PR-23 contained a flowchart called flow_troubles.pdf and a
wiring picture wrg-366.pdf.
Wiring drawings are never translated, so every manual version uses the
same graphic.
On the other hand, the flow chart needs to be translated for every
language version. I did that by copying the English original (Corel
Draw graphic) into the language folder, then translating, saving and
exporting as pdf in that (sub)directory. The result is that both e.g.
the subdirectory swedish and the main directory PR-23 would contain a
graphic called flow_troubles.pdf, but the one in the subfolder would
be in Swedish.

Then, if I needed a Swedish manual, I needed to go into subfolder
Swedish and compile the main .tex file there. At the beginning of that
file I had the command \setupexternalfigures[directory=../]. When the
compilation came to wrg-366.pdf, the graphic could not be found in the
same directory, so ConTeXt went one step up as instructed and picked
up the wiring drawing there. Later when compilation would get as far
to flow_troubles.pdf, ConTeXt would look in the working directory
'swedish', find it there and pick up that one and *stop looking for
that graphic*. Ergo, because the Swedish one could be found first, the
existence of the English version in the search path is not a problem.


This way I didn't need to change the names of my graphics nor my code.
It was also handy when translations arrived in batches; I translated
the graphics one by one and could always compile a proper looking
document, first with all graphics in English, then some in the target
language, finally fully translated - and still, if a new version of
the wiring drawing turned up, I only had to update the master
directory and then remember to compile the translations to get the
changes in.



One more thing to remember is that I really do product manuals and
they are always in fluctuation - there's no final version of the
manual until the production of that particular model has ceased. Thus
years have taught me to avoid duplicate information to utmost, because
the more places to update because of a minor change, the more likely
it is to forget at least one of them. Been there, done that...
[When I switched to ConTeXt, each manual version was a separate MS
Word document. To update a wiring drawing, I had to open each version,
import the drawing to replace the old one, then save and close. And
hope for the best, switching figures in Word wasn't always that
straight forward, ConTeXt is definitely more predictable.]


Mari
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


  reply	other threads:[~2013-02-04 16:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-04 11:19 "H. Özoguz"
2013-02-04 12:03 ` Marco Patzer
2013-02-04 14:39   ` Mari Voipio
2013-02-04 15:30     ` Alain Delmotte
2013-02-04 16:07       ` Mari Voipio [this message]
2013-02-04 16:49         ` Alain Delmotte
2013-02-05 17:18         ` Hans Hagen
2013-02-04 13:25 "H. Özoguz"

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='CAGbDsP3US8pH=bBRGSWE9_uqD1FPXgrK6APD3TmhftfOhc0Cfw@mail.gmail.com' \
    --to=mari.voipio@iki.fi \
    --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).