linebreak NOT in section title BUT in content
Hi, \chapter{First line\\second line} gives a linebreak in the chapter's title but not in the corresponding toc entry. I need it the other way round: a line break at a specific point of the toc entry *and not* in the chapters title. Is this possible? Steffen
Steffen Wolfrum wrote:
Hi,
\chapter{First line\\second line}
gives a linebreak in the chapter's title but not in the corresponding toc entry.
I need it the other way round: a line break at a specific point of the toc entry *and not* in the chapters title.
Is this possible?
\crlf if i remember right -- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Am 30.10.2007 um 20:43 schrieb Hans Hagen:
Steffen Wolfrum wrote:
Hi,
\chapter{First line\\second line}
gives a linebreak in the chapter's title but not in the corresponding toc entry.
I need it the other way round: a line break at a specific point of the toc entry *and not* in the chapters title.
Is this possible?
\crlf if i remember right
No, unfortunately not: it also breaks the line in the section's title ... Steffen
On Tue, 30 Oct 2007 14:08:54 -0600, Steffen Wolfrum
Am 30.10.2007 um 20:43 schrieb Hans Hagen:
Steffen Wolfrum wrote:
Hi,
\chapter{First line\\second line}
gives a linebreak in the chapter's title but not in the corresponding toc entry.
I need it the other way round: a line break at a specific point of the toc entry *and not* in the chapters title.
Is this possible?
\crlf if i remember right
No, unfortunately not: it also breaks the line in the section's title ...
There is a workaround; play with \writebetweenlist [subsubsection] {\blank[small]} \writetolist[subsubsection]{}{#1} etc. So you can define a <section> that appears in the text and another that appears in the TOC. I always use this for tight toc spots. Best Idris -- Professor Idris Samawi Hamid, Editor-in-Chief International Journal of Shi`i Studies Department of Philosophy Colorado State University Fort Collins, CO 80523 -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Am 30.10.2007 um 21:19 schrieb Idris Samawi Hamid:
On Tue, 30 Oct 2007 14:08:54 -0600, Steffen Wolfrum
wrote: Am 30.10.2007 um 20:43 schrieb Hans Hagen:
Steffen Wolfrum wrote:
Hi,
\chapter{First line\\second line}
gives a linebreak in the chapter's title but not in the corresponding toc entry.
I need it the other way round: a line break at a specific point of the toc entry *and not* in the chapters title.
Is this possible?
\crlf if i remember right
No, unfortunately not: it also breaks the line in the section's title ...
There is a workaround; play with
\writebetweenlist [subsubsection] {\blank[small]} \writetolist[subsubsection]{}{#1}
etc. So you can define a <section> that appears in the text and another that appears in the TOC.
I always use this for tight toc spots.
Thank you Idris. Yes, this way I know. But I was sure there was also a fast, direct way. Well, obviously there isn't (anymore?) ... Steffen
On Tue, 30 Oct 2007 15:47:53 -0600, Taco Hoekwater
Steffen Wolfrum wrote:
But I was sure there was also a fast, direct way. Well, obviously there isn't (anymore?) ...
Here's a trick. It is ugly, but works reasonably well.
\starttext \def\CR{\crlf} \completecontent \def\CR{ }
\chapter{First line\CR second line}
\stoptext
A good one for the wiki, I run into this problem myself sometimes... Best Idris -- Professor Idris Samawi Hamid, Editor-in-Chief International Journal of Shi`i Studies Department of Philosophy Colorado State University Fort Collins, CO 80523
Am 30.10.2007 um 22:47 schrieb Taco Hoekwater:
Steffen Wolfrum wrote:
But I was sure there was also a fast, direct way. Well, obviously there isn't (anymore?) ...
Here's a trick. It is ugly, but works reasonably well.
\starttext \def\CR{\crlf} \completecontent \def\CR{ }
\chapter{First line\CR second line}
\stoptext
Unbelievable! What a dirty mind must this be breeding out tricks like this ... and works like a charm. Thank you Taco!! Steffen
2007/10/30, Taco Hoekwater
Steffen Wolfrum wrote:
But I was sure there was also a fast, direct way. Well, obviously there isn't (anymore?) ...
Here's a trick. It is ugly, but works reasonably well.
\starttext \def\CR{\crlf} \completecontent \def\CR{ }
\chapter{First line\CR second line}
\stoptext
Nice solution but Hans wrote a mechanism to to make two different titles for the text and the table of contents or whatever else you want. \defineselector[title][max=2,n=2] \starttext \start \setupselector[title][n=1] \completecontent \stop \chapter{\select{title}{First line\crlf second line}{First line second line}} \stoptext Wolfgang
Phhh! Hot stuff Wolfgang. This one should definitely go into the wiki (maybe plus a little documentation?) Very convenient option, amazing what goodies ConTeXt provides – thank you very, very much Hans! And thank you Wolfgang for remembering this ... even the master himself forgot it ;o) Steffen Am 31.10.2007 um 12:50 schrieb Wolfgang Schuster:
2007/10/30, Taco Hoekwater
: Steffen Wolfrum wrote: But I was sure there was also a fast, direct way. Well, obviously there isn't (anymore?) ...
Here's a trick. It is ugly, but works reasonably well.
\starttext \def\CR{\crlf} \completecontent \def\CR{ }
\chapter{First line\CR second line}
\stoptext
Nice solution but Hans wrote a mechanism to to make two different titles for the text and the table of contents or whatever else you want.
\defineselector[title][max=2,n=2] \starttext
\start \setupselector[title][n=1] \completecontent \stop
\chapter{\select{title}{First line\crlf second line}{First line second line}}
\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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ______________________________________________________________________ _____________
participants (5)
-
Hans Hagen
-
Idris Samawi Hamid
-
Steffen Wolfrum
-
Taco Hoekwater
-
Wolfgang Schuster