From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/63534 Path: news.gmane.org!not-for-mail From: Mathieu Boespflug <0xbadcode@gmail.com> Newsgroups: gmane.comp.tex.context Subject: Grabbing first letter of a sentence Date: Mon, 15 Nov 2010 17:38:54 +0100 Message-ID: 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: dough.gmane.org 1289839148 20397 80.91.229.12 (15 Nov 2010 16:39:08 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 15 Nov 2010 16:39:08 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Nov 15 17:39:03 2010 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PI259-0002rg-5g for gctc-ntg-context-518@m.gmane.org; Mon, 15 Nov 2010 17:39:03 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id CBA3CCA844; Mon, 15 Nov 2010 17:39:01 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id EHuuRo3p3mxw; Mon, 15 Nov 2010 17:38:59 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 2D405CA840; Mon, 15 Nov 2010 17:38:59 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 3E58DCA840 for ; Mon, 15 Nov 2010 17:38:58 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 1yl0qg-P-Qaq for ; Mon, 15 Nov 2010 17:38:56 +0100 (CET) Original-Received: from filter5-ams.mf.surf.net (filter5-ams.mf.surf.net [192.87.102.73]) by balder.ntg.nl (Postfix) with ESMTP id 39CDACA83A for ; Mon, 15 Nov 2010 17:38:56 +0100 (CET) Original-Received: from mail-vw0-f41.google.com (mail-vw0-f41.google.com [209.85.212.41]) by filter5-ams.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id oAFGcsSR016897 for ; Mon, 15 Nov 2010 17:38:55 +0100 Original-Received: by vws10 with SMTP id 10so820505vws.14 for ; Mon, 15 Nov 2010 08:38:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=+GUPjBkUlWS66MmyPNcZiqec5wJUHM4syb0eB3vJpto=; b=pYkeiGYNVx7zh+UbTCjPmQC8HW/3JZyDAW8eh4u6zlPHTnYWqp7nkMeDF89pu9tXzB U5A0lwSHnxv4paq0+xBBH82WVBWBRdBfiHoc2LfqqCcRmvLvqhqOIcD7a+XsH+4LYE6K qa5Qf2xinP0QT0ONwf8wIbIojra5JpXNdO2lg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=hr44cwfvjQa9x0ftCXngmuhlYBGfc05kANgZtzl/u2cXhxrhXD1y3zOGwpGej8ydQ6 6ljzMrSefsWtuSbQI6DuNwimwId9k7qXXccXURVNOoCVigHvYhCFDNtJ2A4WmhCEwTU/ MXSBjIlD5mK2BAQX8OJzyxwsMoc2/Gc5mTi3s= Original-Received: by 10.229.182.212 with SMTP id cd20mr5301327qcb.27.1289839134624; Mon, 15 Nov 2010 08:38:54 -0800 (PST) Original-Received: by 10.229.121.6 with HTTP; Mon, 15 Nov 2010 08:38:54 -0800 (PST) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.212.41; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0BDvsCTKo - fd7fbe25390f - 20101115 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.73 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 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 Xref: news.gmane.org gmane.comp.tex.context:63534 Archived-At: Hi, I'd like to get access to the first letter of a chapter for the purpose of laying out the chapter heading, but I'm having difficulty with expansion. Here's my attempt: \def\MyChapterTitle#1#2{% \def\doMyChapterTitle##1##2^{% {\tfb ##1}##2 } #1 \doMyChapterTitle#2^ } setuphead[chapter][command=\MyChapterTitle] \starttext \chapter{Foo} bar \stoptext This doesn't work because the chapter title isn't expanded out before passing it to \MyChapterTitle. I know there is deeptextcommand but I need the chapter title during the layout of chapter number + title, so I need to use command instead of deeptextcommand. I attempted to get hold of the chapter title using the following \def\MyChapterTitle#1#2{% \def\doMyChapterTitle##1##2^{% {\tfb ##1}##2 } #1 \expandafter\doMyChapterTitle\expandafter{\fetchmark[chapter][first]}^ } but that doesn't seem to work either. Any ideas? Many thanks, M ___________________________________________________________________________________ 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 ___________________________________________________________________________________