[NTG-context] Automatically add \stopXX when a new \startXX of same type occurs

2011-10-07 Thread Charles

Hi,

I am using the \startsection (\startparagraph ...) to structure my 
document and export it to XML. But for all the environments, for each 
\startsection I have to put a \stopsection even if I start a new section 
right after.


Is it be possible to automatically stop the previous section when a new 
one is started in the XML output?


Thanks

Charles
___
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
___


Re: [NTG-context] Automatically add \stopXX when a new \startXX of same type occurs

2011-10-07 Thread Hans Hagen

On 7-10-2011 18:24, Charles wrote:

Hi,

I am using the \startsection (\startparagraph ...) to structure my
document and export it to XML. But for all the environments, for each
\startsection I have to put a \stopsection even if I start a new section
right after.

Is it be possible to automatically stop the previous section when a new
one is started in the XML output?


\chapter does something like that behind the screens but using 
\startchapter without \stop's is a real bad idea in the perspective of 
structure (and unless you have thousands of sections and hardly any text 
not saving much typing either)


Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
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
___


Re: [NTG-context] Automatically add \stopXX when a new \startXX of same type occurs

2011-10-07 Thread Mojca Miklavec
On Fri, Oct 7, 2011 at 18:24, Charles wrote:
 Hi,

 I am using the \startsection (\startparagraph ...) to structure my document
 and export it to XML. But for all the environments, for each \startsection I
 have to put a \stopsection even if I start a new section right after.

Configure your text editor.

In TextMate for example there are two ways to easily accomplish that:
1.) type env-[tab]-type paragraph (and both start and stop
clauses are completed)
2.) after you are done with typing, press alt-apple-. which closes the
last open \startwhatever

Mojca
___
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
___


Re: [NTG-context] Automatically add \stopXX when a new \startXX of same type occurs

2011-10-07 Thread Steffen Wolfrum

Am 07.10.2011 um 20:24 schrieb Mojca Miklavec:

 On Fri, Oct 7, 2011 at 18:24, Charles wrote:
 Hi,
 
 I am using the \startsection (\startparagraph ...) to structure my document
 and export it to XML. But for all the environments, for each \startsection I
 have to put a \stopsection even if I start a new section right after.
 
 Configure your text editor.
 
 In TextMate for example there are two ways to easily accomplish that:
 1.) type env-[tab]-type paragraph (and both start and stop
 clauses are completed)
 2.) after you are done with typing, press alt-apple-. which closes the
 last open \startwhatever


In TexShop we have something similar: Close Current Environment. Works for 
MkIV, too.
(by request adapted for ConTeXt users ;o)

Steffen
___
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
___