[NTG-context] the closing bracket (structuring syntax)

Aditya Mahajan adityam at umich.edu
Thu Aug 10 22:47:34 CEST 2006

On Thu, 10 Aug 2006, Steffen Wolfrum wrote:

> Hi,
> in XML and alike there is a concept of dedicated start/stop in
> formatting:
> <begin heading> ... <end heading >
> <begin footnote> ... <end footnote >
> <begin italic> ... <end italic>
> But in ConTeXt/TeX we have always the same closing syntax "}". That
> makes reading the code not easier.

You can always define your own startstop.

\definestartstop[italic][before={\bgroup \it},after={\egroup}]

and then do

  This is italic

When a command takes an optional agrument, you can do use something like 



You can make such definitions of all your frequently used environments 
(or, if you prefer, write in XML and let ConTeXt handle XML).

> Is there a workaround to define the closing more precisely (like the
> examples above),
> so that finding a "}" in a ConTeXt source lets me distinguish what
> it's about?

There are \bgroup...\egroup which is same as {...} for all practical 


More information about the ntg-context mailing list