Hi, I was sure it should be quite standard, but I couldn't figure our how to set a heading like this: "Chapter label/number" (centered,small,italic) (linebreak) "Chapter titel" (centered,bigger,bold) Is there a command=... to be written, or could it be achieved by combining the various options that setuphead has predefined? Steffen
Steffen Wolfrum wrote:
Hi,
I was sure it should be quite standard, but I couldn't figure our how to set a heading like this:
"Chapter label/number" (centered,small,italic) (linebreak) "Chapter titel" (centered,bigger,bold)
Is there a command=... to be written, or could it be achieved by combining the various options that setuphead has predefined?
I guess you need numbercommand,inbetween and textcommand. Not a definitive answer, but I am positive that will work. Taco
You mean like this? \setuphead[chapter][command=\midaligned,numbercommand=\it,inbetween= \crlf,textcommand=\bf] But what should inbetween be to force a linebreak? Steffen On 27.07.2006, at 15:25, Taco Hoekwater wrote:
Steffen Wolfrum wrote:
Hi,
I was sure it should be quite standard, but I couldn't figure our how to set a heading like this:
"Chapter label/number" (centered,small,italic) (linebreak) "Chapter titel" (centered,bigger,bold)
Is there a command=... to be written, or could it be achieved by combining the various options that setuphead has predefined?
I guess you need numbercommand,inbetween and textcommand. Not a definitive answer, but I am positive that will work.
Taco
Steffen Wolfrum wrote:
You mean like this?
\setuphead[chapter][command=\midaligned,numbercommand=\it,inbetween= \crlf,textcommand=\bf]
That is what I meant but it dodn't work out too well. New approach: \def\Sectioncommand#1#2% {\vbox{\centerline{\it Chapter #1}% \centerline{\bfb #2}}} \setuphead[chapter] [command=\Sectioncommand, style=] Cheers, Taco
Well, looks good, BUT if the chapter's name is quite long and needs a break then the break command used there (\crlf \break \\) can't work anymore .... Steffen Am 29.07.2006 um 09:11 schrieb Taco Hoekwater:
Steffen Wolfrum wrote:
You mean like this?
\setuphead[chapter][command=\midaligned,numbercommand=\it,inbetween= \crlf,textcommand=\bf]
That is what I meant but it dodn't work out too well. New approach:
\def\Sectioncommand#1#2% {\vbox{\centerline{\it Chapter #1}% \centerline{\bfb #2}}}
\setuphead[chapter] [command=\Sectioncommand, style=]
Cheers, Taco _______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Am 29.07.2006 um 09:11 schrieb Taco Hoekwater:
Steffen Wolfrum wrote:
You mean like this?
\setuphead[chapter][command=\midaligned,numbercommand=\it,inbetween= \crlf,textcommand=\bf]
That is what I meant but it dodn't work out too well. New approach:
\def\Sectioncommand#1#2% {\vbox{\centerline{\it Chapter #1}% \centerline{\bfb #2}}}
\setuphead[chapter] [command=\Sectioncommand, style=]
On Sun, 30 Jul 2006, Steffen Wolfrum wrote:
Well, looks good, BUT if the chapter's name is quite long and needs a break then the break command used there (\crlf \break \\) can't work anymore ....
How about \def\Sectioncommand#1#2% {\framed[align=middle,width=broad,frame=no] {\it Chapter #1 \crlf \bfb\setupinterlinespace#2\endgraf}} \setuphead[chapter] [command=\Sectioncommand, style=] \chapter{A very very very very very very loongish title of the chapter} Aditya
Steffen Wolfrum wrote:
Well, looks good, BUT if the chapter's name is quite long and needs a break then the break command used there (\crlf \break \\) can't work anymore ....
\setuphead[chapter] [command=\Sectioncommand, style=, textstyle=\bfb, numberstyle=\it] \def\Sectioncommand#1#2% {\vbox \bgroup \framed[align=middle,frame=off,offset=0pt]{Chapter #1}% \framed[align=middle,frame=off,offset=0pt]{#2}% \egroup} or something alike Hans ----------------------------------------------------------------- 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 -----------------------------------------------------------------
On Mon, 31 Jul 2006, Hans Hagen wrote:
Steffen Wolfrum wrote:
Well, looks good, BUT if the chapter's name is quite long and needs a break then the break command used there (\crlf \break \\) can't work anymore ....
\setuphead[chapter] [command=\Sectioncommand, style=, textstyle=\bfb, numberstyle=\it]
\def\Sectioncommand#1#2% {\vbox \bgroup \framed[align=middle,frame=off,offset=0pt]{Chapter #1}% \framed[align=middle,frame=off,offset=0pt]{#2}% \egroup}
or something alike
You also need to specify width of the frame, otherwise width=fit is default and framed box does not appear to be middle aligned. Aditya
That's it. Now the corresponding entry in the TOC should be without sectionnumber, but setuplist[...][sectionnumber=no] doesn't work. And looking in the manual I saw that this command is listed for setuplist, but listed italic?! Steffen Am 31.07.2006 um 00:51 schrieb Aditya Mahajan:
On Mon, 31 Jul 2006, Hans Hagen wrote:
Steffen Wolfrum wrote:
Well, looks good, BUT if the chapter's name is quite long and needs a break then the break command used there (\crlf \break \\) can't work anymore ....
\setuphead[chapter] [command=\Sectioncommand, style=, textstyle=\bfb, numberstyle=\it]
\def\Sectioncommand#1#2% {\vbox \bgroup \framed[align=middle,frame=off,offset=0pt]{Chapter #1}% \framed[align=middle,frame=off,offset=0pt]{#2}% \egroup}
or something alike
You also need to specify width of the frame, otherwise width=fit is default and framed box does not appear to be middle aligned.
Aditya _______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
I have tried ... \setuplist[chapter] [label=no,prefix=no,sectionnumber=no,alternative=a,textcommand= \midaligned,distance=0cm,margin=0cm,width=0cm] ... but still there is the sectionnumber shown in the content. Is this because of our special setuphead[chapter] command? Is there no way to avoid the sectionnumber for my chapter in the TOC? Steffen Am 31.07.2006 um 07:31 schrieb Steffen Wolfrum:
That's it.
Now the corresponding entry in the TOC should be without sectionnumber, but
setuplist[...][sectionnumber=no]
doesn't work. And looking in the manual I saw that this command is listed for setuplist, but listed italic?!
...
\setuphead[chapter] [command=\Sectioncommand, style=, textstyle=\bfb, numberstyle=\it]
\def\Sectioncommand#1#2% {\vbox \bgroup \framed[align=middle,frame=off,offset=0pt]{Chapter #1}% \framed[align=middle,frame=off,offset=0pt]{#2}% \egroup}
Steffen Wolfrum wrote:
That's it.
Now the corresponding entry in the TOC should be without sectionnumber, but
setuplist[...][sectionnumber=no]
doesn't work. And looking in the manual I saw that this command is listed for setuplist, but listed italic?!
has to do with prefixes, like \chapternumber=no and so Hans ----------------------------------------------------------------- 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 -----------------------------------------------------------------
Steffen Wolfrum wrote:
Hi,
I was sure it should be quite standard, but I couldn't figure our how to set a heading like this:
"Chapter label/number" (centered,small,italic) (linebreak) "Chapter titel" (centered,bigger,bold)
Is there a command=... to be written, or could it be achieved by combining the various options that setuphead has predefined?
\setupheadertexts[\setups{header}] \startsetups header \framed [align=middle,strut=no,offset=overlay] {\start \switchtobodyfont[small]\it Chapter \getmarking[chapternumber]\par \stop \start \bf \getmarking[chapter] \stop} \stopsetups etc etc ----------------------------------------------------------------- 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 -----------------------------------------------------------------
No, I don't mean "header" I mean heading, title, name of a section! Steffen On 27.07.2006, at 17:23, Hans Hagen wrote:
Steffen Wolfrum wrote:
Hi,
I was sure it should be quite standard, but I couldn't figure our how to set a heading like this:
"Chapter label/number" (centered,small,italic) (linebreak) "Chapter titel" (centered,bigger,bold)
Is there a command=... to be written, or could it be achieved by combining the various options that setuphead has predefined?
\setupheadertexts[\setups{header}]
\startsetups header \framed [align=middle,strut=no,offset=overlay] {\start \switchtobodyfont[small]\it Chapter \getmarking[chapternumber]\par \stop \start \bf \getmarking[chapter] \stop} \stopsetups
etc etc
----------------------------------------------------------------- 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 -----------------------------------------------------------------
_______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
participants (4)
-
Aditya Mahajan
-
Hans Hagen
-
Steffen Wolfrum
-
Taco Hoekwater