ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* \chapter with \vbox?
@ 2003-09-30  8:52 Michal Kvasnicka
  2003-10-02  8:10 ` Patrick Gundlach
  0 siblings, 1 reply; 2+ messages in thread
From: Michal Kvasnicka @ 2003-09-30  8:52 UTC (permalink / raw)


Dear friends.

I want to typeset a document on a grid. Moreover I want to typeset each 
chapter heading on a separate page this way:

\blank[5*line]
... here is motto...
\vfil
... here is the chapter title and chapter number...
\blank[5*line]

I must include it in a \vbox. I tried \vbox to \textheight, but now the 
motto doesn't fit to a grid. How could I do it? Many thanks for your help.

Michal Kvasnicka

P.S. My chapter setting is like this:

\setuphead[chapter]
  [page=,
   style={\ss\bfe\setupinterlinespace[line=\NormalBaselineskip]},
   numberstyle={\ss\bff\setupinterlinespace[line=\NormalBaselineskip]},
   before={\page\setuplayout[footer=0pt]\page[right]},
   after={\page\setuplayout[footer=3\NormalBaselineskip]},
   command=\MyChapterCommand]
\def\MyChapterCommand#1#2{%
  \vbox to \textheight{%
    \setupinterlinespace[line=\NormalBaselineskip]%
    \blank[5*line,force]%
    \startnarrower[left,right]%
      \leavevmode{\rm\tf\em\the\mottotoks}\par
    \stopnarrower
    \vskip0pt plus 1filll
    \hbox to \textwidth{\hss\vbox{\hsize=0.8\textwidth
      \startframedtext
        [width=0.8\textwidth,align={left,broad}, offset=1.5ex,
         background=color, backgroundcolor=black]
    {\setupinterlinespace[line=28pt]\white #2}%
      \stopframedtext}}
    \kern-\baselineskip
    \vbox to 0pt{%
      \vss
      \hbox to \hsize{%
        \hss\bff #1%
    {\setbox0=\hbox{#1}\ifdim\wd0=0pt\else
        \hbox to0pt{.\hss}\hskip0.8\textwidth\strut\hskip2.5mm\fi}%
      }
    }
    \blank[4*line,force]
  }
 \global\mottotoks={}
}

If trying the code, you must either define \ss\bfe and \ss\bff fonts, or 
remove them.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: \chapter with \vbox?
  2003-09-30  8:52 \chapter with \vbox? Michal Kvasnicka
@ 2003-10-02  8:10 ` Patrick Gundlach
  0 siblings, 0 replies; 2+ messages in thread
From: Patrick Gundlach @ 2003-10-02  8:10 UTC (permalink / raw)


Michal Kvasnicka <quasar@econ.muni.cz> writes:

Hi,


[...]

>
> If trying the code, you must either define \ss\bfe and \ss\bff fonts,
> or remove them.

You might think about posting a minimal but complete example that
works for us without changing any fonts.

Pat
-- 
You are your own rainbow!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-10-02  8:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-30  8:52 \chapter with \vbox? Michal Kvasnicka
2003-10-02  8:10 ` Patrick Gundlach

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).