Automatically add \stopXX when a new \startXX of same type occurs
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
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 -----------------------------------------------------------------
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 \start<whatever> Mojca
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 \start<whatever>
In TexShop we have something similar: "Close Current Environment". Works for MkIV, too. (by request adapted for ConTeXt users ;o) Steffen
participants (4)
-
Charles
-
Hans Hagen
-
Mojca Miklavec
-
Steffen Wolfrum