From: Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>
To: ntg-context@ntg.nl
Subject: [NTG-context] Re: Doubt when centering titles
Date: Tue, 16 Sep 2025 21:34:15 +0200 [thread overview]
Message-ID: <a7f2a283-2dc1-4cb8-8b81-40a9c55de278@gmail.com> (raw)
In-Reply-To: <CALr_-zUasZZK39kuGUN6Cwk0hrmJ8KWjAaOa848kPPuATKkf0A@mail.gmail.com>
Am 16.09.2025 um 20:33 schrieb Alan Caruanambo:
> I have the following code. How can I make the number and text centered
> as if they were a single block?
You can use "alternative=paragraph" for \setuphead but it ignores the
width setting.
To get centered text and a shorter text width you have to create you own
layout for the title:
\define[2]\SectionCommand
{\vbox\bgroup
\headsetupspacing
\hsize=.75tw
\begstrut#1\nobreakspace#2\endstrut
\egroup}
\setuphead
[section]
[style=\ss\bfc,
align=middle,
indentnext=yes,
margin=.125tw,
command=\SectionCommand,
color=darkred]
Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2025-09-16 19:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-16 18:33 [NTG-context] " Alan Caruanambo
2025-09-16 19:34 ` Wolfgang Schuster [this message]
2025-09-16 19:47 ` [NTG-context] " Alan Caruanambo
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=a7f2a283-2dc1-4cb8-8b81-40a9c55de278@gmail.com \
--to=wolfgang.schuster.lists@gmail.com \
--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).