On Jul 4, 2012, at 1:29 PM, Peter Münster wrote:
> On Wed, Jul 04 2012, Hans Hagen wrote:
>
>> no, mixing this way is asking for troubles, if not now, than maybe in the
>> future
>>
>> just use \section
>
> Yes, but isn't \startsection the recommended method for the future and
> needed for XML output?

XML documents should form a tree, so a structure like

\startA % <A>
\startB % <B>
\stopA % </A>
\stopB % </B>

won't translate to XML.

Grouping in TeX follows the same restrictions, and \start... and \stop... 
behave like \begingroup and \endgroup.  The \stop... is supposed to restore the 
state before the corresponding \start... (at least I assume so -- \endgroup 
works that way).  One cannot stop A in the middle of B and return to the state 
before \startA without also stopping B.  So one should put \stopB before 
\stopA, not after it.

Have you considered structuring your example like this?:

\starttext
\startsection[title=Tufte]
\startcolumns[n=2]
\input tufte
\stopcolumns
\stopsection
\startsection[title=Tufte and Knuth]
\startcolumns[n=2]
\switchtobodyfont[big] % Note that the font size is switched back after 
\stopcolumns
\input tufte
\stopcolumns
\input knuth
\startcolumns[n=2]
\input tufte
\stopcolumns
\stopsection
\stoptext

XML seems a nice way for machines to deal with data.  But it's not a very human 
way to speak.  I mean, if I write "\section{One}...\section{Two}" isn't it 
obvious that section One ends when section Two begins?  Why should I have to 
write \endsection, when the machine can do the bookkeeping for me?  The 
start/stop mechanism is nice as an option, if you plan to produce an XML 
document from ConTeXt.  However the XML translator could implement 'if not 
first section then "</section><section>" else "<section>"' and add "if 
in_a_section then "</section>"' when \stoptext is reached.

________________________________

This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to