From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/62742 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Caption textcommand option Date: Tue, 19 Oct 2010 20:15:37 +0200 Message-ID: <23F5E984-3AA9-4175-ABBA-B93278FBC034@gmail.com> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1081) Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1287513247 24278 80.91.229.12 (19 Oct 2010 18:34:07 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 19 Oct 2010 18:34:07 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Oct 19 20:34:04 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 1P8H0e-0001Eb-Dv for gctc-ntg-context-518@m.gmane.org; Tue, 19 Oct 2010 20:34:04 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 71150CA758; Tue, 19 Oct 2010 20:34:03 +0200 (CEST) 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 CftgxzbTxttL; Tue, 19 Oct 2010 20:34:03 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 4C1C8CA71C; Tue, 19 Oct 2010 20:34:00 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 98F97CA71C for ; Tue, 19 Oct 2010 20:33:58 +0200 (CEST) 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 TyPFN5BJ2Fdl for ; Tue, 19 Oct 2010 20:33:46 +0200 (CEST) Original-Received: from filter1-nij.mf.surf.net (filter1-nij.mf.surf.net [195.169.124.152]) by balder.ntg.nl (Postfix) with ESMTP id C8A11CA702 for ; Tue, 19 Oct 2010 20:33:46 +0200 (CEST) Original-Received: from mail-bw0-f41.google.com (mail-bw0-f41.google.com [209.85.214.41]) by filter1-nij.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id o9JIXjJX010017 for ; Tue, 19 Oct 2010 20:33:46 +0200 Original-Received: by bwz19 with SMTP id 19so2016826bwz.14 for ; Tue, 19 Oct 2010 11:33:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:content-type:mime-version :subject:from:in-reply-to:date:content-transfer-encoding:message-id :references:to:x-mailer; bh=++t8u9DstYjHAPQuXuia1APGJMKCdAfLmX0PJZokIXQ=; b=uylQaTdbTW1/eyV+NHv3gxU38EKAK1PfGQYOnyJyyl3msRpkVmnK2ZDx9QR6fbtxaV TG6+dc4oYJ9pIs2mhcEjmOr2s2E2nMjvYOpglvDPdnHy53I5dx4Vu4YzREgF5ypN872h tqt0MJa+BSwKT1rBWVT6+43WaQniV39ng1AAU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; b=ZCChPLtkfrzc21xIouyWZjwjVG5TOoe4i2DB+fXG3/1HzuCharbWzzoOQvTcNNh4Xh f8y0+GFqBZxhTOK2Pwd3eU/8kCPWJuxrYoue93qI4pRZHRijwCXAPyD1sAfmccFJ/ufB hKZo77IOZL2Im0hFLoevxGzXjG84BKsBV4bI8= Original-Received: by 10.204.115.210 with SMTP id j18mr5856600bkq.69.1287513225278; Tue, 19 Oct 2010 11:33:45 -0700 (PDT) Original-Received: from [192.168.2.23] (p5B292D1C.dip.t-dialin.net [91.41.45.28]) by mx.google.com with ESMTPS id d27sm8393723bkw.2.2010.10.19.11.33.42 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 19 Oct 2010 11:33:43 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.1081) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.214.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: 07DkGxJeT - 93a839eae6f9 - 20101019 X-Scanned-By: CanIt (www . roaringpenguin . com) on 195.169.124.152 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:62742 Archived-At: Am 19.10.2010 um 16:55 schrieb Cedric Mauclair: >>> Would it be possible to add an options to the captions with name >>> textcommand to typeset the caption text only. In French, we use a >>> point at the end of the captions, but if I want to use \about... >>> somewhere, I end up with the dot too, which I don't want. >>> = >>> [...] >> = >> Make a complete example to show us what do you want to achieve before yo= u try to modify commands. > = > Here is a minimal example. I would like the first caption and the second = reference. Indeed, there is no simple way to achieve what you want and textcommand is the easiest solution (but i would include the strut in the command), e.g. \unprotected\long\def\putcompletecaption#1#2% {\doifsomething{\floatcaptionparameter\c!spacebefore}{\blank[\floatcaptio= nparameter\c!spacebefore]}% % \floatcaptionparameter\c!before % test for side effects first \noindent \xdef\lastcaptiontag{\strut#1}% \dostartattributes{\??kj\currentfloat}\c!style\c!color\empty \ifnofloatnumber \else \hbox{\doattributes{\??kj\currentfloat}\c!headstyle\c!headcolor{\str= ut#1}}% \ifnofloatcaption \else \ifemptyfloatcaption \else \doifelsenothing{\floatcaptionparameter\c!spaceinbetween} {\scratchskip\floatcaptionparameter\c!distance\relax \dotfskip\scratchskip\emergencystretch.5\scratchskip} {\blank[\floatcaptionparameter\c!spaceinbetween]}% \fi \fi \fi \ifnofloatcaption \globallet\lastcaptionht\!!zeropoint \globallet\lastcaptiondp\!!zeropoint \else \doattributes{\??kj\currentfloat}\c!textstyle\c!textcolor {\xdef\lastcaptionht{\strutheight}% \xdef\lastcaptiondp{\strutdepth}% % \begstrut#2\endstrut\endgraf}% \floatcaptionparameter\c!textcommand{\begstrut#2\endstrut}% \endgraf}% \fi \dostopattributes % \floatcaptionparameter\c!after % test for side effects first \doifsomething{\floatcaptionparameter\c!spaceafter}{\blank[\floatcaption= parameter\c!spaceafter]}} \starttext This is some text with a reference to a table named \about[tab:table]. \placetable[here][tab:table]{My caption.}{...} \setupcaptions[textcommand=3D\groupedcommand{}{.}] This is some text with a reference to a table named \about[tab:other-table]. \placetable[here][tab:other-table]{My caption}{...} \stoptext but it=92s possible to get the desired result also with a selector, e.g. \defineselector[caption][max=3D2,n=3D2] \startsetups select:caption \setupselector[caption][n=3D1] \stopsetups \setupcaptions[setups=3Dselect:caption] \starttext This is some text with a reference to a table named \about[tab:table]. \placetable[here][tab:table]{\select{caption}{My caption.}{My caption}}{...} \stoptext Wolfgang ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________