From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/45520 Path: news.gmane.org!not-for-mail From: "Wolfgang Schuster" Newsgroups: gmane.comp.tex.context Subject: Re: Kerning Date: Thu, 13 Nov 2008 09:36:11 +0100 Message-ID: <115224fb0811130036p50261bf6v2d7543121904735f@mail.gmail.com> References: <200811120848.15165.bntgcontext@wiseguysweb.com> <200811121003.56433.bntgcontext@wiseguysweb.com> <643EDA65-4829-4FE8-8681-04BD4BE01891@gmail.com> <200811122318.17727.bntgcontext@wiseguysweb.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1226565479 29214 80.91.229.12 (13 Nov 2008 08:37:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 13 Nov 2008 08:37:59 +0000 (UTC) Cc: ntg-context@ntg.nl To: "Bart C. Wise" Original-X-From: ntg-context-bounces@ntg.nl Thu Nov 13 09:38:59 2008 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1L0Xj9-0003fO-BA for gctc-ntg-context-518@m.gmane.org; Thu, 13 Nov 2008 09:38:59 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 7DE971FB6B; Thu, 13 Nov 2008 09:37:49 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 28440-05-4; Thu, 13 Nov 2008 09:36:50 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 725121FB5B; Thu, 13 Nov 2008 09:36:50 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id DEB2D1FB3C for ; Thu, 13 Nov 2008 09:36:48 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 01889-03 for ; Thu, 13 Nov 2008 09:36:11 +0100 (CET) Original-Received: from ey-out-1920.google.com (ey-out-1920.google.com [74.125.78.146]) by ronja.ntg.nl (Postfix) with ESMTP id D0F241FB60 for ; Thu, 13 Nov 2008 09:36:11 +0100 (CET) Original-Received: by ey-out-1920.google.com with SMTP id 21so290959eyc.38 for ; Thu, 13 Nov 2008 00:36:11 -0800 (PST) Original-Received: by 10.103.222.1 with SMTP id z1mr5723703muq.100.1226565371549; Thu, 13 Nov 2008 00:36:11 -0800 (PST) Original-Received: by 10.103.213.18 with HTTP; Thu, 13 Nov 2008 00:36:11 -0800 (PST) In-Reply-To: <200811122318.17727.bntgcontext@wiseguysweb.com> Content-Disposition: inline X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:45520 Archived-At: On Thu, Nov 13, 2008 at 7:18 AM, Bart C. Wise 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 ___________________________________________________________________________________