# Re: [NTG-context] Adding custom key/value pairs

On Mon, Apr 14, 2008 at 1:20 PM, Taco Hoekwater <[EMAIL PROTECTED]> wrote:
> Wolfgang Schuster wrote:
> >
> > Why not, I have nothing against a few predefined title pages layouts.
>
> Somewhat related: it would be nice if there was some common code for
> titles (books as well as articles). The Maps module currently defines
> an article in this fashion:
>
>    \starttext
>    \startArticle
>       [Title=...,
>        Author=...,
>        RunningAuthor=...] % etc. etc.
>
>    \startAbstract
>    ... abstract ...
>    \stopAbstract
>
>    \startKeywords
>    ... comma-separated keywords ...
>    \stopKeywords
>
>    ... body ...
>
>    \stopArticle
>    \stoptext

I never thought of them, good to have someone mention this.

> Obvious weak point: the Abstract / Keywords are too late to influence
> typesetting of the title (page). Of course that could be fixed by using
> named buffers and/or an explicit \maketitle-like command.

Something like:

\def\startabstract
{\dostartbuffer[abstract][startabstract][stopabstract]}

\startsetups titlepage

\getbuffer[abstract]

\stopsetups

\def\starttitlepage
{\begingroup
\placetitle}

\def\stoptitlepage
{\setups{titlepage}
\endgroup}

\setuptitle
[author=...,
title=...]

or

\starttitlepage
[author=...,
title=...]

\startabstract
...
\stopabstract

...

\stoptitlepage

> Anyway, the maps module contains all the code to do everything. And
> the same is true for the TUG module. And for quite a few others I have
> laying around. Lots of duplicate code all over, so a common framework
> would be great. I've been meaning to write one for a long time, but
> somehow I never quite get around to actually doing it.

To many ideas and too less time and motivation :-)

> Just saying this to let you know that I would really welcome a module
> with commands like \setuptitle, \definetitle, and \placetitle.

Greetings
Wolfgang
___________________________________________________________________________________