ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Learning ConTeXt, typical hurdle
@ 2005-03-10 13:34 Gerben Wierda
  2005-03-10 15:06 ` Patrick Gundlach
  0 siblings, 1 reply; 10+ messages in thread
From: Gerben Wierda @ 2005-03-10 13:34 UTC (permalink / raw)


Maybe I should start a blog somewhere...

Anyway, I have started my "conversion to ConTeXT" project.

So, I used the fiee perl script to set up my project. Then I started to
fill things in. Everything is still in one directory (I do not understand
directory searching in ConTeXt yet and I haven't seen a example for a book
project).

So, I have a project file:

===============================
% output=pdf interface=en
\usemodule[bib]
\startproject project_teoada
\environment env_teoada

%  \showlayout
%  \showgrid
%  \showbodyfontenvironment

	\product prd_book
\stopproject
===============================

A product file:

===============================
\startproduct prd_book
\project project_teoada

\startfrontmatter
	\component c_introduction
\stopfrontmatter
	\component c_chapter1
	\component c_chapter2
	\component c_chapter3
	\component c_chapter4
	\component c_chapter5
	\component c_chapter6
	\component c_chapter7
\startbackmatter
	\component c_appendixa
	\component c_appendixb
\stopbackmatter
\stopproduct
===============================

I defined a description environment to replace LaTeX's description. In the
environment file:
===============================
\startenvironment env_teoada
\project project_teoada

\definedescription [description]
	[location=hanging, margin=standard, headstyle=bold]
\definestartstop [descriptions] [before=\blank\startpacked,
after=\stoppacked\blank]

\stopenvironment
===============================

And I put some info in c_introduction.tex. There I used the description
thingy:

===============================
\startcomponent c_introduction
\product prd_book
\project project_teoada

\starttext
\chapter[h:guide]{Guide}

\startdescriptions
\description{Chapter \in[h:ch1]} Bla bla
\description{Chapter \in[h:ch2]} Bla bla
\stopdescriptions

\stoptext

\stopcomponent
===============================

Now, this fails. Why? I was completely stumped. I get an error message I
do not understand:

references      : unknown reference [][h:ch2]
! Extra }, or forgotten \endgroup.
\stopdescriptions ->\dostopattributes \egroup
                                              \getvalue {\??be
descriptions\...
<argument> Bla bla \stopdescriptions
                                     \@@stopdescription
{description}\stoptext

\dodowithpar ...cription}[]{Chapter \in [h:ch2]}#1
                                                  \@@stopdescription
{descri...
l.14

? x

Now what turns out to solve this? Empty lines before \description and
\stopdescriptions

Though I like ConTeXt if I look at certain design aspects, behaviour that
depends on whitespace before a command frightens me.

G

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

end of thread, other threads:[~2005-03-14 10:28 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-10 13:34 Learning ConTeXt, typical hurdle Gerben Wierda
2005-03-10 15:06 ` Patrick Gundlach
2005-03-10 16:09   ` Gerben Wierda
2005-03-10 17:05     ` Patrick Gundlach
2005-03-13 22:27     ` h h extern
2005-03-14  6:44       ` Gerben Wierda
2005-03-14  8:32         ` Hans Hagen
2005-03-14 10:28           ` Gerben Wierda
2005-03-10 17:52   ` Willi Egger
2005-03-13 21:42   ` h h extern

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