Dear list, my publisher forces me to set different things as titles, in headers and table of contents. In some cases \nolist and \nomarking aren't enough. here are my actual definitions: ---- \def\Untertitel#1{\blank[3pt]{\ss\bf #1}\blank} % ok \def\Titel#1#2{{\nohyphens\chapter{#1}\Untertitel{#2}}} % ok \def\KomplexTitel#1#2#3{{\writetolist[chapter]{#3}\nohyphens\title{#1}\U ntertitel{#2}}} ---- with ---- \start \setupheadertexts[][manual entry][part][] % normally defined as [][chapter][part][] \KomplexTitel{Main chapter title}{chapter subtitle}{toc entry} Much text \stop % of other headertext ---- Real life example: \start \setupheadertexts [][Vorwort][][] \KomplexTitel{Die neutrale Schweiz und das globale Dorf}% {Vorwort von Prof.|~|Dr.|~|Heinrich Ott}% {Vorwort Prof.|~|Dr.|~|Heinrich Ott:\\Die neutrale Schweiz und das globale Dorf} ... Now there stay two issues: 1. I'd like to get a four-parameter command that can set the header text also. 2. I must get a line feed into the toc, but neither \\ nor \crlf works. Please help! Thanks. Grüßlis vom Hraban! -- www.fiee.net/texnique/ www.ramm.ch/context/
Hi Hraban,
1. I'd like to get a four-parameter command that can set the header
See attachment ...
2. I must get a line feed into the toc, but neither \\ nor \crlf works.
I thought that \writebetweenlist[chapter]{\blank} should work. At least that is what is stated in the manual. Gruss Willi
Am Donnerstag, 13.02.03 um 22:45 Uhr schrieb Willi Egger:
\def\Eintrag#1{\writetolist[chapter]{#1}} %\writebetweenlist[chapter]{\blank}: Gemäss Handbuch sollte dies gehen??
That works, but it's not what I asked after. I need a CRLF *in* the faked chapter name, no blank line between some entries.
\def\Kopfeintrag#1{\setupheadertexts[#1]}
Ok, that's what I'm using already. I thought to change perhaps the variable... But you're right, that's enough. Grüßlis vom Hraban! -- www.fiee.net/texnique/ www.ramm.ch/context/
Hi Hraban, Weil die Katze das Mausen nicht lassen kann ...
That works, but it's not what I asked after. I need a CRLF *in* the faked chapter name, no blank line between some entries.
\def\Eintrag#1{\writetolist[chapter]{% \framed[{frame=on,align=right,width=0.5\textwidth,height=2.5\bodyfontsize}]{ #1}}} May be this is not anwering everything. In my test file I was able to produce a TOC where different length of entries did break into two lines... Willi
\def\Eintrag#1{\writetolist[chapter]{%
\framed[{frame=on,align=right,width=0.5\textwidth,height=2.5\bodyfontsi ze}]{ #1}}}
Thanks for the tip. I have now: \def\KomplexTitel#1#2#3{% {\writetolist[chapter]{% \framed[{frame=off, align=right, width=0.8\textwidth, height=2\baselineskip, offset=none}]{#3}% }% \nohyphens\title{#1}% \Untertitel{#2}}} But the code (fixed measures) is as ugly as the output. The lines in the frames are set a bit to high, and the page number is too low. I guess it could work with linecorrection, but that always throws errors (at least if used in a \def). Any more hints? Grüßlis vom Hraban! -- www.fiee.net/texnique/ www.ramm.ch/context/
Hi Hraban,
But the code (fixed measures) is as ugly as the output. The lines in the frames are set a bit to high, and the page number is too low. I guess it could work with linecorrection, but that always throws errors (at least if used in a \def).
Any more hints?
What you could try is the trickery in paragraph 4.19 pages 101 and following of the English Manual. There Hans presents possibilities to use different boxes with different alignment. I believe, that with the problem you deal you will have to make some 'low'-level definitions. Gruss Willi
At 11:40 PM 2/14/2003 +0100, you wrote:
\def\Eintrag#1{\writetolist[chapter]{%
\framed[{frame=on,align=right,width=0.5\textwidth,height=2.5\bodyfontsi ze}]{ #1}}}
Thanks for the tip. I have now:
\def\KomplexTitel#1#2#3{% {\writetolist[chapter]{% \framed[{frame=off, align=right, width=0.8\textwidth, height=2\baselineskip, offset=none}]{#3}% }% \nohyphens\title{#1}% \Untertitel{#2}}}
But the code (fixed measures) is as ugly as the output. The lines in the frames are set a bit to high, and the page number is too low. I guess it could work with linecorrection, but that always throws errors (at least if used in a \def).
Any more hints?
(untested) better make a dedicated list: \definelist [mylist] and configure that one (so no \framed in write) \setuplist [mychapter] [alternative=command, command=\MyChapterList] with something \def\ChapterList#1#2#3% {\framed [frame=off, align={right,broad,nothyphenated}, width=0.8\textwidth, height=2\baselineskip, offset=none] {#2}} your title command \def\KomplexTitel#1#2#3% {\title{#1}\subject{#2}\writetolist[mychapter]{}{#3}} (next version will contain a direct write command, which avoids an interfering node) call lists like: \placelist[chapter,mychapter] etc ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------
better make a dedicated list: \definelist [mylist]
I tried such also, defined a list and something like \definecombinedlist [inhalt] [part, chapter, mychapter] [level=chapter, alternative=b] But I got only errors. Now everything's too late, I had to deliver the book today. I wrote one line with \writebetweenlist and \moveongrid and the second with \writetolist -- not really sophisticated or clean logical markup, but the only I got working. I'll send you a template when it's printed. Thank you anyway. Grüßlis vom Hraban! -- www.fiee.net/texnique/ www.ramm.ch/context/
Dear all, I found this useful, but still I'm wondering, how shall I extend the \KomplexTitel to put current chapter number to the \writetolist command? Thank you. Best regards, Tomas On 17.2.2003 0:31, Hans Hagen wrote:
better make a dedicated list:
\definelist [mylist]
and configure that one (so no \framed in write)
\setuplist [mychapter] [alternative=command, command=\MyChapterList]
with something
\def\ChapterList#1#2#3% {\framed [frame=off, align={right,broad,nothyphenated}, width=0.8\textwidth, height=2\baselineskip, offset=none] {#2}}
your title command
\def\KomplexTitel#1#2#3% {\title{#1}\subject{#2}\writetolist[mychapter]{}{#3}}
(next version will contain a direct write command, which avoids an interfering node)
call lists like:
\placelist[chapter,mychapter]
etc ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------
Am 26.09.2010 um 17:54 schrieb Tomas Bures:
Dear all,
I found this useful, but still I'm wondering, how shall I extend the \KomplexTitel to put current chapter number to the \writetolist command?
I wouldn’t use this method anymore because with \startchapter etc. you have a even more powerful mechanism without such tricks, see also http://www.ntg.nl/pipermail/ntg-context/2010/052429.html Wolfgang
Thank you Wolfgang and all, this was exactly what I needed. One more thing. I would like to add a date to every chapter in TOC. I do it this way: \define[1]\ChapterListTextCommand{% #1\hskip 1.5em \hbox{ \doiftextelse{\structurelistuservariable{date}{(\structurelistuservariable{datum})}{} } } But actually I would like to align the date to some fixed horizontal position. Something like this: 1. Title of chapter 1 (9.2.2010) .... 5 2. Title of another chapter (10.3.2010) .. 10 3. A very long title of a chapter (10.5.2010) .. 34 4. Title of fourth chap. (8.4.2010) ... 25 Another complication is that I would like the line to snap to a grid. I tried it with framed, but I'm not good enough in ConTeXt. Please, any idea? Thank you, best regards, Tomas On 26.9.2010 18:06, Wolfgang Schuster wrote:
Am 26.09.2010 um 17:54 schrieb Tomas Bures:
Dear all,
I found this useful, but still I'm wondering, how shall I extend the \KomplexTitel to put current chapter number to the \writetolist command?
I wouldn’t use this method anymore because with \startchapter etc. you have a even more powerful mechanism without such tricks, see also http://www.ntg.nl/pipermail/ntg-context/2010/052429.html
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 ___________________________________________________________________________________
participants (5)
-
Hans Hagen
-
Henning Hraban Ramm
-
Tomas Bures
-
Willi Egger
-
Wolfgang Schuster