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

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

Reply via email to