ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <schuster.wolfgang@googlemail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: relative references
Date: Fri, 12 Aug 2011 09:25:51 +0200	[thread overview]
Message-ID: <B87191FC-4C85-4AAF-8120-6A253C6A9CDB@googlemail.com> (raw)
In-Reply-To: <BE1ACDBB-2F4A-4064-86BE-8B406E53A26D@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1673 bytes --]


Am 12.08.2011 um 07:52 schrieb Ian Lawrence:

> So here is the simplest example I could manage…
> 
> […]

I show you how it’s done without problems on a simple example.

All your files are in directory with the two subfolders “tex” for for subparts
of your document and “graphic” for figures.

  relabs.tex
  relabs-environment.tex
  tex/pickedup.tex
  graphics/pic.pdf


The content (i attached all files) of the tex-files is:

<file name="relabs.tex">
\startproduct relabs

\environment relabs-environment

\section{Graphic}

\placefigure[force]
  {A Graphic}
  {\externalfigure[pic]}

\section{File}

\component pickedup

\stopproduct
</file>

<file name="relabs-environment.tex">
\startenvironment relabs-environment

\doifmodeelse{*product}
  {\setupexternalfigures[directory={graphics}]}
  {\setupexternalfigures[directory={../graphics}]}

\usepath[tex]

\stopenvironment
</file>

<file name="pickedup.tex">
\startcomponent pickedup

\environment relabs-environment

\subsection{Text}

\input knuth

\subsection{Graphic}

\placefigure[force]
  {Another graphic}
  {\externalfigure[pic]}

\stopcomponent
</file>


I used product and component because you can now set different figure
paths for both files. When you process the product context should search
in the “graphic” folder which is in the same folder but when you process
the component context should first go into the parent folder and then
look in “graphics”.


For the inclusion of files you can specify with “\usepath” where context
should look and all you need as argument for \component is the name of
the file.

Wolfgang

[-- Attachment #2: test.zip --]
[-- Type: application/zip, Size: 7737 bytes --]

[-- Attachment #3: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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:[~2011-08-12  7:25 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-11 15:55 Ian Lawrence
2011-08-11 16:05 ` Wolfgang Schuster
2011-08-11 17:46   ` Alan Braslau
2011-08-12  5:52     ` Ian Lawrence
2011-08-12  7:25       ` Wolfgang Schuster [this message]
2011-08-12 10:45         ` Ian Lawrence
2011-08-12 16:50           ` Hans Hagen
2011-08-12 18:02           ` Wolfgang Schuster
2011-08-13 21:16             ` Email Lists
2011-08-23 13:37           ` relative references in OSX Lion Ian Lawrence
2011-08-23 14:49             ` Hans Hagen
2011-08-26 12:02               ` Ian Lawrence
2011-08-26 12:14                 ` Hans Hagen
2011-08-26 13:02                 ` Taco Hoekwater
2011-08-26 14:32                   ` Ian Lawrence
2011-08-23 14:55             ` Wolfgang Schuster
2011-09-15  5:54               ` Ian Lawrence
2011-08-12 14:44   ` relative references Hans Hagen
2011-08-11 16:11 ` Mari Voipio

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=B87191FC-4C85-4AAF-8120-6A253C6A9CDB@googlemail.com \
    --to=schuster.wolfgang@googlemail.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).