Re: [NTG-context] Moving the old book-structure to a recent ConTeXt

2021-07-18 Thread Wolfgang Schuster

Gerben Wierda schrieb am 16.07.2021 um 15:51:


Is there a new template I can download somewhere to start from scratch?


There is no template but show below a example for a document which
uses the project structure. The examples are just my own preference
and there are many ways to change them to fit your own style.


1. File names

In the example all sub files (style + chapters) start with the
name of the main file and append a sub name. Another popular
naming scheme is to prefix the files with c_ (component),
p_ (product) or s_ (style/environment).

To avoid problems should also try to use only ASCII characters
for the file names and avoid anything which is special in TeX,
using spaces or extra periods should be avoided as well.


2. Arguments for \component etc.

In my example I passed the argument to \component, \startproduct
etc. in square brackets but this is only a alternative form
to older way, where you passed it without the brackets. Both

\component document-xxx

and

\component [document-xxx]

are valid and you can use whatever you prefer.


3. Position of \environment

In my example I load the environment-file after \startproduct
and \startcomponent but it's also possible to load it before
them. There are reasons for both positions and when you choose
one you should keep it for all files.


4. \startdocument

In my product file I added a document-environment, while it
isn't necessary in this case it provides a nice hook to insert
a title page for your document.


 begin document.tex
\startproduct [*]

\environment [document-environment]

\startdocument

% \startfrontmatter
%
% load components with table of contents, introduction etc.
%
% \stopfrontmatter

\startbodymatter

\component [document-xxx]

\stopbodymatter

\stopdocument

\stopproduct
 end document.tex

 begin document-environment.tex
\startenvironment [*]

% sub directory for images
%
% \setupexternalfigures
%   [directory=...]
%
% sub directories for components
%
% \usepath
%   [...]

% put you setups here

\stopenvironment
 end document-environment.tex

 begin document-xxx.tex
\startcomponent [*]

\environment [document-environment]

% put your content here

\stopcomponent
 end document-xxx.tex


Wolfgang
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Moving the old book-structure to a recent ConTeXt

2021-07-16 Thread Gerben Wierda



> On 15 Jul 2021, at 16:00, Henning Hraban Ramm  wrote:
> 
>> 
>> Am 15.07.2021 um 12:19 schrieb Gerben Wierda :
>> 
>>> On 12 Jul 2021, at 12:15, Henning Hraban Ramm  wrote:
>>> 
>>> 
>>> 
 Am 12.07.2021 um 10:25 schrieb Gerben Wierda :
 
 Years ago I wrote a book (Chess and the Art of Enterprise Architecture) 
 using ConTeXt.
 
 The setup was (I think Taco’s) basic book project setup, with a chapters, 
 environments, products, etc. subdirectory where you work in the chapters 
 directory and can both produce individual chapters and the whole book. The 
 main tool to produce was texexec.
 
 ConTeXt has moved on considerably since then (2014-2015).
 
 So, I tried teh old project to see if it still works, but found out it 
 didn’t. There still is a texexec in my MacTeX, but the compilation fails:
 
 texexec --pdf --mode=SCREEN  ../products/prd_book.tex
 resolvers   | initialization | fatal error: kpse library is accessed 
 (key: original)
 
 Is there a new ‘book’ project structure/template for the modern/standalone 
 ConTeXt?
>>> 
>>> The project struture with project/product/environment/components is still 
>>> the same.
>>> 
>>> "texexec" is MkII, you must call "context" for MkIV (with --luatex) and 
>>> LMTX.
>>> 
>>> You will probably need to update several setups, there were many changes 
>>> since MkII.
>> 
>> So, just for confirmation that I understand this correctly, I need to simply 
>> change the command from texexec  to context --luatex and fix all settings in 
>> my setup until I get it working again?
> 
> I guess so. I don’t know your project.
> 
> There were a lot of changes between MkII and current MkIV, and many aren’t 
> obvious.
> I’d suggest to rewrite your environment from scratch; only copy pieces step 
> by step and check if they still do what you expect. Use a reduced test 
> product.

Is there a new template I can download somewhere to start from scratch?

Gerben

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Moving the old book-structure to a recent ConTeXt

2021-07-15 Thread Gerben Wierda
> On 12 Jul 2021, at 12:15, Henning Hraban Ramm  wrote:
> 
> 
> 
>> Am 12.07.2021 um 10:25 schrieb Gerben Wierda :
>> 
>> Years ago I wrote a book (Chess and the Art of Enterprise Architecture) 
>> using ConTeXt.
>> 
>> The setup was (I think Taco’s) basic book project setup, with a chapters, 
>> environments, products, etc. subdirectory where you work in the chapters 
>> directory and can both produce individual chapters and the whole book. The 
>> main tool to produce was texexec.
>> 
>> ConTeXt has moved on considerably since then (2014-2015).
>> 
>> So, I tried teh old project to see if it still works, but found out it 
>> didn’t. There still is a texexec in my MacTeX, but the compilation fails:
>> 
>> texexec --pdf --mode=SCREEN  ../products/prd_book.tex
>> resolvers   | initialization | fatal error: kpse library is accessed 
>> (key: original)
>> 
>> Is there a new ‘book’ project structure/template for the modern/standalone 
>> ConTeXt?
> 
> The project struture with project/product/environment/components is still the 
> same.
> 
> "texexec" is MkII, you must call "context" for MkIV (with --luatex) and LMTX.
> 
> You will probably need to update several setups, there were many changes 
> since MkII.

So, just for confirmation that I understand this correctly, I need to simply 
change the command from texexec  to context --luatex and fix all settings in my 
setup until I get it working again?

G___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Moving the old book-structure to a recent ConTeXt

2021-07-15 Thread Henning Hraban Ramm

> Am 15.07.2021 um 12:19 schrieb Gerben Wierda :
> 
>> On 12 Jul 2021, at 12:15, Henning Hraban Ramm  wrote:
>> 
>> 
>> 
>>> Am 12.07.2021 um 10:25 schrieb Gerben Wierda :
>>> 
>>> Years ago I wrote a book (Chess and the Art of Enterprise Architecture) 
>>> using ConTeXt.
>>> 
>>> The setup was (I think Taco’s) basic book project setup, with a chapters, 
>>> environments, products, etc. subdirectory where you work in the chapters 
>>> directory and can both produce individual chapters and the whole book. The 
>>> main tool to produce was texexec.
>>> 
>>> ConTeXt has moved on considerably since then (2014-2015).
>>> 
>>> So, I tried teh old project to see if it still works, but found out it 
>>> didn’t. There still is a texexec in my MacTeX, but the compilation fails:
>>> 
>>> texexec --pdf --mode=SCREEN  ../products/prd_book.tex
>>> resolvers   | initialization | fatal error: kpse library is accessed 
>>> (key: original)
>>> 
>>> Is there a new ‘book’ project structure/template for the modern/standalone 
>>> ConTeXt?
>> 
>> The project struture with project/product/environment/components is still 
>> the same.
>> 
>> "texexec" is MkII, you must call "context" for MkIV (with --luatex) and LMTX.
>> 
>> You will probably need to update several setups, there were many changes 
>> since MkII.
> 
> So, just for confirmation that I understand this correctly, I need to simply 
> change the command from texexec  to context --luatex and fix all settings in 
> my setup until I get it working again?

I guess so. I don’t know your project.

There were a lot of changes between MkII and current MkIV, and many aren’t 
obvious.
I’d suggest to rewrite your environment from scratch; only copy pieces step by 
step and check if they still do what you expect. Use a reduced test product.

Hraban
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] Moving the old book-structure to a recent ConTeXt

2021-07-12 Thread Gerben Wierda
Years ago I wrote a book (Chess and the Art of Enterprise Architecture) using 
ConTeXt.

The setup was (I think Taco’s) basic book project setup, with a chapters, 
environments, products, etc. subdirectory where you work in the chapters 
directory and can both produce individual chapters and the whole book. The main 
tool to produce was texexec.

ConTeXt has moved on considerably since then (2014-2015).

So, I tried teh old project to see if it still works, but found out it didn’t. 
There still is a texexec in my MacTeX, but the compilation fails:

texexec --pdf --mode=SCREEN  ../products/prd_book.tex
resolvers   | initialization | fatal error: kpse library is accessed (key: 
original)

Is there a new ‘book’ project structure/template for the modern/standalone 
ConTeXt?

Note, I have both a standalone ConTeXt (for another project) and the MacTeX 
distribution on my system. PATH:

/Library/TeX/texbin:/usr/local/context-osx-64/tex/texmf-osx-64/bin:

Thanks,

Gerben Wierda (LinkedIn )
R Enterprise Architecture  (main site)
Book: Chess and the Art of Enterprise Architecture 
Book: Mastering ArchiMate 

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Moving the old book-structure to a recent ConTeXt

2021-07-12 Thread Henning Hraban Ramm


> Am 12.07.2021 um 10:25 schrieb Gerben Wierda :
> 
> Years ago I wrote a book (Chess and the Art of Enterprise Architecture) using 
> ConTeXt.
> 
> The setup was (I think Taco’s) basic book project setup, with a chapters, 
> environments, products, etc. subdirectory where you work in the chapters 
> directory and can both produce individual chapters and the whole book. The 
> main tool to produce was texexec.
> 
> ConTeXt has moved on considerably since then (2014-2015).
> 
> So, I tried teh old project to see if it still works, but found out it 
> didn’t. There still is a texexec in my MacTeX, but the compilation fails:
> 
> texexec --pdf --mode=SCREEN  ../products/prd_book.tex
> resolvers   | initialization | fatal error: kpse library is accessed 
> (key: original)
> 
> Is there a new ‘book’ project structure/template for the modern/standalone 
> ConTeXt?

The project struture with project/product/environment/components is still the 
same.

"texexec" is MkII, you must call "context" for MkIV (with --luatex) and LMTX.

You will probably need to update several setups, there were many changes since 
MkII.

Hraban
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___