From: "Wolfgang Schuster" <schuster.wolfgang@googlemail.com>
To: "Bart C. Wise" <bntgcontext@wiseguysweb.com>
Cc: ntg-context@ntg.nl
Subject: Re: Kerning
Date: Thu, 13 Nov 2008 09:36:11 +0100 [thread overview]
Message-ID: <115224fb0811130036p50261bf6v2d7543121904735f@mail.gmail.com> (raw)
In-Reply-To: <200811122318.17727.bntgcontext@wiseguysweb.com>
On Thu, Nov 13, 2008 at 7:18 AM, Bart C. Wise
<bntgcontext@wiseguysweb.com> wrote:
> Wolfgang, thanks so much for your help so far.
>
> I was able to take the code and make it work correctly to stretch the chapter
> title. What I want is two lines for a chapter head. For example,
> Line 1: "Chapter One"
> Line 2: "Title for Chap 1"
>
> I want line 1 to be stretched. Everything I have tried does not work. I can
> get the "Chapter" word to stretch, but not the whole line (and it should
> probably be treated as a whole line when stretching). I was never able to get
> the chapter number (now a word) to stretch.
>
> So how do I grab the output for line 1 and then stretch it?
>
> Here's a sample of what I have without any stretching:
>
> \def\Myheader#1#2{%
> \framedtext[width=0.60\textwidth, frame=off, align=middle]{%
> \vbox{\headtext{chapter}~#1 \blank #2}}}
>
> \def\englishnumbers#1{
> \ifcase#1 \or ONE\or TWO\or THREE\or FOUR\or FIVE\fi}
> \defineconversion[englishnumbers][\englishnumbers]
>
> \setupsection[chapter][conversion=englishnumbers]
> \setuphead [chapter][
> command=\Myheader,
> textcommand=\bfd,
> ]
> \setupheadtext[chapter=CHAPTER] % used by \headtext
> \starttext
> \chapter{Title for Chap 1}
> \processfile{tufte}
> \stoptext
\def\Myheader#1#2%
{\framed
[width=0.60\textwidth,
frame=off,
align=middle]
{\determineheadnumber[chapter]
\expanded{\stretchednormalcase{CHAPTER~\convertnumber{englishnumbers}{\currentheadnumber}}}
\blank#2}}
\def\englishnumbers#1{
\ifcase#1 \or ONE\or TWO\or THREE\or FOUR\or FIVE\fi}
\defineconversion[englishnumbers][\englishnumbers]
\setuphead
[chapter]
[command=\Myheader,
deeptextcommand=\stretchednormalcase,
textstyle=\bfd]
> P.S. If there's a better way to do the number->word conversion, let me know.
Search for \numprint in the list archive.
Wolfgang
___________________________________________________________________________________
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 : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2008-11-13 8:36 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-12 15:48 Kerning Bart C. Wise
2008-11-12 15:54 ` Kerning Wolfgang Schuster
2008-11-12 16:28 ` Kerning Bart C. Wise
2008-11-12 17:03 ` Kerning Bart C. Wise
2008-11-12 17:17 ` Kerning Wolfgang Schuster
2008-11-13 6:18 ` Kerning Bart C. Wise
2008-11-13 7:46 ` Kerning Hans Hagen
2008-11-13 16:20 ` Kerning Bart C. Wise
2008-11-14 15:00 ` Kerning Hans Hagen
2008-11-13 8:36 ` Wolfgang Schuster [this message]
2008-11-13 15:26 ` Kerning Bart C. Wise
[not found] <429D6DD1.2040005@wxs.nl>
[not found] ` <429D734F.7040203@elvenkind.com>
[not found] ` <429D7FB5.90406@wxs.nl>
2005-06-02 15:31 ` [NTG-pdftex] kerning Taco Hoekwater
2005-06-28 12:10 ` kerning 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=115224fb0811130036p50261bf6v2d7543121904735f@mail.gmail.com \
--to=schuster.wolfgang@googlemail.com \
--cc=bntgcontext@wiseguysweb.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).