Some old fashioned novels have a chapter précis in the table of contents. In Latex exists the command \chapterprecis to put the text at the beginning of the chapter and in the able of contents. I thought, I can realize this in ConTeXt with \writebetweenlist[chapter]{XYZ} or with \weitetolist[chapter]{XYZ} But both produce only a fatal error. What’s wrong here? Thanks für help! WH
Am 28.08.2014 um 16:17 schrieb Werner Hintze
Some old fashioned novels have a chapter précis in the table of contents. In Latex exists the command \chapterprecis to put the text at the beginning of the chapter and in the able of contents. I thought, I can realize this in ConTeXt with
\writebetweenlist[chapter]{XYZ}
or with
\weitetolist[chapter]{XYZ}
But both produce only a fatal error. What’s wrong here?
Hard to tell without a example which demonstrates the error because the following works for me. \starttext \completecontent \chapter{This is a chapter} \writetolist[chapter]{}{This is a summary of the chapter with \tex{writetolist}.} \writebetweenlist[chapter][location=here]{This is a summary of the chapter with \tex{writebetweenlist}.} \chapter{This is another chapter} \stoptext Wolfgang
The example works for me too. But the command doesn’t work in my file. I can’t find out why. On 28 Aug 2014, at 16:46, Wolfgang Schuster wrote:
Am 28.08.2014 um 16:17 schrieb Werner Hintze
: Some old fashioned novels have a chapter précis in the table of contents. In Latex exists the command \chapterprecis to put the text at the beginning of the chapter and in the able of contents. I thought, I can realize this in ConTeXt with
\writebetweenlist[chapter]{XYZ}
or with
\weitetolist[chapter]{XYZ}
But both produce only a fatal error. What’s wrong here?
Hard to tell without a example which demonstrates the error because the following works for me.
\starttext
\completecontent
\chapter{This is a chapter}
\writetolist[chapter]{}{This is a summary of the chapter with \tex{writetolist}.}
\writebetweenlist[chapter][location=here]{This is a summary of the chapter with \tex{writebetweenlist}.}
\chapter{This is another chapter}
\stoptext
Wolfgang ___________________________________________________________________________________ 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 ___________________________________________________________________________________
Hmm... That’s really strange, What I did: 1. I deleted the line with \writebetweenlist and compiled the file. It worked. 2. I put back the line and triode to compile -> fatal error 3. I commented out all the lines which had something to do with the table of contend -> fatal error 4. I changed all back -> fatal error (as expected) 5. I commented out all the lines in my project files (all the lines with \input and compiled and got an empty file witour errors. 6. I deleted the comment signs one after the other and compiled every time -> no error 7. All was how it was, so I entered the \writebetweenlist (absolutely the same: copy and paste) and ... Tatarata! It works... An enigma. I effectively changed nothing, all is now as it was before. Very, very strange... Anyway: It works. Thanks for the help! WH On 28 Aug 2014, at 16:46, Wolfgang Schuster wrote:
Am 28.08.2014 um 16:17 schrieb Werner Hintze
: Some old fashioned novels have a chapter précis in the table of contents. In Latex exists the command \chapterprecis to put the text at the beginning of the chapter and in the able of contents. I thought, I can realize this in ConTeXt with
\writebetweenlist[chapter]{XYZ}
or with
\weitetolist[chapter]{XYZ}
But both produce only a fatal error. What’s wrong here?
Hard to tell without a example which demonstrates the error because the following works for me.
\starttext
\completecontent
\chapter{This is a chapter}
\writetolist[chapter]{}{This is a summary of the chapter with \tex{writetolist}.}
\writebetweenlist[chapter][location=here]{This is a summary of the chapter with \tex{writebetweenlist}.}
\chapter{This is another chapter}
\stoptext
Wolfgang ___________________________________________________________________________________ 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 ___________________________________________________________________________________
Am 28.08.2014 um 17:17 schrieb Werner Hintze
Hmm... That’s really strange, What I did:
I deleted the line with \writebetweenlist and compiled the file. It worked. I put back the line and triode to compile -> fatal error I commented out all the lines which had something to do with the table of contend -> fatal error I changed all back -> fatal error (as expected) I commented out all the lines in my project files (all the lines with \input and compiled and got an empty file witour errors. I deleted the comment signs one after the other and compiled every time -> no error All was how it was, so I entered the \writebetweenlist (absolutely the same: copy and paste) and ... Tatarata! It works... An enigma. I effectively changed nothing, all is now as it was before. Very, very strange…
Do you set all three arguments for \writebetweenlist, i.e. \writebetweenlist[…]{…}{…} Wolfgang
Yes. I did. Before and now. But I think, writebetweenlist is not what I’m looking for. I try now with \writetolist[section] and to give the section list the desired format. That seems not easy, because the text now runs on the whole line, this means also in the region, where the page numbers are. It should terminate before, where the line of dots terminates or so. I see no parameter for this width seems ti be not the right one (it seems, width has no visible effect at all). On 28 Aug 2014, at 17:22, Wolfgang Schuster wrote:
Am 28.08.2014 um 17:17 schrieb Werner Hintze
: Hmm... That’s really strange, What I did:
I deleted the line with \writebetweenlist and compiled the file. It worked. I put back the line and triode to compile -> fatal error I commented out all the lines which had something to do with the table of contend -> fatal error I changed all back -> fatal error (as expected) I commented out all the lines in my project files (all the lines with \input and compiled and got an empty file witour errors. I deleted the comment signs one after the other and compiled every time -> no error All was how it was, so I entered the \writebetweenlist (absolutely the same: copy and paste) and ... Tatarata! It works... An enigma. I effectively changed nothing, all is now as it was before. Very, very strange…
Do you set all three arguments for \writebetweenlist, i.e. \writebetweenlist[…]{…}{…}
Wolfgang
___________________________________________________________________________________ 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 ___________________________________________________________________________________
Am 28.08.2014 um 17:46 schrieb Werner Hintze
Yes. I did. Before and now.
But I think, writebetweenlist is not what I’m looking for. I try now with \writetolist[section] and to give the section list the desired format. That seems not easy, because the text now runs on the whole line, this means also in the region, where the page numbers are. It should terminate before, where the line of dots terminates or so. I see no parameter for this width seems ti be not the right one (it seems, width has no visible effect at all).
You can use the maxwidth key to set a limit for the width of the list entry. \definelist[chaptertext] %\setuplist [chaptertext][maxwidth=8cm] \starttext \placelist[chapter,chaptertext] \chapter{This is a chapter} \writetolist[chaptertext]{}{\input ward } \stoptext Wolfgang
Sorry. I don’t understand. If I use maxwidth (line 2 without the %), I get just one truncated line of the text. But I’d like to have all the text, somewhat indented on both sides, but not truncated. But why is the text without maxwidth indented on the right? Werner On 28 Aug 2014, at 17:57, Wolfgang Schuster wrote:
Am 28.08.2014 um 17:46 schrieb Werner Hintze
: Yes. I did. Before and now.
But I think, writebetweenlist is not what I’m looking for. I try now with \writetolist[section] and to give the section list the desired format. That seems not easy, because the text now runs on the whole line, this means also in the region, where the page numbers are. It should terminate before, where the line of dots terminates or so. I see no parameter for this width seems ti be not the right one (it seems, width has no visible effect at all).
You can use the maxwidth key to set a limit for the width of the list entry.
\definelist[chaptertext] %\setuplist [chaptertext][maxwidth=8cm]
\starttext
\placelist[chapter,chaptertext]
\chapter{This is a chapter}
\writetolist[chaptertext]{}{\input ward }
\stoptext
Wolfgang
___________________________________________________________________________________ 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 ___________________________________________________________________________________
Am 28.08.2014 um 18:17 schrieb Werner Hintze
Sorry. I don’t understand. If I use maxwidth (line 2 without the %), I get just one truncated line of the text. But I’d like to have all the text, somewhat indented on both sides, but not truncated.
But why is the text without maxwidth indented on the right?
When you enable the pagenumber context puts some space between the number and the text. \definelist[chaptertext] \setuplist [chaptertext][margin=2em,pagecommand=\gobbleoneargument] %\setuplist [chaptertext][margin=2em,pagenumber=no] \starttext \placelist[chapter,chaptertext] \chapter{This is a chapter} \writetolist[chaptertext]{}{\input ward } \stoptext Wolfgang
Aha. I see. So it may work. But I just recalled how to achieve the same result with Latex and Memoir... And I decided to sleep one night and if then my feeling ist the same as now, I'll turn back to Latex. I’m too stupid for such a complicated tool as ConTeXt. I know that it is much better als Latex, but I don’t understand it. It’s now a year that I use it frequently and I have the impression that I made not a single step forward. Let’s see what the morning brings and says ;) Thank you all for all your help! Werner On 28 Aug 2014, at 18:53, Wolfgang Schuster wrote:
Am 28.08.2014 um 18:17 schrieb Werner Hintze
: Sorry. I don’t understand. If I use maxwidth (line 2 without the %), I get just one truncated line of the text. But I’d like to have all the text, somewhat indented on both sides, but not truncated.
But why is the text without maxwidth indented on the right?
When you enable the pagenumber context puts some space between the number and the text.
\definelist[chaptertext] \setuplist [chaptertext][margin=2em,pagecommand=\gobbleoneargument] %\setuplist [chaptertext][margin=2em,pagenumber=no]
\starttext
\placelist[chapter,chaptertext]
\chapter{This is a chapter}
\writetolist[chaptertext]{}{\input ward }
\stoptext
Wolfgang
___________________________________________________________________________________ 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 ___________________________________________________________________________________
Interesting thread.
I currently use:
\definestartstop [precis]
[style=italic,indenting=no,indentnext=no,after={\blank}]
and then
\startchapter [title=A Chapter]
\startprecis
Short summary text.
\stoprecis
\stopchapter
and indeed it could be interesting to also include this text in the
table of contents as suggested in this thread.
I thought about adding
before={\startbuffer[precis]},
after={\stopbuffer\getbuffer[precis]\writetolist[chapter]{}{\getbuffer[precis]}}
to the \definestartstop
but this does not seem to work. I did not try further.
Perhaps someone has an idea on how to better achieve this?
Alan
On Thu, 28 Aug 2014 16:46:28 +0200
Wolfgang Schuster
Am 28.08.2014 um 16:17 schrieb Werner Hintze
: Some old fashioned novels have a chapter précis in the table of contents. In Latex exists the command \chapterprecis to put the text at the beginning of the chapter and in the able of contents. I thought, I can realize this in ConTeXt with
\writebetweenlist[chapter]{XYZ}
or with
\weitetolist[chapter]{XYZ}
But both produce only a fatal error. What’s wrong here?
Hard to tell without a example which demonstrates the error because the following works for me.
\starttext
\completecontent
\chapter{This is a chapter}
\writetolist[chapter]{}{This is a summary of the chapter with \tex{writetolist}.}
\writebetweenlist[chapter][location=here]{This is a summary of the chapter with \tex{writebetweenlist}.}
\chapter{This is another chapter}
\stoptext
Wolfgang
-- Alan Braslau CEA DSM-IRAMIS-SPEC CNRS URA 2464 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
participants (3)
-
Alan BRASLAU
-
Werner Hintze
-
Wolfgang Schuster