ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Pablo Rodriguez <oinos@gmx.es>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: after with fixed position
Date: Sun, 1 May 2016 13:14:22 +0200	[thread overview]
Message-ID: <e3bf58c9-2b58-1949-f105-4b3970e0e1e1@gmx.es> (raw)
In-Reply-To: <56E96F19.4090606@gmx.es>

On 03/16/2016 03:35 PM, Pablo Rodriguez wrote:
> Dear list,
> 
> I have the following sample:
> 
>     \showgrid
>     \setuphead[chapter][after={\blank[10*big]}]
>     \starttext
>     \chapter{Knuth}
>     \input knuth
>     \chapter{Zapf}
>     \input zapf
>     \chapter{Knuth\\\&\\Zapf}
>     \input zapf\par\input zapf
>     \stoptext
> 
> How could I have the text after the chapter heading with a fixed
> distance, no matter how many lines the title itself has?

For future reference (and replying to myself), the solution may read:

    \showgrid
    \define[2]\chapterframe{\framed[frame=off, height={10em},
        align=high]{#2}}
    \setuphead[chapter][command={\chapterframe}]
    \starttext
    \chapter{Knuth}
    \input knuth
    \chapter{Zapf}
    \input zapf
    \chapter{Knuth\\\&\\Zapf}
    \input zapf\par\input zapf
    \stoptext

The code comes from the user that reported the issue at
https://github.com/ousia/context-critica/issues/1.

Just in case it may be useful to anyone,


Pablo
-- 
http://www.ousia.tk
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2016-05-01 11:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-16 14:35 Pablo Rodriguez
2016-05-01 11:14 ` Pablo Rodriguez [this message]
2016-05-01 14:32   ` Aditya Mahajan
2016-05-01 14:50     ` Pablo Rodriguez

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=e3bf58c9-2b58-1949-f105-4b3970e0e1e1@gmx.es \
    --to=oinos@gmx.es \
    --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).