Are nested sections possible?
Greetings, Is it possible to have \starttext \startchapter Hey a chapter! \startsection something.one \startsection someting.one.one \startsection something.one.one.one \stopsection \stopsection \stopsection \stopchapter \stoptext render as: 1. Hey a chapter! 1.1 something.one 1.1.1 something.one.one 1.1.1.1 something.one.one.one Thanks, Mica
Hello, Normally for this purpose you’d use subsection, subsubsection etc … I guess. Best regards Joseph From: mica@silentumbrella.com Sent: Friday, March 11, 2016 9:08 AM To: ntg-context@ntg.nl Greetings, Is it possible to have \starttext \startchapter Hey a chapter! \startsection something.one \startsection someting.one.one \startsection something.one.one.one \stopsection \stopsection \stopsection \stopchapter \stoptext render as: 1. Hey a chapter! 1.1 something.one 1.1.1 something.one.one 1.1.1.1 something.one.one.one Thanks, Mica ___________________________________________________________________________________ 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 ___________________________________________________________________________________
On 03/11/2016 09:08 AM, mica@silentumbrella.com wrote:
Greetings,
Is it possible to have [...] render as:
1. Hey a chapter! 1.1 something.one 1.1.1 something.one.one 1.1.1.1 something.one.one.one
Sorry, Mica, but which is the gain in nesting sections (whether possible or not) over using subsections and subsubsections? I can hardly imagine the sense in the point you’re making. (Sorry, it must be my fault.) Let me know what I am missing. Best wishes, Pablo -- http://www.ousia.tk
Hi Pablo,
Sorry for the brevity of my original message, it is quite late.
I'm working on styling an XML dialect, where nesting can go, and often does quite deep, and several different section level elements can be allowed to nest within each other. If nested sections were possible, I wouldn't have to write code to try and figure out how deep a nested is; ConTeXt would know and would number the sections accordingly.
-m
On March 11, 2016 12:36:01 AM PST, Pablo Rodriguez
On 03/11/2016 09:08 AM, mica@silentumbrella.com wrote:
Greetings,
Is it possible to have [...] render as:
1. Hey a chapter! 1.1 something.one 1.1.1 something.one.one 1.1.1.1 something.one.one.one
Sorry, Mica, but which is the gain in nesting sections (whether possible or not) over using subsections and subsubsections?
I can hardly imagine the sense in the point you’re making. (Sorry, it must be my fault.)
Let me know what I am missing. Best wishes,
Pablo -- http://www.ousia.tk ___________________________________________________________________________________ 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 ___________________________________________________________________________________
On Fri, 11 Mar 2016 09:36:01 +0100
Pablo Rodriguez
Sorry, Mica, but which is the gain in nesting sections (whether possible or not) over using subsections and subsubsections?
I can hardly imagine the sense in the point you’re making. (Sorry, it must be my fault.)
Think about including source in another source, for example. Say one has an article that becomes a book, or gets included in a book, or the book gets parts. In the course of writing, one might decide to add an additional level of structure and not want to change all of the \start...\stop structure definitions. In fact, using fixed section, subsection, subsubsection is a bit antiquated, isn't it? Alan
Hello,
one more thing:
It would be nice to allow mixing:
- \section like commands (or \startsection ... \stopsection)
- AND \startsectionlevel ... \stopsectionlevel.
The main problem is that one may NEED to mix:
- (ancient) source files which use \section (deprecated) style
- with more versatile \start-\stopsectionlevel style in newer source files.
See the test attached - only the case 3 works universally with the \start-\stopstructurelevel;
any mixing of sectioning styles doesn't yield a desired result.
Best regards,
Lukas
On Sat, 12 Mar 2016 01:53:18 +0100, Alan BRASLAU
On Fri, 11 Mar 2016 09:36:01 +0100 Pablo Rodriguez
wrote: Sorry, Mica, but which is the gain in nesting sections (whether possible or not) over using subsections and subsubsections?
I can hardly imagine the sense in the point you’re making. (Sorry, it must be my fault.)
Think about including source in another source, for example.
Say one has an article that becomes a book, or gets included in a book, or the book gets parts. In the course of writing, one might decide to add an additional level of structure and not want to change all of the \start...\stop structure definitions.
In fact, using fixed section, subsection, subsubsection is a bit antiquated, isn't it?
Alan ___________________________________________________________________________________ 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 ___________________________________________________________________________________
-- Ing. Lukáš Procházka | mailto:LPr@pontex.cz Pontex s. r. o. | mailto:pontex@pontex.cz | http://www.pontex.cz Bezová 1658 147 14 Praha 4 Tel: +420 241 096 751 Fax: +420 244 461 038
Indeed, Hans, it would be nice to be able to nest sectionlevels within
a chapter...section... scheme (which is NOT depreciated, although
antiquated).
Currently, \startsectionlevel will by default start a chapter. One
would like it to start a section if located within a chapter, a
subsection, if located within a section, etc. This should be possible.
Alan
On Mon, 14 Mar 2016 09:05:49 +0100
Procházka Lukáš Ing.
Hello,
one more thing:
It would be nice to allow mixing:
- \section like commands (or \startsection ... \stopsection) - AND \startsectionlevel ... \stopsectionlevel.
The main problem is that one may NEED to mix:
- (ancient) source files which use \section (deprecated) style - with more versatile \start-\stopsectionlevel style in newer source files.
See the test attached - only the case 3 works universally with the \start-\stopstructurelevel; any mixing of sectioning styles doesn't yield a desired result.
Best regards,
Lukas
On Sat, 12 Mar 2016 01:53:18 +0100, Alan BRASLAU
wrote: On Fri, 11 Mar 2016 09:36:01 +0100 Pablo Rodriguez
wrote: Sorry, Mica, but which is the gain in nesting sections (whether possible or not) over using subsections and subsubsections?
I can hardly imagine the sense in the point you’re making. (Sorry, it must be my fault.)
Think about including source in another source, for example.
Say one has an article that becomes a book, or gets included in a book, or the book gets parts. In the course of writing, one might decide to add an additional level of structure and not want to change all of the \start...\stop structure definitions.
In fact, using fixed section, subsection, subsubsection is a bit antiquated, isn't it?
Alan ___________________________________________________________________________________ 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 ___________________________________________________________________________________
-- Alan Braslau CEA DSM-IRAMIS-SPEC CNRS UMR 3680 Orme des Merisiers 91191 Gif-sur-Yvette cedex FRANCE tel: +33 1 69 08 73 15 fax: +33 1 69 08 87 86 mailto:alan.braslau@cea.fr
On 03/15/2016 05:54 PM, Alan BRASLAU wrote:
Indeed, Hans, it would be nice to be able to nest sectionlevels within a chapter...section... scheme (which is NOT depreciated, although antiquated).
Oooh, shiny! In the TEI community, there are also people who repeat that having <div>s all the way down is modern, and <div1><div2> etc. is old hat. Well, I like to think about the way I structure my texts before I write them. I'm old fashioned that way... But seriously: by all means, let's allow nesting. But don't let anyone tell you that explicit names are "antiquated." They make TeX or xml source documents so much more readable! And when you have to retrace five levels of \startsectionlevels because you want to change the structure of your document, you will rue the day you abandoned proper names. Thomas
On Tue, 15 Mar 2016 18:10:27 +0100
"Thomas A. Schmitz"
But don't let anyone tell you that explicit names are "antiquated." They make TeX or xml source documents so much more readable! And when you have to retrace five levels of \startsectionlevels because you want to change the structure of your document, you will rue the day you abandoned proper names.
When you want to change the structure of your document when using structure levels, all that you need do is add or subtract a level of nesting. With named levels, it is easy to create complicated documents that jump around in level, which would be pretty messy. What a nightmare it would be to add or subtract a named structure level in a complicated document. This being said, I still mostly use named structure levels myself, as old habits are hard to change (but don't tell Hans this!). Alan
On 3/15/2016 8:09 PM, Alan BRASLAU wrote:
On Tue, 15 Mar 2016 18:10:27 +0100 "Thomas A. Schmitz"
wrote: But don't let anyone tell you that explicit names are "antiquated." They make TeX or xml source documents so much more readable! And when you have to retrace five levels of \startsectionlevels because you want to change the structure of your document, you will rue the day you abandoned proper names.
When you want to change the structure of your document when using structure levels, all that you need do is add or subtract a level of nesting. With named levels, it is easy to create complicated documents that jump around in level, which would be pretty messy.
on the other hand, when you look at a piece of coded document you no longer know if you're in an important chapter or unimportant subsubsubsubsubsubsection so, in the end it all boils down to circumstances and usage which is why we have several methods
What a nightmare it would be to add or subtract a named structure level in a complicated document.
This being said, I still mostly use named structure levels myself, as old habits are hard to change (but don't tell Hans this!).
ha, well, if i remember right this nested anonymous sectioning was added on your request .. so it is now one of those orphaned features anyway, i tend to replace \chapter{foo} by \startchapter[title=foo] \stopchapter but at a much lower level keep using \subsubsection and alike (also because then with chapters one can more conveniently set other properties) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On 3/15/2016 6:10 PM, Thomas A. Schmitz wrote:
On 03/15/2016 05:54 PM, Alan BRASLAU wrote:
Indeed, Hans, it would be nice to be able to nest sectionlevels within a chapter...section... scheme (which is NOT depreciated, although antiquated).
Oooh, shiny! In the TEI community, there are also people who repeat that having <div>s all the way down is modern, and <div1><div2> etc. is old hat. Well, I like to think about the way I structure my texts before I write them. I'm old fashioned that way...
But seriously: by all means, let's allow nesting. But don't let anyone tell you that explicit names are "antiquated." They make TeX or xml source documents so much more readable! And when you have to retrace five levels of \startsectionlevels because you want to change the structure of your document, you will rue the day you abandoned proper names.
they are not antiquated at all the main benefit from using \startchapter ... \stopchapter instead of \chapter is that we then know where something end which is handy when you want to finish things before starting something new (esp when grouping is involved it can get messy otherwise) ... it's also easier on the export Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On 03/12/2016 01:53 AM, Alan BRASLAU wrote:
On Fri, 11 Mar 2016 09:36:01 +0100 Pablo Rodriguez wrote:
[...] I can hardly imagine the sense in the point you’re making. (Sorry, it must be my fault.)
Think about including source in another source, for example.
Say one has an article that becomes a book, or gets included in a book, or the book gets parts. In the course of writing, one might decide to add an additional level of structure and not want to change all of the \start...\stop structure definitions.
In fact, using fixed section, subsection, subsubsection is a bit antiquated, isn't it?
Many thanks for your reply, Alan. The usual suspect was found guilty: it was my fault not realizing that fixed sectioning commands are outdated. Pablo -- http://www.ousia.tk
You probably want automatic levels. Take a look at strc-lev.mkvi. \startsectionlevel[title=outer] \startsectionlevel[title=inner] \startsectionlevel[title=yet another] \stopsectionlevel \stopsectionlevel \stopsectionlevel If you need more levels than the default (which ranges from chapter to subsubsubsubsection), you may need to define your own using \definesectionlevels. Best regards Andreas Am 2016-03-11 09:08, schrieb mica@silentumbrella.com:
Greetings,
Is it possible to have
\starttext
\startchapter Hey a chapter! \startsection something.one \startsection someting.one.one \startsection something.one.one.one \stopsection \stopsection \stopsection
\stopchapter
\stoptext
render as:
1. Hey a chapter! 1.1 something.one 1.1.1 something.one.one 1.1.1.1 something.one.one.one
Thanks, Mica
On 3/11/2016 9:08 AM, mica@silentumbrella.com wrote:
Greetings,
Is it possible to have
\starttext
\startchapter Hey a chapter! \startsection something.one \startsection someting.one.one \startsection something.one.one.one \stopsection \stopsection \stopsection
\stopchapter
\stoptext
render as:
1. Hey a chapter! 1.1 something.one 1.1.1 something.one.one 1.1.1.1 something.one.one.one
do you mean something like sections/levels-001.tex sections/levels-002.tex in the test suite? \starttext \startstructurelevel [title=first top level] \startstructurelevel [title=first lower level] \startstructurelevel [title=second lower level] \startstructurelevel [title=third lower level] test \stopstructurelevel \stopstructurelevel \stopstructurelevel \startstructurelevel [title=first lower level] \startstructurelevel [title=second lower level] \startstructurelevel [title=third lower level] test \stopstructurelevel \stopstructurelevel \stopstructurelevel \stopstructurelevel \stoptext and \starttext \startstructurelevel [title=first top level] \startstructurelevel [title=first lower level] \startstructurelevel [title=second lower level] \startstructurelevel [title=third lower level] test \stopstructurelevel \stopstructurelevel \stopstructurelevel \startstructurelevel [title=first lower level] \startstructurelevel [title=second lower level] \startstructurelevel [title=third lower level] test \stopstructurelevel \stopstructurelevel \stopstructurelevel \stopstructurelevel \stoptext ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Yes that looks like what I want. Thank you!
On March 11, 2016 1:43:27 AM PST, Hans Hagen
On 3/11/2016 9:08 AM, mica@silentumbrella.com wrote:
Greetings,
Is it possible to have
\starttext
\startchapter Hey a chapter! \startsection something.one \startsection someting.one.one \startsection something.one.one.one \stopsection \stopsection \stopsection
\stopchapter
\stoptext
render as:
1. Hey a chapter! 1.1 something.one 1.1.1 something.one.one 1.1.1.1 something.one.one.one
do you mean something like
sections/levels-001.tex sections/levels-002.tex
in the test suite?
\starttext
\startstructurelevel [title=first top level]
\startstructurelevel [title=first lower level] \startstructurelevel [title=second lower level] \startstructurelevel [title=third lower level] test \stopstructurelevel \stopstructurelevel \stopstructurelevel
\startstructurelevel [title=first lower level] \startstructurelevel [title=second lower level] \startstructurelevel [title=third lower level] test \stopstructurelevel \stopstructurelevel \stopstructurelevel
\stopstructurelevel
\stoptext
and \starttext
\startstructurelevel [title=first top level]
\startstructurelevel [title=first lower level] \startstructurelevel [title=second lower level] \startstructurelevel [title=third lower level] test \stopstructurelevel \stopstructurelevel \stopstructurelevel
\startstructurelevel [title=first lower level] \startstructurelevel [title=second lower level] \startstructurelevel [title=third lower level] test \stopstructurelevel \stopstructurelevel \stopstructurelevel
\stopstructurelevel
\stoptext
----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | 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 ___________________________________________________________________________________
participants (9)
-
Alan BRASLAU
-
Andreas Schneider
-
Hans Hagen
-
josephcanedo@gmail.com
-
Mica Semrick
-
mica@silentumbrella.com
-
Pablo Rodriguez
-
Procházka Lukáš Ing.
-
Thomas A. Schmitz