From: Javier M Mora <jmmora@us.es>
To: ntg-context@ntg.nl
Subject: Re: [SOLVED] searching in subdirectories with project structure
Date: Fri, 01 Apr 2016 11:47:01 +0200 [thread overview]
Message-ID: <56FE4395.9060403@us.es> (raw)
In-Reply-To: <56FCD4D4.5030105@us.es>
On 31/03/16 09:42, Javier M Mora wrote:
> On 30/03/16 19:25, Javier M Mora wrote:
>> Hi, (this is my first email to the list)
>>
>> I've created a project for my Thesis. The file tree is:
>>
>> /prod_thesis/
>> /prod_thesis.tex
>> /envi_thesis.tex
>> /comp_chap1/
>> /comp_chap1.tex
>> /envi_chap1.tex
>> /images/
>> /image1.jpg
>> /image2.jpg
>> (...)
>> /tables/
>> /table1.tex
>> /table2.tex
>> (...)
>> Questions:
>>
>> What is the canonical way to keep subdirectories of dependencies in a
>> component? (to be reused later in product compilation)
>>
These are my ideas and my solution (don't hesitate to comment):
* envi_thesis.tex (environment of product) is the general configuration
of all chapters: margin size, styles, fonts, and general definitions.
* envi_chap1.tex (environment of component) is specific configuration of
a chapter: where the images used are, the title in the header.
* If I compile a component, envi_thesis.tex isn't automatically loaded.
So, it is necessary include a \environment envi_thesis.tex in each
envi_chapter I have. (there is no infinite loop in circular environment
calling, because envi_thesis.tex doesn't load component environments)
* All information of directories are defined in environment of
components, but the reference directory is different when I compile a
product than a component. So in envi_chapter.tex I have a structure of
\doifmodeelse{*product}{
<directory configuration for product>
}{
<directory configuration for component>
}
So, I keep in only one place directory information regardless I compile
a component or a product.
My solution:
envi_thesis.tex -------------------------------------
\startenvironment envi_thesis
%% PATHS
\usepath[{comp_chapter1,comp_chapter2}]
blah blah blah
\stopenvironment
prod_thesis.tex --------------------------------------
\startproduct prod_thesis
\environment envi_thesis
blah blah
\startbodymatter
\component comp_chapter1
\component comp_chapter2
blah blah
\stopbodymatter
\stopproduct
comp_chapter1.tex ------------------------------------
\startcomponent comp_chapter1
\product prod_thesis
\environment envi_chapter1
\chapter{Preprocesado de las piezas}
blah blah blah
\stopcomponent
envi_chapter1.tex -------------------------------------
\startenvironment envi_chapter1
\product prod_thesis
\environment envi_thesis % <- to get global configuration
%% path
\usepath[tables]
\doifmodeelse{*product} {
\setupexternalfigures[directory={comp_chapter1/images}]
other conf
}{
\setupexternalfigures[directory={images}]
other conf
}
\stopenvironment
That's all.
___________________________________________________________________________________
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
___________________________________________________________________________________
next prev parent reply other threads:[~2016-04-01 9:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-30 17:25 Javier M Mora
2016-03-31 7:42 ` Javier M Mora
2016-04-01 9:47 ` Javier M Mora [this message]
2016-05-05 10:24 ` [SOLVED] " luigi scarso
2016-05-06 10:02 ` Hans Hagen
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=56FE4395.9060403@us.es \
--to=jmmora@us.es \
--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).