* Forcing line-breaks in a Chapter title
@ 2002-07-02 3:26 Christopher Cardinale
2002-07-02 7:03 ` Hans Hagen
0 siblings, 1 reply; 4+ messages in thread
From: Christopher Cardinale @ 2002-07-02 3:26 UTC (permalink / raw)
I want the words "Chapter 1" to appear on one line and the title of the
chapter to appear on the line below it. I can't seem to get this to
work. Here is my code:
\def\ChapterStyle#1#2{%
{\tx \bf Chapter {#1}}\\%
{\tfd {#2}}%
}
\setuphead[chapter][%
before={\blank[0.25\textheight,force]},
after={\blank[medium]},
numberstyle=\bf,
textstyle=\bf,
command=\ChapterStyle%
]
\chapter{My Chapter}
ConTeXt seems to be ignoring the \\ and just puts it all on one line.
Can anyone advise?
__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Forcing line-breaks in a Chapter title
2002-07-02 3:26 Forcing line-breaks in a Chapter title Christopher Cardinale
@ 2002-07-02 7:03 ` Hans Hagen
2002-07-02 12:35 ` Christopher Cardinale
0 siblings, 1 reply; 4+ messages in thread
From: Hans Hagen @ 2002-07-02 7:03 UTC (permalink / raw)
Cc: ntg-context
At 08:26 PM 7/1/2002 -0700, you wrote:
>I want the words "Chapter 1" to appear on one line and the title of the
>chapter to appear on the line below it. I can't seem to get this to
>work. Here is my code:
>
>\def\ChapterStyle#1#2{%
> {\tx \bf Chapter {#1}}\\%
> {\tfd {#2}}%
>}
>
>\setuphead[chapter][%
> before={\blank[0.25\textheight,force]},
> after={\blank[medium]},
> numberstyle=\bf,
> textstyle=\bf,
> command=\ChapterStyle%
>]
>
>\chapter{My Chapter}
>
>
>ConTeXt seems to be ignoring the \\ and just puts it all on one line.
>
>Can anyone advise?
in cont-new.tex add a line:
\def\setlocalheadsetup{\setlocalkopsetup}
and then say
\def\ChapterStyle...{\localheadsetup....}
but, better, change your \\ into \endgraf; \\ is a command that has no real
fixed meaning, i.e. the meaning depends on the situation and is a space by
default.
-------------------------------------------------------------------------
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
-------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Forcing line-breaks in a Chapter title
2002-07-02 7:03 ` Hans Hagen
@ 2002-07-02 12:35 ` Christopher Cardinale
2002-07-02 22:02 ` Christopher Cardinale
0 siblings, 1 reply; 4+ messages in thread
From: Christopher Cardinale @ 2002-07-02 12:35 UTC (permalink / raw)
Sorry, but none of those solutions seem to work: I keep getting
"Chapter 1" and "Chapter Title" on the same line. I guess I could adopt
a different design, but I'm a little surprised at the way ConTeXt is
behaving.
--- Hans Hagen <pragma@wxs.nl> wrote:
> At 08:26 PM 7/1/2002 -0700, you wrote:
> >I want the words "Chapter 1" to appear on one line and the title of
> the
> >chapter to appear on the line below it. I can't seem to get this to
> >work. Here is my code:
> >
> >\def\ChapterStyle#1#2{%
> > {\tx \bf Chapter {#1}}\\%
> > {\tfd {#2}}%
> >}
> >
> >\setuphead[chapter][%
> > before={\blank[0.25\textheight,force]},
> > after={\blank[medium]},
> > numberstyle=\bf,
> > textstyle=\bf,
> > command=\ChapterStyle%
> >]
> >
> >\chapter{My Chapter}
> >
> >
> >ConTeXt seems to be ignoring the \\ and just puts it all on one
> line.
> >
> >Can anyone advise?
>
> in cont-new.tex add a line:
>
> \def\setlocalheadsetup{\setlocalkopsetup}
>
> and then say
>
> \def\ChapterStyle...{\localheadsetup....}
>
> but, better, change your \\ into \endgraf; \\ is a command that has
> no real
> fixed meaning, i.e. the meaning depends on the situation and is a
> space by
> default.
>
>
>
>
-------------------------------------------------------------------------
> 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
>
-------------------------------------------------------------------------
>
__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Forcing line-breaks in a Chapter title
2002-07-02 12:35 ` Christopher Cardinale
@ 2002-07-02 22:02 ` Christopher Cardinale
0 siblings, 0 replies; 4+ messages in thread
From: Christopher Cardinale @ 2002-07-02 22:02 UTC (permalink / raw)
This seems to work, but what I need is some way to measure the width of
some arbitrary text so that I can set the size of the \hskip.
\def\ChapterStyle#1#2{%
{\bf Chapter {#1}}
\vtop to 5ex{\vskip5ex \hskip-5em {#2}}%
}
\setuphead[chapter][
before={\blank[0.25\textheight,force]},
after={\blank[4*big]},
textstyle=\bf,
numberstyle=\bf,
command=\ChapterStyle%
]
\chapter{My Article}
__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-07-02 22:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-02 3:26 Forcing line-breaks in a Chapter title Christopher Cardinale
2002-07-02 7:03 ` Hans Hagen
2002-07-02 12:35 ` Christopher Cardinale
2002-07-02 22:02 ` Christopher Cardinale
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).