ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Michal Kvasnicka <quasar@econ.muni.cz>
Subject: \chapter with \vbox?
Date: Tue, 30 Sep 2003 10:52:15 +0200	[thread overview]
Message-ID: <3F79443F.7040900@econ.muni.cz> (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.

             reply	other threads:[~2003-09-30  8:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-30  8:52 Michal Kvasnicka [this message]
2003-10-02  8:10 ` Patrick Gundlach

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3F79443F.7040900@econ.muni.cz \
    --to=quasar@econ.muni.cz \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).