* How to process a project residing in another directory
@ 2012-04-15 21:57 Helge Blischke
2012-04-16 9:12 ` Marco
2012-04-16 9:17 ` Hans Hagen
0 siblings, 2 replies; 9+ messages in thread
From: Helge Blischke @ 2012-04-15 21:57 UTC (permalink / raw)
To: ntg-context
I try to process a ConTeXt project residing in a directory different from the
current directory (where context is called), imagine e.g. a NFS mounted
directory on a different host.
I tried to point context to the project directory
by specifying it by the command line option
--path=absolute_path_to_the_directory
but that did not work.
Helge
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: How to process a project residing in another directory
2012-04-15 21:57 How to process a project residing in another directory Helge Blischke
@ 2012-04-16 9:12 ` Marco
2012-04-16 9:17 ` Hans Hagen
1 sibling, 0 replies; 9+ messages in thread
From: Marco @ 2012-04-16 9:12 UTC (permalink / raw)
To: ntg-context
On 2012-04-15 Helge Blischke <h.blischke@acm.org> wrote:
> I try to process a ConTeXt project residing in a directory different from
> the current directory (where context is called), imagine e.g. a NFS mounted
> directory on a different host.
NFS is transparent to the applications and should work the same way
as local directories.
> I tried to point context to the project directory
> by specifying it by the command line option
> --path=absolute_path_to_the_directory
> but that did not work.
Works here. Example:
% file: $HOME/some/dir/main.tex
\startproduct main
\component sec-first
\stopproduct
% file: $HOME/some/dir/chapters/sec-first.tex
\startcomponent sec-first
Foo Bar
\stopcomponent
% current directory: $HOME/otherdir
% the following does not work
context ../some/dir/main.tex
% but this compiles successfully
context --path=../some/dir/chapters ../some/dir/main.tex
Another option is to use the \usepath and \usesubpath features. When
you don't call from the directory where main.tex resides, you have
to include the absolute or relative path in the \usepath argument.
Example:
% file: $HOME/some/dir/main.tex
\startproduct main
\usepath
[%
/home/me/some/dir/chapters,%
/home/me/some/dir/environments,%
%../some/dir/chapters,%
%../some/dir/environments,%
]
\component sec-first
\stopproduct
% file: $HOME/some/dir/chapters/sec-first.tex
\startcomponent sec-first
Foo Bar
\stopcomponent
% current directory: $HOME/otherdir
% this works now
context ../some/dir/main.tex
When you call context from $HOME/some/dir, then the \usepath command
simplifies to:
\usepath
[%
chapters,%
enviroments,% add all necessary directories
]
Watch out the percent signs, they are essential.
Question to the others: Why, in contrast to most other ConTeXt
commands, is it necessary to escape the line endings in the \usepath
call?
Marco
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: How to process a project residing in another directory
2012-04-15 21:57 How to process a project residing in another directory Helge Blischke
2012-04-16 9:12 ` Marco
@ 2012-04-16 9:17 ` Hans Hagen
2012-04-16 13:00 ` Helge Blischke
1 sibling, 1 reply; 9+ messages in thread
From: Hans Hagen @ 2012-04-16 9:17 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: Helge Blischke
On 15-4-2012 23:57, Helge Blischke wrote:
> I try to process a ConTeXt project residing in a directory different from the
> current directory (where context is called), imagine e.g. a NFS mounted
> directory on a different host.
>
> I tried to point context to the project directory
> by specifying it by the command line option
> --path=absolute_path_to_the_directory
> but that did not work.
mtxrun --path=... --script context ...
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: How to process a project residing in another directory
2012-04-16 9:17 ` Hans Hagen
@ 2012-04-16 13:00 ` Helge Blischke
2012-04-16 16:59 ` Hans Hagen
0 siblings, 1 reply; 9+ messages in thread
From: Helge Blischke @ 2012-04-16 13:00 UTC (permalink / raw)
To: ntg-context
Hans Hagen <pragma <at> wxs.nl> writes:
>
> On 15-4-2012 23:57, Helge Blischke wrote:
> > I try to process a ConTeXt project residing in a directory different from the
> > current directory (where context is called), imagine e.g. a NFS mounted
> > directory on a different host.
> >
> > I tried to point context to the project directory
> > by specifying it by the command line option
> > --path=absolute_path_to_the_directory
> > but that did not work.
>
> mtxrun --path=... --script context ...
>
>
>
But what to do if the directory specified by the --path= option is not writeable
for the user executing mtxrun?
Helge
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: How to process a project residing in another directory
2012-04-16 13:00 ` Helge Blischke
@ 2012-04-16 16:59 ` Hans Hagen
2012-04-16 17:28 ` Aditya Mahajan
0 siblings, 1 reply; 9+ messages in thread
From: Hans Hagen @ 2012-04-16 16:59 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: Helge Blischke
On 16-4-2012 15:00, Helge Blischke wrote:
> Hans Hagen<pragma<at> wxs.nl> writes:
>
>>
>> On 15-4-2012 23:57, Helge Blischke wrote:
>>> I try to process a ConTeXt project residing in a directory different from the
>>> current directory (where context is called), imagine e.g. a NFS mounted
>>> directory on a different host.
>>>
>>> I tried to point context to the project directory
>>> by specifying it by the command line option
>>> --path=absolute_path_to_the_directory
>>> but that did not work.
>>
>> mtxrun --path=... --script context ...
>>
>
>
>>
>>
> But what to do if the directory specified by the --path= option is not writeable
> for the user executing mtxrun?
then put all the project files in
<texroot>/texmf-project/tex/context/user, run mtxrun --generate, and run
on a directory where the used can mess around
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: How to process a project residing in another directory
2012-04-16 16:59 ` Hans Hagen
@ 2012-04-16 17:28 ` Aditya Mahajan
2012-04-16 18:11 ` Hans Hagen
0 siblings, 1 reply; 9+ messages in thread
From: Aditya Mahajan @ 2012-04-16 17:28 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Mon, 16 Apr 2012, Hans Hagen wrote:
> On 16-4-2012 15:00, Helge Blischke wrote:
>> Hans Hagen<pragma<at> wxs.nl> writes:
>>
>>>
>>> On 15-4-2012 23:57, Helge Blischke wrote:
>>>> I try to process a ConTeXt project residing in a directory different from
>>>> the
>>>> current directory (where context is called), imagine e.g. a NFS mounted
>>>> directory on a different host.
>>>>
>>>> I tried to point context to the project directory
>>>> by specifying it by the command line option
>>>> --path=absolute_path_to_the_directory
>>>> but that did not work.
>>>
>>> mtxrun --path=... --script context ...
>>>
>> But what to do if the directory specified by the --path= option is not
>> writeable
>> for the user executing mtxrun?
>
> then put all the project files in <texroot>/texmf-project/tex/context/user,
> run mtxrun --generate, and run on a directory where the used can mess around
Is there a tree, other than TEXMFHOME, which is scanned at runtime? (so
that mtxrun --generate is not needed). For example, one can do the
following:
TEXMFHOME=path-to-project-files context filename
But this overwrites the default value of TEXMFHOME. If the mtxrun
--generate step were not needed, one could do the same with TEXMFPROJECT
tree.
Aditya
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: How to process a project residing in another directory
2012-04-16 17:28 ` Aditya Mahajan
@ 2012-04-16 18:11 ` Hans Hagen
2012-04-16 19:12 ` Helge Blischke
0 siblings, 1 reply; 9+ messages in thread
From: Hans Hagen @ 2012-04-16 18:11 UTC (permalink / raw)
To: mailing list for ConTeXt users
On 16-4-2012 19:28, Aditya Mahajan wrote:
> But this overwrites the default value of TEXMFHOME. If the mtxrun
> --generate step were not needed, one could do the same with TEXMFPROJECT
> tree.
One can indeed use texmfhome which is checked at runtime (but a large
one will take time of course esp on a network share).
Here I always use texmf-project.
Of course one can also use \usepath (or context --path=... which does
the same).
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: How to process a project residing in another directory
2012-04-16 18:11 ` Hans Hagen
@ 2012-04-16 19:12 ` Helge Blischke
2012-04-16 21:44 ` Aditya Mahajan
0 siblings, 1 reply; 9+ messages in thread
From: Helge Blischke @ 2012-04-16 19:12 UTC (permalink / raw)
To: ntg-context
Hans Hagen <pragma <at> wxs.nl> writes:
>
> On 16-4-2012 19:28, Aditya Mahajan wrote:
>
> > But this overwrites the default value of TEXMFHOME. If the mtxrun
> > --generate step were not needed, one could do the same with TEXMFPROJECT
> > tree.
>
> One can indeed use texmfhome which is checked at runtime (but a large
> one will take time of course esp on a network share).
>
> Here I always use texmf-project.
>
> Of course one can also use \usepath (or context --path=... which does
> the same).
>
> Hans
>
By trial and eror I found out that
context --path=...
tries to run the scripts and programs within that directory
which leads to abort if e.g. the calling user has no write permission
there.
On the other hand, inserting a \usepath[...] just after the \start... command
functions as exspected.
Thus, I'd propose to provide an additional option
--usepath=...
what does exactly that, which avoids editing the main.tex file.
Helge
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: How to process a project residing in another directory
2012-04-16 19:12 ` Helge Blischke
@ 2012-04-16 21:44 ` Aditya Mahajan
0 siblings, 0 replies; 9+ messages in thread
From: Aditya Mahajan @ 2012-04-16 21:44 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Mon, 16 Apr 2012, Helge Blischke wrote:
> By trial and eror I found out that
> context --path=...
> tries to run the scripts and programs within that directory
> which leads to abort if e.g. the calling user has no write permission
> there.
Can you summarize your results on the wiki?
> On the other hand, inserting a \usepath[...] just after the \start... command
> functions as exspected.
>
> Thus, I'd propose to provide an additional option
> --usepath=...
> what does exactly that, which avoids editing the main.tex file.
Easy to do on your own:
\doifsomething{\env{usepath}}
{\expanded{\usepath[\env{usepath}]}}
and then call you tex file using
context --arguments=usepath=/path/to/set filename
Aditya
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2012-04-16 21:44 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-15 21:57 How to process a project residing in another directory Helge Blischke
2012-04-16 9:12 ` Marco
2012-04-16 9:17 ` Hans Hagen
2012-04-16 13:00 ` Helge Blischke
2012-04-16 16:59 ` Hans Hagen
2012-04-16 17:28 ` Aditya Mahajan
2012-04-16 18:11 ` Hans Hagen
2012-04-16 19:12 ` Helge Blischke
2012-04-16 21:44 ` Aditya Mahajan
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).