ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Project structure with nested subfolders and shared environments.
@ 2022-12-15 21:52 Pawel Urbanski via ntg-context
  2022-12-16  6:51 ` Henning Hraban Ramm via ntg-context
  0 siblings, 1 reply; 8+ messages in thread
From: Pawel Urbanski via ntg-context @ 2022-12-15 21:52 UTC (permalink / raw)
  To: ntg-context; +Cc: Pawel Urbanski


[-- Attachment #1.1: Type: text/plain, Size: 1358 bytes --]

Dear Everyone,
I'm setting up a project structure that will possibly let me share styles
and layouts with lots of documents I need to create weekly.
Unfortunately my definitions in the environment file or files are ignored...

Here is the setup under the purposely created structure:
** The folder called: 'MainFolder' is the root of my document repository.
** The 'Metadata' folder inside the 'MainFolder' contains environment files.
** The 'SubFolder/SubSubFolder' inside the 'MainFolder' is the nestin
glevel I need with all the documents.
 Here are the files:
% /MainFolder/Meta.tex
\startproject *
\usepath [{ Metadata }]
\environment Environment.tex
\stopproject

% /MainFolder/Metadata/Environment.tex
\startenvironment *
% Test if setup is applied.
\setupbodyfont[ebgaramond]
\stopenvironment

% /MainFolder/SubFolder/SubSubFolder/Doc.tex
\startproduct *
\project Meta
\startcomponent *
\startchapter[title={ Nested }]
\input tufte
\stopchapter
\stopcomponent
\stopproduct

Unfortunately the default font is applied and EB Garamond is not picked up
from the environment.

The question is:
** How can I use such a structure to share styles and layouts kept i the
'Metadata' folder and use htem in products that are ment to be complete
documents kept in the 'SubSubFolders'?

All the very best and htank you in advance for any clarifications...

Pawel

[-- Attachment #1.2: Type: text/html, Size: 1559 bytes --]

[-- Attachment #2: Type: text/plain, Size: 496 bytes --]

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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Project structure with nested subfolders and shared environments.
  2022-12-15 21:52 Project structure with nested subfolders and shared environments Pawel Urbanski via ntg-context
@ 2022-12-16  6:51 ` Henning Hraban Ramm via ntg-context
  2022-12-16  9:09   ` Pawel Urbanski via ntg-context
  2022-12-16  9:11   ` Denis Maier via ntg-context
  0 siblings, 2 replies; 8+ messages in thread
From: Henning Hraban Ramm via ntg-context @ 2022-12-16  6:51 UTC (permalink / raw)
  To: Pawel Urbanski via ntg-context; +Cc: Henning Hraban Ramm

Am 15.12.22 um 22:52 schrieb Pawel Urbanski via ntg-context:
> \usepath [{ Metadata }]

Did you try without the spaces? I’d assume ConTeXt will look for a 
folder " Metadata " and not "Metadata".
If this is just a template variable, you didn’t tell us about templating.

And then it matters from where you call your files (MainFolder, 
SubFolder or whereever).

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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Project structure with nested subfolders and shared environments.
  2022-12-16  6:51 ` Henning Hraban Ramm via ntg-context
@ 2022-12-16  9:09   ` Pawel Urbanski via ntg-context
  2022-12-16  9:54     ` Henning Hraban Ramm via ntg-context
  2022-12-16 14:00     ` Wolfgang Schuster via ntg-context
  2022-12-16  9:11   ` Denis Maier via ntg-context
  1 sibling, 2 replies; 8+ messages in thread
From: Pawel Urbanski via ntg-context @ 2022-12-16  9:09 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Pawel Urbanski


[-- Attachment #1.1: Type: text/plain, Size: 387 bytes --]

>
>
> Hi,

To address the first question:
\usepath[{Metadata}] % Is the actual code - I put spaces for readability
reasons, which was a bad idea.

When I compile a document I switch to the SubSubFolder for the document
file is in there.

I will appriciate any further hints. Obvious htings are usually obvious for
people more experenced than I am with Context at this time.

Best,
Pawel

[-- Attachment #1.2: Type: text/html, Size: 678 bytes --]

[-- Attachment #2: Type: text/plain, Size: 496 bytes --]

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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Project structure with nested subfolders and shared environments.
  2022-12-16  6:51 ` Henning Hraban Ramm via ntg-context
  2022-12-16  9:09   ` Pawel Urbanski via ntg-context
@ 2022-12-16  9:11   ` Denis Maier via ntg-context
  1 sibling, 0 replies; 8+ messages in thread
From: Denis Maier via ntg-context @ 2022-12-16  9:11 UTC (permalink / raw)
  To: ntg-context; +Cc: denis.maier

Also, I think you'll need to load the environment in your products as well. I don't think linking to the project is enough. (Check the mailing list, I have also asked similar questions already...)

Best,
Denis

> -----Ursprüngliche Nachricht-----
> Von: ntg-context <ntg-context-bounces@ntg.nl> Im Auftrag von Henning
> Hraban Ramm via ntg-context
> Gesendet: Freitag, 16. Dezember 2022 07:52
> An: Pawel Urbanski via ntg-context <ntg-context@ntg.nl>
> Cc: Henning Hraban Ramm <texml@fiee.net>
> Betreff: Re: [NTG-context] Project structure with nested subfolders and
> shared environments.
> 
> Am 15.12.22 um 22:52 schrieb Pawel Urbanski via ntg-context:
> > \usepath [{ Metadata }]
> 
> Did you try without the spaces? I’d assume ConTeXt will look for a folder "
> Metadata " and not "Metadata".
> If this is just a template variable, you didn’t tell us about templating.
> 
> And then it matters from where you call your files (MainFolder, SubFolder or
> whereever).
> 
> Hraban
> ________________________________________________________________
> ___________________
> If your question is of interest to others as well, please add an entry to the
> Wiki!
> 
> maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-
> context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net archive  :
> https://bitbucket.org/phg/context-mirror/commits/
> wiki     : https://contextgarden.net
> ________________________________________________________________
> ___________________
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Project structure with nested subfolders and shared environments.
  2022-12-16  9:09   ` Pawel Urbanski via ntg-context
@ 2022-12-16  9:54     ` Henning Hraban Ramm via ntg-context
  2022-12-16 10:00       ` Pawel Urbanski via ntg-context
  2022-12-16 14:00     ` Wolfgang Schuster via ntg-context
  1 sibling, 1 reply; 8+ messages in thread
From: Henning Hraban Ramm via ntg-context @ 2022-12-16  9:54 UTC (permalink / raw)
  To: ntg-context; +Cc: Henning Hraban Ramm

Am 16.12.22 um 10:09 schrieb Pawel Urbanski via ntg-context:
> When I compile a document I switch to the SubSubFolder for the document 
> file is in there.

In my experience this won’t work. ConTeXt searches from the current 
folder (you can configure search paths, but I gave up on that, and you’d 
have to do it in the called file).

It should be enough to call the environment from the project, but either 
the project or the environment isn’t found if the path doesn’t fit the 
call location.

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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Project structure with nested subfolders and shared environments.
  2022-12-16  9:54     ` Henning Hraban Ramm via ntg-context
@ 2022-12-16 10:00       ` Pawel Urbanski via ntg-context
  2022-12-16 10:19         ` Denis Maier via ntg-context
  0 siblings, 1 reply; 8+ messages in thread
From: Pawel Urbanski via ntg-context @ 2022-12-16 10:00 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Pawel Urbanski


[-- Attachment #1.1: Type: text/plain, Size: 1676 bytes --]

Thank you for responses. While the ability to sort of inherit setups would
be very useful it looks like as of time of posting this message in December
2022 it is not possible.
As a workaround I will create a shead environment file and just bulk copy
it to subfolders. In case when I'll need to globally change some
configuration I can just replace the file.
I keep all my documents in GIT so the ability to reverte hte change is just
a command away.

Thanks for help.

Best,
Pawel

On Fri, Dec 16, 2022 at 10:55 AM Henning Hraban Ramm via ntg-context <
ntg-context@ntg.nl> wrote:

> Am 16.12.22 um 10:09 schrieb Pawel Urbanski via ntg-context:
> > When I compile a document I switch to the SubSubFolder for the document
> > file is in there.
>
> In my experience this won’t work. ConTeXt searches from the current
> folder (you can configure search paths, but I gave up on that, and you’d
> have to do it in the called file).
>
> It should be enough to call the environment from the project, but either
> the project or the environment isn’t found if the path doesn’t fit the
> call location.
>
> Hraban
>
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : https://contextgarden.net
>
> ___________________________________________________________________________________
>

[-- Attachment #1.2: Type: text/html, Size: 2533 bytes --]

[-- Attachment #2: Type: text/plain, Size: 496 bytes --]

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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Project structure with nested subfolders and shared environments.
  2022-12-16 10:00       ` Pawel Urbanski via ntg-context
@ 2022-12-16 10:19         ` Denis Maier via ntg-context
  0 siblings, 0 replies; 8+ messages in thread
From: Denis Maier via ntg-context @ 2022-12-16 10:19 UTC (permalink / raw)
  To: ntg-context; +Cc: denis.maier


[-- Attachment #1.1: Type: text/plain, Size: 2234 bytes --]

Another think you might want to consider: automatic local overrides. So, I’d copy everthing to a build folder, copy the environment from somewhere above unless the current folder contains a file with the same name.

Denis

Von: ntg-context <ntg-context-bounces@ntg.nl> Im Auftrag von Pawel Urbanski via ntg-context
Gesendet: Freitag, 16. Dezember 2022 11:01
An: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: Pawel Urbanski <urbanski.pawel@gmail.com>
Betreff: Re: [NTG-context] Project structure with nested subfolders and shared environments.

Thank you for responses. While the ability to sort of inherit setups would be very useful it looks like as of time of posting this message in December 2022 it is not possible.
As a workaround I will create a shead environment file and just bulk copy it to subfolders. In case when I'll need to globally change some configuration I can just replace the file.
I keep all my documents in GIT so the ability to reverte hte change is just a command away.

Thanks for help.

Best,
Pawel

On Fri, Dec 16, 2022 at 10:55 AM Henning Hraban Ramm via ntg-context <ntg-context@ntg.nl<mailto:ntg-context@ntg.nl>> wrote:
Am 16.12.22 um 10:09 schrieb Pawel Urbanski via ntg-context:
> When I compile a document I switch to the SubSubFolder for the document
> file is in there.

In my experience this won’t work. ConTeXt searches from the current
folder (you can configure search paths, but I gave up on that, and you’d
have to do it in the called file).

It should be enough to call the environment from the project, but either
the project or the environment isn’t found if the path doesn’t fit the
call location.

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

maillist : ntg-context@ntg.nl<mailto:ntg-context@ntg.nl> / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

[-- Attachment #1.2: Type: text/html, Size: 5663 bytes --]

[-- Attachment #2: Type: text/plain, Size: 496 bytes --]

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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Project structure with nested subfolders and shared environments.
  2022-12-16  9:09   ` Pawel Urbanski via ntg-context
  2022-12-16  9:54     ` Henning Hraban Ramm via ntg-context
@ 2022-12-16 14:00     ` Wolfgang Schuster via ntg-context
  1 sibling, 0 replies; 8+ messages in thread
From: Wolfgang Schuster via ntg-context @ 2022-12-16 14:00 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Pawel Urbanski via ntg-context
  Cc: Wolfgang Schuster


[-- Attachment #1.1: Type: text/plain, Size: 582 bytes --]

Pawel Urbanski via ntg-context schrieb am 16.12.2022 um 10:09:
>
>
>     Hi,
>
> To address the first question:
> \usepath[{Metadata}] % Is the actual code - I put spaces for 
> readability reasons, which was a bad idea.
>
> When I compile a document I switch to the SubSubFolder for the 
> document file is in there.
>
> I will appriciate any further hints. Obvious htings are usually 
> obvious for people more experenced than I am with Context at this time.

You need

\usepath[../../Metadata]

because the search path is relative to the location of your document.

Wolfgang


[-- Attachment #1.2: Type: text/html, Size: 1223 bytes --]

[-- Attachment #2: Type: text/plain, Size: 496 bytes --]

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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-12-16 14:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-15 21:52 Project structure with nested subfolders and shared environments Pawel Urbanski via ntg-context
2022-12-16  6:51 ` Henning Hraban Ramm via ntg-context
2022-12-16  9:09   ` Pawel Urbanski via ntg-context
2022-12-16  9:54     ` Henning Hraban Ramm via ntg-context
2022-12-16 10:00       ` Pawel Urbanski via ntg-context
2022-12-16 10:19         ` Denis Maier via ntg-context
2022-12-16 14:00     ` Wolfgang Schuster via ntg-context
2022-12-16  9:11   ` Denis Maier via ntg-context

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).