ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Using Product-component
@ 2013-04-16  7:32 Aditya Mahajan
  2013-04-16 12:40 ` d.henman
  2013-04-16 12:51 ` Wolfgang Schuster
  0 siblings, 2 replies; 5+ messages in thread
From: Aditya Mahajan @ 2013-04-16  7:32 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Has something changed recently on how product-component structure is supposed to
be used? I have three files:

1. prd.tex

     \environment env

     \startproduct prd

     \component cmp

     \stopproduct

2. env.tex


     \startenvironment env

     \define\testing{This is a test}

     \stopenvironment

3. cmp.tex


     \product prd

     \startcomponent cmp

     Testing \testing

     \stopcomponent

When I compile cmp.tex, I get:

%--------------------------%<-----------------------------
mtx-context     | run 1: luatex --fmt="/home/adityam/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en" --jobname="cmp" --lua="/home/adityam/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en.lui" --no-parse-first-line --c:currentrun=1 --c:fulljobname="./cmp" --c:input="./cmp" --c:kindofrun=1 --c:maxnofruns=8 "cont-yes.mkiv"
This is LuaTeX, Version beta-0.76.0-2013040516 (rev 4627)
  \write18 enabled.
(/home/adityam/media/opt/context-minimals/texmf-context/tex/context/base/cont-yes.mkiv

ConTeXt  ver: 2013.04.14 16:51 MKIV beta  fmt: 2013.4.14  int: english/english

system          > 'cont-new.mkiv' loaded
(/home/adityam/media/opt/context-minimals/texmf-context/tex/context/base/cont-new.mkiv)
system          > files > jobname 'cmp', input 'cmp', result 'cmp'
fonts           > latin modern fonts are not preloaded
languages       > language 'en' is active
(cmp.tex{/home/adityam/media/opt/context-minimals/texmf-fonts/fonts/map/pdftex/context/mkiv-base.map}
fonts           > preloading latin modern fonts (second stage)
fonts           > typescripts > unknown library 'loc'
{/home/adityam/media/opt/context-minimals/texmf-fonts/fonts/map/dvips/lm/lm-math.map}{/home/adityam/media/opt/context-minimals/texmf-fonts/fonts/map/dvips/lm/lm-rm.map}
fonts           > 'fallback modern rm 12pt' is loaded
(prd.tex (env.tex) (cmp.tex (prd.tex (cmp.tex (prd.tex (cmp.tex (prd.tex (cmp.tex (prd.tex (cmp.tex (prd.tex (cmp.tex (prd.tex (cmp.tex (prd.tex (cmp.tex (prd.tex (cmp.tex (prd.tex (cmp.tex (prd.tex (cmp.tex (prd.tex (cmp.tex (prd.tex (cmp.tex (prd.tex (cmp.tex (prd.tex (cmp.tex (prd.tex (cmp.tex (prd.tex (cmp.tex (prd.tex (cmp.tex (prd.tex (cmp.tex (prd.tex (cmp.tex (prd.tex
! TeX capacity exceeded, sorry [text input levels=127].

system          > tex > error on line 5 in file prd.tex: TeX capacity exceeded, sorry [ ...

1     \environment env
2 
3     \startproduct prd
4 
5 >>  \component cmp
6 
7     \stopproduct
8


\ctxcommand #1^^@-\directlua {commands.#1}

l.5 }

\ctxcommand #1^^@-\directlua {commands.#1}

l.5 \component cmp

!  ==> Fatal error occurred, no output PDF file produced!
mtx-context     | fatal error: return code: 1% 
%--------------------------%<-----------------------------

Shouldn't the product file not load the component file (or anything else inside
\startproduct .. \stopproduct) when compiling a component?
___________________________________________________________________________________
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] 5+ messages in thread

* Re: Using Product-component
  2013-04-16  7:32 Using Product-component Aditya Mahajan
@ 2013-04-16 12:40 ` d.henman
  2013-04-16 12:51 ` Wolfgang Schuster
  1 sibling, 0 replies; 5+ messages in thread
From: d.henman @ 2013-04-16 12:40 UTC (permalink / raw)
  To: mailing list for ConTeXt users


As far as I know nothing in the project-component framework has a directive such as
you have in the line below:

"Testing \testing  "

That could be the problem.


Aditya Mahajan <adityam@umich.edu> wrote:

> Has something changed recently on how product-component structure is supposed to
> be used? I have three files:
> 
> 1. prd.tex
> 
>     \environment env
> 
>     \startproduct prd
> 
>     \component cmp
> 
>     \stopproduct
> 
> 2. env.tex
> 
> 
>     \startenvironment env
> 
>     \define\testing{This is a test}
> 
>     \stopenvironment
> 
> 3. cmp.tex
> 
> 
>     \product prd
> 
>     \startcomponent cmp
> 
>     Testing \testing
> 
>     \stopcomponent
> 
> When I compile cmp.tex, I get:
> 
> %--------------------------%<-----------------------------
> mtx-context     | run 1: luatex --fmt="/home/adityam/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en" --jobname="cmp" --lua="/home/adityam/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en.lui" --no-parse-first-line --c:currentrun=1 --c:fulljobname="./cmp" --c:input="./cmp" --c:kindofrun=1 --c:maxnofruns=8 "cont-yes.mkiv"
> This is LuaTeX, Version beta-0.76.0-2013040516 (rev 4627)
>  \write18 enabled.
> (/home/adityam/media/opt/context-minimals/texmf-context/tex/context/base/cont-yes.mkiv
> 
> ConTeXt  ver: 2013.04.14 16:51 MKIV beta  fmt: 2013.4.14  int: english/english
> 
> system          > 'cont-new.mkiv' loaded
> (/home/adityam/media/opt/context-minimals/texmf-context/tex/context/base/cont-new.mkiv)
> system          > files > jobname 'cmp', input 'cmp', result 'cmp'
> fonts           > latin modern fonts are not preloaded
> languages       > language 'en' is active
> (cmp.tex{/home/adityam/media/opt/context-minimals/texmf-fonts/fonts/map/pdftex/context/mkiv-base.map}
> fonts           > preloading latin modern fonts (second stage)
> fonts           > typescripts > unknown library 'loc'
> {/home/adityam/media/opt/context-minimals/texmf-fonts/fonts/map/dvips/lm/lm-math.map}{/home/adityam/media/opt/context-minimals/texmf-fonts/fonts/map/dvips/lm/lm-rm.map}
> fonts           > 'fallback modern rm 12pt' is loaded
> (prd.tex (env.tex) (cmp.tex (prd.tex (cmp.tex (prd.tex (cmp.tex (prd.tex (cmp.tex (prd.tex (cmp.tex (prd.tex (cmp.tex (prd.tex (cmp.tex (prd.tex (cmp.tex (prd.tex (cmp.tex (prd.tex (cmp.tex (prd.tex (cmp.tex (prd.tex (cmp.tex (prd.tex (cmp.tex (prd.tex (cmp.tex (prd.tex (cmp.tex (prd.tex (cmp.tex (prd.tex (cmp.tex (prd.tex (cmp.tex (prd.tex (cmp.tex (prd.tex (cmp.tex (prd.tex
> ! TeX capacity exceeded, sorry [text input levels=127].
> 
> system          > tex > error on line 5 in file prd.tex: TeX capacity exceeded, sorry [ ...
> 
> 1     \environment env
> 2 3     \startproduct prd
> 4 5 >>  \component cmp
> 6 7     \stopproduct
> 8
> 
> 
> \ctxcommand #1^^@-\directlua {commands.#1}
> 
> l.5 }
> 
> \ctxcommand #1^^@-\directlua {commands.#1}
> 
> l.5 \component cmp
> 
> !  ==> Fatal error occurred, no output PDF file produced!
> mtx-context     | fatal error: return code: 1%
> %--------------------------%<-----------------------------
> 
> Shouldn't the product file not load the component file (or anything else inside
> \startproduct .. \stopproduct) when compiling a component?
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________
___________________________________________________________________________________
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] 5+ messages in thread

* Re: Using Product-component
  2013-04-16  7:32 Using Product-component Aditya Mahajan
  2013-04-16 12:40 ` d.henman
@ 2013-04-16 12:51 ` Wolfgang Schuster
  2013-04-16 15:25   ` Aditya Mahajan
  1 sibling, 1 reply; 5+ messages in thread
From: Wolfgang Schuster @ 2013-04-16 12:51 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 16.04.2013 um 09:32 schrieb Aditya Mahajan <adityam@umich.edu>:

> Has something changed recently on how product-component structure is supposed to
> be used? I have three files:
> 
> 1. prd.tex
> 
>    \environment env
> 
>    \startproduct prd
> 
>    \component cmp
> 
>    \stopproduct
> 
> 2. env.tex
> 
> 
>    \startenvironment env
> 
>    \define\testing{This is a test}
> 
>    \stopenvironment
> 
> 3. cmp.tex
> 
> 
>    \product prd
> 
>    \startcomponent cmp
> 
>    Testing \testing
> 
>    \stopcomponent
> 
> When I compile cmp.tex, I get:
> 
> %--------------------------%<-----------------------------
> […]
> mtx-context     | fatal error: return code: 1% %--------------------------%<-----------------------------
> 
> Shouldn't the product file not load the component file (or anything else inside
> \startproduct .. \stopproduct) when compiling a component?

The product file loads the component but this isn’t what you’re doing.

You process the component which doesn’t load product file because this would end in a loop
because the product would then again load the component etc.

Add “\environment env” at the begin of your component file and the problem disappears.
Since environment files are loaded only once it doesn’t matter when the line is in each
component file.

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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: Using Product-component
  2013-04-16 12:51 ` Wolfgang Schuster
@ 2013-04-16 15:25   ` Aditya Mahajan
  2013-04-16 16:52     ` Hans Hagen
  0 siblings, 1 reply; 5+ messages in thread
From: Aditya Mahajan @ 2013-04-16 15:25 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1977 bytes --]

On Tue, 16 Apr 2013, Wolfgang Schuster wrote:

>
> Am 16.04.2013 um 09:32 schrieb Aditya Mahajan <adityam@umich.edu>:
>
>> Has something changed recently on how product-component structure is supposed to
>> be used? I have three files:
>>
>> 1. prd.tex
>>
>>    \environment env
>>
>>    \startproduct prd
>>
>>    \component cmp
>>
>>    \stopproduct
>>
>> 2. env.tex
>>
>>
>>    \startenvironment env
>>
>>    \define\testing{This is a test}
>>
>>    \stopenvironment
>>
>> 3. cmp.tex
>>
>>
>>    \product prd
>>
>>    \startcomponent cmp
>>
>>    Testing \testing
>>
>>    \stopcomponent
>>
>> When I compile cmp.tex, I get:
>>
>> %--------------------------%<-----------------------------
>> […]
>> mtx-context     | fatal error: return code: 1% %--------------------------%<-----------------------------
>>
>> Shouldn't the product file not load the component file (or anything else inside
>> \startproduct .. \stopproduct) when compiling a component?
>
> The product file loads the component but this isn’t what you’re doing.
>
> You process the component which doesn’t load product file because this would end in a loop
> because the product would then again load the component etc.
>
> Add “\environment env” at the begin of your component file and the problem disappears.
> Since environment files are loaded only once it doesn’t matter when the line is in each
> component file.

I thought that the whole point of adding `\product ...` in a component 
file was so that I do not have to add all the `\environment ...` in the 
component file.

Actually, if I change the product -> component then everything works as 
expected, so perhaps I did not remember correctly how the 
project-product-component hierarchy is to be used. I thought that the 
project part was optional, but it seems that one must include a project as 
well (if you want not to add all the environments in the component file)

Aditya

[-- Attachment #2: 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
___________________________________________________________________________________

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

* Re: Using Product-component
  2013-04-16 15:25   ` Aditya Mahajan
@ 2013-04-16 16:52     ` Hans Hagen
  0 siblings, 0 replies; 5+ messages in thread
From: Hans Hagen @ 2013-04-16 16:52 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Aditya Mahajan

On 4/16/2013 5:25 PM, Aditya Mahajan wrote:
> On Tue, 16 Apr 2013, Wolfgang Schuster wrote:
>
>>
>> Am 16.04.2013 um 09:32 schrieb Aditya Mahajan <adityam@umich.edu>:
>>
>>> Has something changed recently on how product-component structure is
>>> supposed to
>>> be used? I have three files:
>>>
>>> 1. prd.tex
>>>
>>>    \environment env
>>>
>>>    \startproduct prd
>>>
>>>    \component cmp
>>>
>>>    \stopproduct
>>>
>>> 2. env.tex
>>>
>>>
>>>    \startenvironment env
>>>
>>>    \define\testing{This is a test}
>>>
>>>    \stopenvironment
>>>
>>> 3. cmp.tex
>>>
>>>
>>>    \product prd
>>>
>>>    \startcomponent cmp
>>>
>>>    Testing \testing
>>>
>>>    \stopcomponent
>>>
>>> When I compile cmp.tex, I get:
>>>
>>> %--------------------------%<-----------------------------
>>> […]
>>> mtx-context     | fatal error: return code: 1%
>>> %--------------------------%<-----------------------------
>>>
>>> Shouldn't the product file not load the component file (or anything
>>> else inside
>>> \startproduct .. \stopproduct) when compiling a component?
>>
>> The product file loads the component but this isn’t what you’re doing.
>>
>> You process the component which doesn’t load product file because this
>> would end in a loop
>> because the product would then again load the component etc.
>>
>> Add “\environment env” at the begin of your component file and the
>> problem disappears.
>> Since environment files are loaded only once it doesn’t matter when
>> the line is in each
>> component file.
>
> I thought that the whole point of adding `\product ...` in a component
> file was so that I do not have to add all the `\environment ...` in the
> component file.
>
> Actually, if I change the product -> component then everything works as
> expected, so perhaps I did not remember correctly how the
> project-product-component hierarchy is to be used. I thought that the
> project part was optional, but it seems that one must include a project
> as well (if you want not to add all the environments in the component file)

see core-job.lua ... around line 435 ... there we define what gets done 
once, many times, never

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] 5+ messages in thread

end of thread, other threads:[~2013-04-16 16:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-16  7:32 Using Product-component Aditya Mahajan
2013-04-16 12:40 ` d.henman
2013-04-16 12:51 ` Wolfgang Schuster
2013-04-16 15:25   ` Aditya Mahajan
2013-04-16 16:52     ` Hans Hagen

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