ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: Error when calling \placecontent from product
@ 2008-07-31 16:19 Elliot Clifton
  2008-08-01  9:45 ` Hans Hagen
  2008-08-01 14:12 ` Wolfgang Schuster
  0 siblings, 2 replies; 6+ messages in thread
From: Elliot Clifton @ 2008-07-31 16:19 UTC (permalink / raw)
  To: ntg-context

Thanks Wolfgang,

On 2008-07-31 11:38 +100 Wolfgang Schuster

>\def\dostartArticle[#1]%
>{\getparameters[my][title=,#1]%
>\expanded{\chapter{\mytitle}}}

I have tried wrapping the call to \chapter in \expanded. Hans, also
suggested that here: www.ntg.nl/maps/20/12.pdf

Unfortunately doesn't seem to work. I think the problem occurs in the
final run of TeXexec, whilst finalising the ToC.

Is it something to do with the .tuo file?

systems         : begin file prd-test at line 1
systems         : begin file ../env-test at line 2
systems         : end file ../env-test at line 2
(./prd-test.tuo
! Undefined control sequence.
<argument> \mytitle

\listtextcommand #1->\begstrut #1
                                 \endstrut
\doattributes ...sname #1#2\@EA \endcsname \fi {#4
                                                  }\dostopattributes
<argument> ...ont \limitatedlistentry {\mytitle }}
                                                  \egroup \ifdim \wd 4=\zero...

\secondoftwoarguments #1#2->#2

\dosomelistelement ...hss \dostoplistattributes }}
                                                  \endgraf \nointerlineskip ...
...
l.30 ...}{1}{1}{\mytitle }{2--0-1-0-0-0-0-0--1}{1}


Just to be clear,  \mytitle is defined by \getparameters in my
environment file -- 'env-test'. The product 'prd-test' includes the
component 'cmp-test'. The problem only occurs when ConTeX tries to
build the product, not the component. What is it about the
relationship between the product and component that cuases the
trouble?

Regards,

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


^ permalink raw reply	[flat|nested] 6+ messages in thread
* Re: Error when calling \placecontent from product
@ 2008-08-01 20:01 Elliot Clifton
  0 siblings, 0 replies; 6+ messages in thread
From: Elliot Clifton @ 2008-08-01 20:01 UTC (permalink / raw)
  To: ntg-context

Thanks, Hans and Wolfgang.

On 2008-08-01 15:12 +100, Wolfgang Schuster wrote:

> Delete the temporyry files and remove "../" from "\environment ../env-
> test"
> in prd-test.tex.

Spotted that on closer inspection. Pesky typos! Also realised I was
using square brackets with \startenvironment which is not permitted.
I should pay more attention ;-)



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


^ permalink raw reply	[flat|nested] 6+ messages in thread
* Error when calling \placecontent from product
@ 2008-07-31 10:32 Elliot Clifton
  2008-07-31 10:38 ` Wolfgang Schuster
  0 siblings, 1 reply; 6+ messages in thread
From: Elliot Clifton @ 2008-07-31 10:32 UTC (permalink / raw)
  To: ntg-context

Hi,

I'd appreciated some help with the following problem. How can I stop
the following code generating an error on calling \placecontent from a
product?

In the test case I have files: env-test, prd-test, cmp-test.

\startenvironment [env-test]
	\def\dostartArticle[#1]% generate article header with
	{\getgparameters[my][#1]
		\chapter{\mytitle}
	}
	
	\def\dostopArticle{%
	\page}
	
	\def\startArticle{\dosingleempty\dostartArticle}
	\def\stopArticle{\dosingleempty\dostopArticle}
\stopenvironment


\startproduct prd-test
	\environment ../env-test
	\placecontent %fails with Undefined control sequence \mytitle
	\component cmp-test
\stopproduct


\startcomponent[cmp-test]
	\product prd-test
	\environment env-test
	%\placecontent %works here
	\startArticle[title={Into the unknown}, author={A. U. Thor}] %author
parameter unused in test, just example of what I expect \startArticle
to look like
	\input knuth
	\stopArticle
\stopcomponent


Any ideas how to make this work?

TIA,

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


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

end of thread, other threads:[~2008-08-01 20:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-31 16:19 Error when calling \placecontent from product Elliot Clifton
2008-08-01  9:45 ` Hans Hagen
2008-08-01 14:12 ` Wolfgang Schuster
  -- strict thread matches above, loose matches on Subject: below --
2008-08-01 20:01 Elliot Clifton
2008-07-31 10:32 Elliot Clifton
2008-07-31 10:38 ` Wolfgang Schuster

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