Hi, I gather the \nomarking function has been removed from MKIV. All I can find out about this is a note on the Wiki, towards the end of http://wiki.contextgarden.net/MkIV_Differences Unfortunately I don't understand the example given. What I want is to replace things like \chapter{Short Title \nomarking{Rest Of Title}} ....so that "Short Title Rest Of Title" appears as the chapter title, but just "Short Title" appears in the TOC, PDF bookmarks and footers. Thanks, -- John Devereux
On Tue, Jun 29 2010, John Devereux wrote:
....so that "Short Title Rest Of Title" appears as the chapter title, but just "Short Title" appears in the TOC, PDF bookmarks and footers.
\setupinteraction[state=start] \placebookmarks[all] \setupfootertexts[chapter] \starttext \completecontent \startchapter[title=long, list=short, bookmark=bookmark, marking=footer] bla \stopchapter \stoptext Cheers, Peter -- Contact information: http://pmrb.free.fr/contact/
Peter Münster
On Tue, Jun 29 2010, John Devereux wrote:
....so that "Short Title Rest Of Title" appears as the chapter title, but just "Short Title" appears in the TOC, PDF bookmarks and footers.
\setupinteraction[state=start] \placebookmarks[all] \setupfootertexts[chapter] \starttext \completecontent \startchapter[title=long, list=short, bookmark=bookmark, marking=footer] bla \stopchapter \stoptext
Cheers, Peter
Great, thanks Peter, that works and at least gets me going. Of course I now how to repeat the short bit 4 times... -- John Devereux
On Tuesday 29 June 2010 19:33:55 Peter Münster wrote:
On Tue, Jun 29 2010, John Devereux wrote:
....so that "Short Title Rest Of Title" appears as the chapter title, but just "Short Title" appears in the TOC, PDF bookmarks and footers.
\setupinteraction[state=start] \placebookmarks[all] \setupfootertexts[chapter] \starttext \completecontent \startchapter[title=long, list=short, bookmark=bookmark, marking=footer] bla \stopchapter \stoptext
Cheers, Peter
Three points: (1) \setupinteraction [state=start,option=bookmark,contrastcolor=interactioncolor] \setupinteractionscreen [option=bookmark] \placebookmarks [part,chapter,section,subsection] [part,chapter,section] \starttext \completecontent \startchapter [title={First chapter},list={First}] text̛̛ \stopchapter \stoptext Here, the long title gets placed by default in the bookmarks, whereas one probably wants the short title there. Of course, one can use "bookmark={First}", but this might be redundant and thus is not very elegant. An alternative might be to use "bookmark=list" but this, of course, yields "list". Could/should one require the syntax: title={long},list={short}? I would then expect to be able to use: \setupchapter [bookmark=list] to select to put the short title (if list={short}) in the bookmarks, unless there be bookmark={shorter}. (2) Additionally, \chapter [title={First chapter},list={First}] does not work. Logically this should work just as \startchapter. (3) Furthermore, I have a conceptual/structural problem with \startchapter\stopchapter. Take the example: \startchapter [title={First chapter}] bla \stopchapter some text \startchapter [title={Second chapter}] bla \stopchapter Where does "some text" belong? Structurally, I mean. Is it some sort of interlude? The syntax \chapter is not only convenient, it is also logical in that the structural section remains valid until the following \chapter. The \startchapter\stopchapter syntax is attractive but leaves me a bit perplex. Would someone explain? Alan
On Wed, Jun 30 2010, Alan BRASLAU wrote:
I would then expect to be able to use: \setupchapter [bookmark=list] to select to put the short title (if list={short}) in the bookmarks, unless there be bookmark={shorter}.
Good idea, +1 ! Peter -- Contact information: http://pmrb.free.fr/contact/
On nomarking functionality in MKIV: I manage short/long figure captions using a selector: ------------------------------------------------------------------------ \defineselector [caption] [max=2,n=2] % alternate {short}{long} captions ... \placefigure [here] [fig:reference] {\select{caption} {short} {long} } {figure} ... \chapter{Liste des figures} \start \setupselector [caption] [n=1] \placelistoffigures [criterium=all] \stop ------------------------------------------------------------------------ Similarly to \startchapter [title=long,list=short] could we have: \placefigure [here] [fig:reference] [caption={long},list={short}] {figure} Could this coexist with the current syntax: \placefigure [here] [fig:reference] {caption} {figure} Alan By the way, \select{caption} does not follow the general syntax rule whereas metadata is contained between [] and text to be typeset between {} One should thus rather have \select [caption] {short} {long} or even \selectcaption {short} {long} to be coherent.
On Tuesday 29 June 2010 19:33:55 Peter Münster wrote:
On Tue, Jun 29 2010, John Devereux wrote:
....so that "Short Title Rest Of Title" appears as the chapter title, but just "Short Title" appears in the TOC, PDF bookmarks and footers.
\setupinteraction[state=start] \placebookmarks[all] \setupfootertexts[chapter] \starttext \completecontent \startchapter[title=long, list=short, bookmark=bookmark, marking=footer] bla \stopchapter \stoptext
Cheers, Peter
Three points:
[...]
(2) Additionally, \chapter [title={First chapter},list={First}] does not work. Logically this should work just as \startchapter. This won't happen but what you can do is to write a macro which accepts different values for
Am 30.06.10 10:19, schrieb Alan BRASLAU: headers/footers, the running text and the toc (i know the entries in the toc and text are wrong). \unprotect \def\????ca{@@@@ca} \unexpanded\def\caption {\dosingleargument\docaption} \def\docaption[#1]% {\getparameters[\????ca][\c!title=,\c!list=\@@@@catitle,\c!marking=\@@@@catitle,#1]% \doifmodeelse{*\v!marking} {\@@@@camarking} {\doifmodeelse{*\v!list} {\@@@@calist} {\@@@@catitle}}} \protect \setupheadertexts[chapter] \starttext \completecontent \chapter{First Chapter} \chapter{\caption[title=Second Chapter,list=Chapter Two,marking=Two]} \stoptext Wolfgang
On Thursday 01 July 2010 00:35:44 Wolfgang Schuster wrote:
Am 30.06.10 10:19, schrieb Alan BRASLAU:
Additionally, \chapter [title={First chapter},list={First}] does not work. Logically this should work just as \startchapter.
This won't happen
So it is not a good idea? Or just complicated to implement, currently?
but what you can do is to write a macro which accepts different values for headers/footers, the running text and the toc (i know the entries in the toc and text are wrong).
There is an entire class of users who will not get involved writing macros, for whom \unprotect \protect is unknown. I know that this is certainly *not* your case. Following is a (somewhat long) reflection: Functionality such as the subject of this thread should be available by default, without having to mess with macros. In particular, functionality present in LaTeX for quite some time should be possible within ConTeXt rather easily, the ConTeXt way, of course. Thus, \chapter[toc-entry]{title} of LaTeX should have its equivalent in ConTeXt, and this would be logically something like: \chapter [title={title},list={toc-entry}] Furthermore, \chapter*{title} of LaTeX should also have its simple equivalent in ConTeXt, and this would be logically something like: \chapter [number=no] {title} Considering figures, tables, etc., in LaTeX we have: \begin{figure}[where] figure \caption[lof-entry]{figure caption} \label{fig:reference} \end{figure} and in ConTeXt: \placefigure [where] [fig:reference] {caption} {figure} which could very logically be: \placefigure [where] [fig:reference] [caption=no] {figure} and \placefigure [where] [fig:reference] [caption={caption},list={lof-entry}] {figure} the ConTeXt way! Alan P.S. While on the subject, in TeX, LaTeX and ConTeXt we have: $$ displayed math $$ and additionally in LaTeX, we have: \begin*{equation} displayed math \end{equation} while in ConTeXt we have \placeformula [-] $$ displayed math $$ or, alternately (to get spacing right) \placeformula [-] \startformula displayed math \stopformula Whereas I understand \placelist, \placecontent, etc. I don't really understand the logic of \placeformula, \placefigure, \placetable for floats. Especially now that I just discovered the existence of \startfiguretext \stopfiguretext OK, there are different mechanisms behind \startfiguretext and \placefigure: it is not a float but a box: \startfiguretext [left] {none} {\externalfigure [figure] [width=w]} text \stopfiguretext akin to \placesidebyside {\externalfigure [figure] [width=w]} {\framed [frame=no,width=\textwidth-w,align=text] {text}} Would not \startfloatfigure [where] [fig:reference] [caption={text}] figure \stopfloatfigure and \startfloattable [where] [tab:reference] [caption={text}] figure \stopfloattable etc. be much more logical, coherent? Furthermore, we could have: \startformula [where] [eqn:reference] [number=no] displayed math \stopformula where "where" could be "here", "inline", etc.
Am 01.07.10 10:16, schrieb Alan BRASLAU:
On Thursday 01 July 2010 00:35:44 Wolfgang Schuster wrote:
Am 30.06.10 10:19, schrieb Alan BRASLAU:
Additionally, \chapter [title={First chapter},list={First}] does not work. Logically this should work just as \startchapter.
This won't happen
So it is not a good idea? Or just complicated to implement, currently?
It's possible but Hans answer is he will not implement this. Since he also removed the paragraph delimited versions of the header commands (\chapter ...\par) your chances for extensions are very low.
but what you can do is to write a macro which accepts different values for headers/footers, the running text and the toc (i know the entries in the toc and text are wrong).
There is an entire class of users who will not get involved writing macros, for whom \unprotect \protect is unknown. I know that this is certainly *not* your case.
What i tried to show with my example this what's possible to get around with the limitations but my code does not work and won't work with the help of Hans because it needs hocks in the list macros (there is currently no automated way to tell whether you're in a list or not). Wolfgang
On Thu, Jul 01 2010, Alan BRASLAU wrote:
Functionality such as the subject of this thread should be available by default, without having to mess with macros. In particular, functionality present in LaTeX for quite some time should be possible within ConTeXt rather easily, the ConTeXt way, of course.
The ConTeXt way is now: \startchapter[...] \stopchapter When you don't need the extra functionality, you can use the old \chapter command, but when you need it, the just use the new environment.
Thus, \chapter[toc-entry]{title} of LaTeX should have its equivalent in ConTeXt, and this would be logically something like: \chapter [title={title},list={toc-entry}]
Why? LaTeX is not the reference for ConTeXt. It could also be like this: \startsection[type=chapter, title=my title, ...] \stopsection
Furthermore, \chapter*{title} of LaTeX should also have its simple equivalent in ConTeXt, and this would be logically something like: \chapter [number=no] {title}
This should be simple enough: \startchapter[number=no] \stopchapter
which could very logically be: \placefigure [where] [fig:reference] [caption=no] {figure} and \placefigure [where] [fig:reference] [caption={caption},list={lof-entry}] {figure} the ConTeXt way!
Or: \placefigure[where=here, label=fig:label, caption=my caption, ...]{figure} Cheers, Peter -- Contact information: http://pmrb.free.fr/contact/
On Thursday 01 July 2010 11:23:01 Peter Münster wrote:
On Thu, Jul 01 2010, Alan BRASLAU wrote:
Functionality such as the subject of this thread should be available by default, without having to mess with macros. In particular, functionality present in LaTeX for quite some time should be possible within ConTeXt rather easily, the ConTeXt way, of course.
The ConTeXt way is now: \startchapter[...] \stopchapter When you don't need the extra functionality, you can use the old \chapter command, but when you need it, the just use the new environment.
This is an unsatisfactory statement, indeed. No one has answered my question about to what belongs any text between a proceding \stopchapter and a following \startchapter, as in \startchapter{title} \stopchapter some text \startchapter{next title} \stopchapter There remains thus some logical/structural problem with this new scheme. (This does not mean, at all, that I dislike the \start \stop syntax.)
Thus,
\chapter[toc-entry]{title}
of LaTeX should have its equivalent in ConTeXt,
and this would be logically something like: \chapter [title={title},list={toc-entry}]
Why? LaTeX is not the reference for ConTeXt.
So you/we have nothing to learn from years of experience and use of LaTeX? It is indeed not a reference, but an indicator. Do not forget, as well, that many new ConTeXt users will be coming from LaTeX... Alan
On Thu, Jul 1, 2010 at 11:44 AM, Alan BRASLAU
On Thursday 01 July 2010 11:23:01 Peter Münster wrote:
On Thu, Jul 01 2010, Alan BRASLAU wrote:
Functionality such as the subject of this thread should be available by default, without having to mess with macros. In particular, functionality present in LaTeX for quite some time should be possible within ConTeXt rather easily, the ConTeXt way, of course.
The ConTeXt way is now: \startchapter[...] \stopchapter When you don't need the extra functionality, you can use the old \chapter command, but when you need it, the just use the new environment.
This is an unsatisfactory statement, indeed.
No one has answered my question about to what belongs any text between a proceding \stopchapter and a following \startchapter, as in \startchapter{title} \stopchapter some text \startchapter{next title} \stopchapter
There remains thus some logical/structural problem with this new scheme. (This does not mean, at all, that I dislike the \start \stop syntax.)
\starttext \input knuth %%% what about this ? \chapter{Foo} \input tufte %% ok it's "in" ch. Foo %% what about these ? \startstandardmakeup foo \page boo \page goo \page \stopstandardmakeup \chapter{Goo} \input tufte %% ok it's "in" ch. Goo \stoptext New schema > Old schema -- luigi
On Jul 1, 2010, at 11:44 AM, Alan BRASLAU wrote:
No one has answered my question about to what belongs any text between a proceding \stopchapter and a following \startchapter, as in \startchapter{title} \stopchapter some text \startchapter{next title} \stopchapter
Excuse me, but your question is just plain nonsense. What you show us is sloppy writing. Why should ConTeXt or any other system cater to this? You're asking "where does text belong that doesn't belong to any hierarchical structure of my document?" The answer is obvious: this text doesn't belong anywhere. Thomas
On Thu, Jul 1, 2010 at 12:00 PM, Thomas A. Schmitz
On Jul 1, 2010, at 11:44 AM, Alan BRASLAU wrote:
No one has answered my question about to what belongs any text between a proceding \stopchapter and a following \startchapter, as in \startchapter{title} \stopchapter some text \startchapter{next title} \stopchapter
Excuse me, but your question is just plain nonsense. What you show us is sloppy writing. Why should ConTeXt or any other system cater to this? You're asking "where does text belong that doesn't belong to any hierarchical structure of my document?" The answer is obvious: this text doesn't belong anywhere.
well, to avoid black hole we can say that "some text" belongs to the parent section of chapter (part in this case or section0) which actually is "virtual" , ie almost doesn't influences output. So one can think to an endless chain ... section-2 > section-1 > section0 aka 'part' > section1 'aka' chapter ... where 'a > b' mean a is parent of b For "virtual" consider \starttext \chapter{foo} \subsection{goo} \stoptext where there is a virtual \section . More or less (maybe less than more) . -- luigi
On Thursday 01 July 2010 12:00:45 Thomas A. Schmitz wrote:
On Jul 1, 2010, at 11:44 AM, Alan BRASLAU wrote:
No one has answered my question about to what belongs any text between a proceding \stopchapter and a following \startchapter, as in \startchapter{title} \stopchapter some text \startchapter{next title} \stopchapter
Excuse me, but your question is just plain nonsense. What you show us is sloppy writing. Why should ConTeXt or any other system cater to this? You're asking "where does text belong that doesn't belong to any hierarchical structure of my document?" The answer is obvious: this text doesn't belong anywhere.
This is a very good answer. Now, think about robustness. So called sloppy writing can easily happen in a very big project, or more likely by an inexperienced user. ConTeXt is pretty good in handling this, but not perfect. How many times have we tried options that do not exist and which are simply ignored in silence. Now try: \input knuth \starttext What about this? \stoptext Sometimes our errors, ignored in silence, end up having strange side effects that are long to debug. I came across this, for example, using by mistake \cite{reference} rather then \cite[reference]. Back to robustness, I once wrote a very big system used to run expriments. It *had* to be robust. Luckly, to insure this, I had a collegue who was very good in doing every thing wrong. For example, if the program asked "how many cycles" to run, he was capable of typing "yes". Why not? The program still had to handle this correctly. Should be the same for typesetting. I hope that you all *never* make mistakes. Remember, *real* unix users only use cat; All other text editors are for "sissys". Alan
On Jul 1, 2010, at 8:59 PM, Alan BRASLAU wrote:
This is a very good answer.
Now, think about robustness. So called sloppy writing can easily happen in a very big project, or more likely by an inexperienced user. ConTeXt is pretty good in handling this, but not perfect. How many times have we tried options that do not exist and which are simply ignored in silence.
Now try: \input knuth \starttext What about this? \stoptext
Sometimes our errors, ignored in silence, end up having strange side effects that are long to debug. I came across this, for example, using by mistake \cite{reference} rather then \cite[reference].
Back to robustness, I once wrote a very big system used to run expriments. It *had* to be robust. Luckly, to insure this, I had a collegue who was very good in doing every thing wrong. For example, if the program asked "how many cycles" to run, he was capable of typing "yes". Why not? The program still had to handle this correctly. Should be the same for typesetting.
I hope that you all *never* make mistakes. Remember, *real* unix users only use cat; All other text editors are for "sissys".
Hope this isn't too long and not too off-topic... It all depends on what you call "robustness." I'm a classicist, not a computer scientist or programmer, so I view software only from a user's perspective. But here's what I think about this: a system is robust when it behaves in a predictable and consistent manner. Maybe it's because I have begun writing some of my stuff in xml, or maybe it's because I'm an anal-retentive guy by nature, but I find the tree image of documents compelling: everything has to be part of a branch. And I read the examples you provide as proving me right: if a program asks "how many cycles?" and the user input is "yes," the only consistent and predictable behavior is throwing an error and reporting it to the user - "integer number expected" or some such. Processing "yes" will not allow the user to learn how to do this right. Everything else ("The program still had to handle this correctly") is just going to leave the user at the mercy of what someone somewhere defined for her/him. Moreover: maybe as a classicist, I find it natural to look at documents in the perspective of the "longue durée" - after all, we handle stuff that has been around for several millennia. Which means I see my TeX or whatever file not primarily as an instruction to typeset stuff in a certain way, but as a container to preserve information. Which means: ideally, I want my documents so well-structured that someone in the year 3010 will be able to extract the same information from them. The better they are structured, the more they respect a consistent model, the better the chances that this will happen. Again, I would argue that this means an example like somestuff \starttext morestuff \stoptext just should be flagged as invalid because it makes it difficult to parse this document for the information it contains. Lastly, Hraban has given a very good analogy when he pointed to the difference between the old-style html with its convenient, but sloppy syntax à la stuff<p>, whereas x(ht)ml is more strict with <p>stuff</p>. The old way was convenient when you saw your document merely as a set of instructions for a browser to display your stuff. But in today's world, you have to see that your document may be viewed and processed in hundreds of ways: in a web browser on a computer, on a cell phone, an e-reader, a tablet, etc. Which means you should think of your document as structured information, not as instructions for a certain device. Again, the better the document is structured, the more independent and reliable its transmission will be. So: I find the new \startchapter ... \stopchapter code much superior to the old way of organizing chapters. And I would argue that a program which discourages and flags incorrect input (like what you describe in your examples) is much superior to a program which somehow processes this input. This has nothing to do with using cat as an editor (btw: cat is for sissys, REAL programmers use a magnetized needle and a steady hand), but is a matter of organizing information in the best way. Thomas
On Fri, Jul 2, 2010 at 10:18 AM, Thomas A. Schmitz
So: I find the new \startchapter ... \stopchapter code much superior to the old way of organizing chapters.
Well, sometimes I still find sgml documents (cfr. http://surf.sourceforge.net) where old way is better . -- luigi
On Friday 02 July 2010 10:18:23 Thomas A. Schmitz wrote:
It all depends on what you call "robustness." I'm a classicist, not a computer scientist or programmer, so I view software only from a user's perspective. But here's what I think about this: a system is robust when it behaves in a predictable and consistent manner. Maybe it's because I have begun writing some of my stuff in xml, or maybe it's because I'm an anal-retentive guy by nature, but I find the tree image of documents compelling: everything has to be part of a branch. And I read the examples you provide as proving me right: if a program asks "how many cycles?" and the user input is "yes," the only consistent and predictable behavior is throwing an error and reporting it to the user - "integer number expected" or some such. Processing "yes" will not allow the user to learn how to do this right. Everything else ("The program still had to handle this correctly") is just going to leave the user at the mercy of what someone somewhere defined for her/him.
I am a scientist, not a programmer (or computer scientist). We tend to be creative and act unpredictably. This leads to progress and innovation.
Moreover: maybe as a classicist, I find it natural to look at documents in the perspective of the "longue durée" - after all, we handle stuff that has been around for several millennia. Which means I see my TeX or whatever file not primarily as an instruction to typeset stuff in a certain way, but as a container to preserve information. Which means: ideally, I want my documents so well-structured that someone in the year 3010 will be able to extract the same information from them. The better they are structured, the more they respect a consistent model, the better the chances that this will happen. ... Which means you should think of your document as structured information, not as instructions for a certain device. Again, the better the document is structured, the more independent and reliable its transmission will be.
Redundancy ``... is the only thing which makes it possible to write a text which is longer than, say, ten pages. In other words, a language which has maximum compression would actually be completely unsuited to conveying information beyond a certain degree of complexity, because you could never find out whether a text is right or wrong. And this is a question of principle. It follows, therefore, that the complexity of the medium in which you work has something to do with redundancy.'' (Shannon 1949) I am researching (amongst other things) the structure of DNA. The information that it carries has survived much longer than the 1000 years between 2010 and 3010... Alan P.S. my favorite editor is vi - as I do make mistakes!
Am 2010-07-01 um 11:44 schrieb Alan BRASLAU:
No one has answered my question about to what belongs any text between a proceding \stopchapter and a following \startchapter, as in \startchapter{title} \stopchapter some text \startchapter{next title} \stopchapter
If you write such, you must know what you mean. Compare with HTML: <p>something</p> what's this? <p>other stuff</p> While in the olde days we used to write something<p> other stuff<p> this incomplete syntax is gone now. Similar to ConTeXt's evolution.
There remains thus some logical/structural problem with this new scheme.
Nothing is ever perfect. The old scheme wasn't better, see e.g. Lugi's post. Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer)
participants (7)
-
Alan BRASLAU
-
Henning Hraban Ramm
-
John Devereux
-
luigi scarso
-
Peter Münster
-
Thomas A. Schmitz
-
Wolfgang Schuster