ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Berend de Boer <berend@pobox.com>
Subject: Aligning hboxes on top instead of on baseline
Date: Tue, 14 Nov 2000 10:32:58 +0100	[thread overview]
Message-ID: <3A1106CA.C659E643@pobox.com> (raw)

Hello All,

I want to `align' text on the top of their boxes instead of using the
baselineskip or whatever is causing the problem.

I've defined a chapter that puts its number in the right margin.
However, the number is much larger than the chapter title. TeX aligns
these on the bottom of the text, so the number `pushes' the chapter
title down. But I want them aligned at the top, so the number should
stick out to the bottom.

Is this possible to do independent of the body font and the selected
number font size?  I've done things like this by manual shifting things
down until it looked good, but perhaps their is a more elegant solution.

Demo:

-------------------------------
% interface=en

\setupbodyfont
  [ber,pos,ss]

% put chapter title above paragraph, number in right margin
\def\myhead#1#2%
  {\doifsomething{#1}%
     {\rlap{\hskip\tekstbreedte\hskip\rechtermargeafstand#1}}%
   #2}

\setuphead
  [chapter]
  [style=\bfc,
   numberstyle={\switchtobodyfont[36pt]},
   command=\myhead]

\starttext

\chapter{Test}

\input tufte.tex

\stoptext
--------------------------------------

Groetjes,

Berend. (-:


             reply	other threads:[~2000-11-14  9:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-14  9:32 Berend de Boer [this message]
2000-11-14 11:34 ` Hans Hagen
2000-11-14 13:01   ` Berend de Boer
2000-11-14 13:55     ` Hans Hagen

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=3A1106CA.C659E643@pobox.com \
    --to=berend@pobox.com \
    /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).