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