![](https://secure.gravatar.com/avatar/deafb770192f17155bb57bf191022822.jpg?s=120&d=mm&r=g)
Hello, I was wondering why ConTeXt doesn't use a syntax like \startsomething \stopsomething for chapters, sections, etc. So I had a look on Google and found this:
At 03:46 PM 6/21/2002 +0200, Giuseppe Bilotta wrote:
one of the main features of both ConTeXt and LaTeX over plain TeX is their heavily "object-oriented" approach to source writing, giving a large set of useful tools to build well-structured documents.
There is though one aspect which has not been addressed in either: structuring of the sections. One still uses \chapter, \section, \subsection etc to denote the start of any of these, while structured writing would call for \startchapter ... \stopchapter, \startsection ... \stopsection etc.
My proposal is to switch to such a method, while still retaining compatibility with the old-style sectioning (maybe we can use some flag like the one used to left left/right alignment use the _correct_ term --what was the switch name?).
actually, this is on my to do list, for most of the project that we run currently we use this approach since it gives you the options
(1) to skip a chapter / section (2) to attach hooks to the end-of-some-section
How should it work:
\startchapter[optional reference name]
Possible stuff before the title (e.g. an epigraph)
\title{Title of the chapter} Optional commands to set alternative forms of the title (see below)
no, just \startchapter[ref]{title} is ok, since i don't want to pick up the title separately (imagine that you want \startchapter to trigger a complex title page
also, we currently test (play with) some mechanism to have section (or whatever) dependent variables, thereby introducing more convenient ways to tune typo behaviour.
* easy way to set different titles for ToCs, running heads, (PDF)
bookmarks etc. Consider the following hierarchy of titles:
title listtitle markingtitle bmtitle
that's for variables (since here we also have things like several graphics to be used in typesetting the chapter page)
write anything to the .tuo file; this ought to be done by the \stop<section-name> command, which would save all of them together with the appropriate counter values and beginning/ending page.
hm, i'm not sure if i like that
* easy way to put things before the title (e.g. an epigraph) while still within the structure of the section.
* also comes from the above: currently, when using the /XYZ method for PDF references, link targets end out-of-the-window because the TeX cohordinate used is that of the baseline. This means that the visible part of the page does not include the target reference (which is rather uncomfortable). Instead, with the new approach the mark could be set "right before everything else, but still within the correct structure", with optimal PDF navigation.
that is a whole different matter, (1) output format/driver dependent and (2) can handled now by moving things around and (3) we don't want those funny nodes to screw up the spacing [actually, since i never use that xyz way of viewing docs [too inconstent auto scaling in viewers] i never felt the need to look into it; maybe something for a cold winter night]
Hans, do you think you can implement this easily?
the \start-\stop thing will certainly be there I see you planned to include the \start-\stop thing in ConTeXt, I even understand that you already implemented this method.
Did you change your mind or is it something you just don't have time to do? Would it be possible to retrieve the macro you use? I think this kind of feature would really be an improvement since it allows to learn faster. Thanks a lot. -- Gilles Grégoire -- Gilles Grégoire
![](https://secure.gravatar.com/avatar/565476157eb3895a9c928ffce26d988d.jpg?s=120&d=mm&r=g)
Gilles Grégoire wrote:
Hello, I was wondering why ConTeXt doesn't use a syntax like \startsomething \stopsomething for chapters, sections, etc.
So I had a look on Google and found this:
I have usually have something like this in my environmentfile: \def\startchapter[#1]% {\getparameters[Chapter][#1]\chapter{\ChapterTitle}} \def\stopchapter{} Does that help? Cheers, Taco
![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
Gilles Grégoire wrote:
Hello, I was wondering why ConTeXt doesn't use a syntax like \startsomething \stopsomething for chapters, sections, etc. So I had a look on Google and found this:
I see you planned to include the \start-\stop thing in ConTeXt, I even understand that you already implemented this method.
Did you change your mind or is it something you just don't have time to do? Would it be possible to retrieve the macro you use?
I think this kind of feature would really be an improvement since it allows to learn faster.
i haven't had time for that yet but it will happen Hans
![](https://secure.gravatar.com/avatar/deafb770192f17155bb57bf191022822.jpg?s=120&d=mm&r=g)
Selon Hans Hagen
Gilles Grégoire wrote:
Hello, I was wondering why ConTeXt doesn't use a syntax like \startsomething \stopsomething for chapters, sections, etc. So I had a look on Google and found this:
I see you planned to include the \start-\stop thing in ConTeXt, I even understand that you already implemented this method.
Did you change your mind or is it something you just don't have time to do? Would it be possible to retrieve the macro you use?
I think this kind of feature would really be an improvement since it allows
to
learn faster.
i haven't had time for that yet but it will happen
Hans Ok, thanks.
The macro proposed by Taco could be a good replacement for instance, but an important issue is also to use the \stopsection command. -- Gilles Grégoire
participants (4)
-
Gilles Grégoire
-
Hans Hagen
-
schaouette@free.fr
-
Taco Hoekwater