From Wiki
< Command
Revision as of 14:17, 6 September 2020 by Taco (talk | contribs) (Created page with "Documentation for \startdocument ... \stopdocument")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

\startdocument ... \stopdocument


The environment \startdocument ... \stopdocument adds option processing to \starttext.


\startdocument[...][...=...,...] ... \stopdocument
...=...,...inherits from \setupdocument


Sometimes it makes sense to have options available at the time of \starttext, for example to typeset a title page. \startdocument allows you to do this either directly by passing arbitrary keys and values to the command itself, or via \setupdocument.

\startdocument by default makes use of two setups: document:start and document:stop.

You can use document:start to construct a title page. You can fetch the passed values by using the \documentvariable command.


Example 1

% \starttext \stoptext %% needed to fool the wiki

\startsetups document:start

\startdocument[title={Be this the Verse}]

    Start of the document ...


Elaborate example

   [documentauthor] % name of internal variables
    command=yes, % Create \defineauthor
    style=yes,   % Create \useauthorstyleandcolor
    setup=list,  % Create \setupauthor


\startsetups document:start

\startsetups document:stop
     % If you want to place something at the end of a document

\defineauthor[john][name={John Doe}, email={}, affiliation={TUG}]
\defineauthor[jill][name={Jill Hough}, email={}, color=red]

     [title={Be this the Verse},

    Start of the document ...

This example is based on Abstracting an author list on Stack Exchange.


See also

Help from ConTeXt-Mailinglist/Forum

All issues with: