From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/45553 Path: news.gmane.org!not-for-mail From: "Bart C. Wise" Newsgroups: gmane.comp.tex.context Subject: Re: Kerning Date: Thu, 13 Nov 2008 09:20:30 -0700 Message-ID: <200811130920.30680.bntgcontext@wiseguysweb.com> References: <200811120848.15165.bntgcontext@wiseguysweb.com> <200811122318.17727.bntgcontext@wiseguysweb.com> <491BDB53.8050906@wxs.nl> 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 1226593414 2604 80.91.229.12 (13 Nov 2008 16:23:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 13 Nov 2008 16:23:34 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Nov 13 17:24:35 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 1L0eze-00061j-4q for gctc-ntg-context-518@m.gmane.org; Thu, 13 Nov 2008 17:24:30 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 481CE1FC32; Thu, 13 Nov 2008 17:23:20 +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 14113-02-7; Thu, 13 Nov 2008 17:21:58 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 71F9B1FB95; Thu, 13 Nov 2008 17:21:58 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 40D371FB29 for ; Thu, 13 Nov 2008 17:21:56 +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 14113-02-6 for ; Thu, 13 Nov 2008 17:21:00 +0100 (CET) Original-Received: from out02.mta.xmission.com (out02.mta.xmission.com [166.70.13.232]) by ronja.ntg.nl (Postfix) with ESMTP id 38F8F1FB95 for ; Thu, 13 Nov 2008 17:20:35 +0100 (CET) Original-Received: from mx04.mta.xmission.com ([166.70.13.214]) by out02.mta.xmission.com with esmtp (Exim 4.62) (envelope-from ) id 1L0ewa-0000bQ-Sr for ntg-context@ntg.nl; Thu, 13 Nov 2008 09:21:20 -0700 Original-Received: from bwise1.provo.novell.com ([137.65.171.141] helo=bwise1.localnet) by mx04.mta.xmission.com with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1L0ewB-0003Ur-0m for ntg-context@ntg.nl; Thu, 13 Nov 2008 09:20:55 -0700 User-Agent: KMail/1.10.3 (Linux/2.6.27-7-generic; KDE/4.1.3; x86_64; ; ) In-Reply-To: <491BDB53.8050906@wxs.nl> Content-Disposition: inline X-XM-SPF: eid=; ; ; mid=; ; ; hst=mx04.mta.xmission.com; ; ; ip=137.65.171.141; ; ; frm=bntgcontext@wiseguysweb.com; ; ; spf=none X-SA-Exim-Connect-IP: 137.65.171.141 X-SA-Exim-Rcpt-To: ntg-context@ntg.nl X-SA-Exim-Mail-From: bntgcontext@wiseguysweb.com X-SA-Exim-Version: 4.2.1 (built Thu, 07 Dec 2006 04:40:56 +0000) X-SA-Exim-Scanned: No (on mx04.mta.xmission.com); Unknown failure 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:45553 Archived-At: On Thursday 13 November 2008 12:46:27 am Hans Hagen wrote: > 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 > > > > > > P.S. If there's a better way to do the number->word conversion, let me > > know. > > > > On Wednesday 12 November 2008 10:17:35 am Wolfgang Schuster wrote: > >> Am 12.11.2008 um 18:03 schrieb Bart C. Wise: > >>> Okay, it works until I place an an argument in the stretched command. > >>> > >>> def\MyChapterCommand#1#2{ > >>> \framed[align=center,frame=off,width=\textwidth]{ > >>> \vbox{ > >>> fails--> \stretched{#2} > >>> works--> \stretched{This is a Test} > >>> } > >>> } > >>> \setuphead[chapter][ > >>> command=\MyChapterCommand > >>> } > >>> > >>> > >>> I get the following error when I run texexec: > >>> > >>> ! Missing \endcsname inserted. > >>> > >>> \let > >>> \nextprocessedtoken ...oup \ifincolor \ifcsname #1 > >>> #3\endcsname \let > >>> \dostopa... > >>> > >>> \dodoprocesstokens ...token \let \before \between > >>> \fi \let > >>> \nextprocessedtok... > >>> This is a test: \dostartattributes > >>> {\??ko \v!title }\c!style > >>> \c!c... > >>> > >>> \processtokens ...fore \before \doprocesstokens #5 > >>> \lastcharacter > >>> \endgroup > >>> \stretched ... \relax \hss \relax {\hss \hss }{#1} > >>> \egroup > >>> ... > >>> > >>> How can I use the #1 & #2 arguments in the stretched command? > >> > >> You could use it only with \deeptextcommand, here is a old mail > >> with a example from Hans (you could ignore the other code). > >> > >> http://archive.contextgarden.net/message/20060113.102321.bf24d7ca.en.htm > >>l > > look for the property mechanism > > \startproperty[stretch]stretched\stopproperty > > token processing is always tricky since the parser does not know what to > expect; properties use a pdf trick; in mkiv we have more clever stretching > > Hans, I tried the above code and it failed. I looked around on the ConTeXt site and the web in general. It seems like a \defineproperty[stretch] needs to be declared, but I can't find it anywhere. You'll have to excuse my ignorance, but will you be explicit on how to use the \startproperty[stretch] stretch \stopproperty. Bart ___________________________________________________________________________________ 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 ___________________________________________________________________________________