Re: [NTG-context] Removing Introduction section number
...or preventing startbodymatter from making new page. -- Best Regards, Vyatcheslav Yatskovsky
Vyatcheslav Yatskovsky wrote:
...or preventing startbodymatter from making new page.
\setupsectionblock[bodypart][page=no] or \setupsectionblock[frontpart][page=no] (I don't remember whether this is executed at the end or the begin of the block). Best wishes, Taco
On Monday 14 June 2010 08:52:16 Taco Hoekwater wrote:
Vyatcheslav Yatskovsky wrote:
...or preventing startbodymatter from making new page.
\setupsectionblock[bodypart][page=no]
or
\setupsectionblock[frontpart][page=no]
(I don't remember whether this is executed at the end or the begin of the block).
This is much more elegant than \subject{Whatever} \writelist[section]{}{Whatever} repeating "Whatever" twice. I will repeat here the suggestion, seconded by others, of parsing \section[number=no]{Whatever} to be used notably within \startbodypart...\stopbodypart Note that an unnumbered \section vs. \subject do not fill exactly the same need. Also, while on the subject of sectionblocks, there should be some way of defining \startsectionblockenvironment[bodypart] \setuplist[chapter][label=yes] \stopsectionblockenvironment Presently, this does not work, and simply setting \setuplist[chapter][label=yes] will, of course, put the label ("Chapter") everywhere in the table of contents including frontmatter and backmatter, that is if one also redefines \setuplabeltext[chapter=Chapter ] % with trailing space as this is, curiously, blank by default. Alan
Alan BRASLAU wrote:
On Monday 14 June 2010 08:52:16 Taco Hoekwater wrote:
Vyatcheslav Yatskovsky wrote:
...or preventing startbodymatter from making new page. \setupsectionblock[bodypart][page=no]
or
\setupsectionblock[frontpart][page=no]
(I don't remember whether this is executed at the end or the begin of the block).
This is much more elegant than \subject{Whatever} \writelist[section]{}{Whatever} repeating "Whatever" twice.
I will repeat here the suggestion, seconded by others, of parsing \section[number=no]{Whatever} to be used notably within \startbodypart...\stopbodypart Note that an unnumbered \section vs. \subject do not fill exactly the same need.
Actually, I almost never use \writetolist myself, but then I usually have special sectioning commands (in larger documents): \definehead[Usection][section] \setuphead[Usection][number=no] \Usection{...} This could be wrapped in a macro if you want key=value parsing. Best wishes, Taco
On Monday 14 June 2010 09:54:30 Taco Hoekwater wrote:
Actually, I almost never use \writetolist myself, but then I usually have special sectioning commands (in larger documents):
\definehead[Usection][section] \setuphead[Usection][number=no]
\Usection{...}
This could be wrapped in a macro if you want key=value parsing.
I presently use this myself, as a solution to what I consider to be a missing feature. It is convenient, but is not generally elegant either. Again, \section[number=no]{...} is quite natural and intuitive. Alan
Alan BRASLAU wrote:
On Monday 14 June 2010 09:54:30 Taco Hoekwater wrote:
Actually, I almost never use \writetolist myself, but then I usually have special sectioning commands (in larger documents):
\definehead[Usection][section] \setuphead[Usection][number=no]
\Usection{...}
This could be wrapped in a macro if you want key=value parsing.
I presently use this myself, as a solution to what I consider to be a missing feature. It is convenient, but is not generally elegant either. Again, \section[number=no]{...} is quite natural and intuitive.
FWIW, I agree with you. Best wishes, Taco
On 14-6-2010 9:39, Alan BRASLAU wrote:
\section[number=no]{Whatever}
this will not happen as the first argument is optional and reserved for a cross reference 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 Mon, Jun 14 2010, Hans Hagen wrote:
\section[number=no]{Whatever}
this will not happen as the first argument is optional and reserved for a cross reference
In mkiv, can we consider the \section commands as obsolete, since we have now \startsection ... \stopsection ? Cheers, Peter -- Contact information: http://pmrb.free.fr/contact/
On 14-6-2010 12:14, Peter Münster wrote:
On Mon, Jun 14 2010, Hans Hagen wrote:
\section[number=no]{Whatever}
this will not happen as the first argument is optional and reserved for a cross reference
In mkiv, can we consider the \section commands as obsolete, since we have now \startsection ... \stopsection ?
well, not obsolete as it's convenient but it will definitely not be extended / changed 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 -----------------------------------------------------------------
I do not see \startsection ... \stopsection on the command reference wiki ..
What are the benefits of this approach?
On Mon, Jun 14, 2010 at 10:21 AM, Hans Hagen
On 14-6-2010 12:14, Peter Münster wrote:
On Mon, Jun 14 2010, Hans Hagen wrote:
\section[number=no]{Whatever}
this will not happen as the first argument is optional and reserved for a cross reference
In mkiv, can we consider the \section commands as obsolete, since we have now \startsection ... \stopsection ?
well, not obsolete as it's convenient but it will definitely not be extended / changed
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 ___________________________________________________________________________________
On Monday 14 June 2010 11:52:28 Hans Hagen wrote:
On 14-6-2010 9:39, Alan BRASLAU wrote:
\section[number=no]{Whatever}
this will not happen as the first argument is optional and reserved for a cross reference
Hans
Yes, of course! How about \section[reference][number=no]{Whatever}? The following is a bit verbose. It is related, but is more general than the subject of unnumbered sections... I have to say that I am now a bit confused about the use of arguments in ConTeXt. In LaTeX, optional arguments are contained within [] and required arguments are grouped within {}. However, in ConTeXt, the situation is not quite so clear. Take \section[reference]{Title} for example. Here, the reference is optional and the Title is required, so a title-less section would be \section{}. This is somewhat sane, even though one may well use sections without titles. Contrast this with \cite (I choose this example as I just figured-out that its misuse was the cause of some obscure problems in a big project). We have \cite[key], rather then \cite{key} as in LaTeX. Is this because we may also have \cite[authoryear][key]? Of course, the key is not optional as one can hardly imagine using \cite without some sort of key, so one might expect usage: "as remarked by \cite[authoryear]{Einstein1905}." My error was to have reflexively used \cite{key}, and this sort-of worked so I did not pay it any attention. However, here and there in my document, references, for example \chapter[ImportantStuff]{Important stuff} were broken, with no obvious reason. After correcting my use of \cite[key], other references were suddenly fixed. Alan
Hi Alan, Alan BRASLAU wrote:
I have to say that I am now a bit confused about the use of arguments in ConTeXt.
The general rule is quite straightforward: * arguments in {} pairs are typeset material * arguments in [] are setup instructions and metadata Whether or not an argument is optional has nothing to do with the used delimiters. Best wishes, Taco
On Monday 14 June 2010 13:17:54 Taco Hoekwater wrote:
Hi Alan,
Alan BRASLAU wrote:
I have to say that I am now a bit confused about the use of arguments in ConTeXt.
The general rule is quite straightforward:
* arguments in {} pairs are typeset material * arguments in [] are setup instructions and metadata
Whether or not an argument is optional has nothing to do with the used delimiters.
Quite logical and straightforward. It is useful to read the manual (section 1.3): "A command is often followed by setups or by text. Setups are placed between brackets ([]). The scope or range of the command, the text acted upon, is placed between curly brackets ({})." ... I see that my reflexes have been spoiled by years of practice with LaTeX - old habits die hard. Lamport (section 2.5): "Command arguments are enclosed in curly braces { and }, except for optional arguments, which are enclosed in square brackets [ and ]." So I added a paragraph to http://wiki.contextgarden.net/From_LaTeX_to_ConTeXt#Command_syntax Alan
On 14-6-2010 3:40, Alan BRASLAU wrote:
Quite logical and straightforward.
there are few exeptions where an {} is also accepted which is handy when used in say \setupheadertexts[...]; for instance \useMPgraphic takes a {} instead of a [] but to some extend you may see them as low level commands 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 -----------------------------------------------------------------
\unprotect % already set: \setupstructurehead[chapter][appendixlabel=appendix] % % but was not yet hooked into: \unexpanded\def\fullstructureheadnumber {\edef\currentstructureheadlabeltag{\currentstructureblock\c!label}% \labeltexts{\structureheadparameter\currentstructureheadlabeltag}{\structurenumber}} \protect \starttext \setuplabeltext[chapter=Chapter ] \setuplabeltext[appendix=Appendix ] \placelist[chapter][criterium=text] \startfrontmatter \chapter{Not numbered but in list} \title{Not numbered and not in list} \stopfrontmatter \startbodymatter \chapter{Numbered but in list} \title{Unnumbered and not in list} \stopbodymatter \startappendices \chapter{Numbered but in list} \title{Unnumbered and not in list} \stopappendices \stoptext for other tweaking using \definehead[xxx][section] ... is more suitable than local tweaking as one often wants to inherit features 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 -----------------------------------------------------------------
participants (6)
-
Alan BRASLAU
-
Hans Hagen
-
John Haltiwanger
-
Peter Münster
-
Taco Hoekwater
-
Vyatcheslav Yatskovsky