From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/89315 Path: news.gmane.org!not-for-mail From: Christoph Reller Newsgroups: gmane.comp.tex.context Subject: Re: Reference text differing from title Date: Wed, 26 Nov 2014 06:32:00 +0100 Message-ID: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1469480225==" X-Trace: ger.gmane.org 1416979978 1795 80.91.229.3 (26 Nov 2014 05:32:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 26 Nov 2014 05:32:58 +0000 (UTC) To: ntg-context Original-X-From: ntg-context-bounces@ntg.nl Wed Nov 26 06:32:54 2014 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XtVDh-0002er-Ik for gctc-ntg-context-518@m.gmane.org; Wed, 26 Nov 2014 06:32:53 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id B52121023E for ; Wed, 26 Nov 2014 06:32:52 +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 StRQFh5n9O2C for ; Wed, 26 Nov 2014 06:32:51 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 1108810240 for ; Wed, 26 Nov 2014 06:32:28 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 3FCBE101E8 for ; Wed, 26 Nov 2014 06:32:24 +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 EB2f2MesnIlu for ; Wed, 26 Nov 2014 06:32:23 +0100 (CET) Original-Received: from filter3-ams.mf.surf.net (filter3-ams.mf.surf.net [192.87.102.71]) by balder.ntg.nl (Postfix) with ESMTP id E6946101E4 for ; Wed, 26 Nov 2014 06:32:22 +0100 (CET) Original-Received: from mail-ig0-x234.google.com (mail-ig0-x234.google.com [IPv6:2607:f8b0:4001:c05::234]) by filter3-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id sAQ5WKg4012628 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Wed, 26 Nov 2014 06:32:21 +0100 Original-Received: by mail-ig0-f180.google.com with SMTP id h15so2052494igd.1 for ; Tue, 25 Nov 2014 21:32:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=NF9Bd4binlP0CrLvD8xQHBWXgG0BPeDh/k8L5XKtLY8=; b=c5uEewhAaezn0P7BefuPcNpc3GMjLUPAmyfhI3KMM6k20qp/On2jYCp2MkCRRpCdqX iYFerrSW8ydd3W3F6x3zZ4/V+xUDR2knUn+utevNzMa8tNLfMzXMr55vdI0s0YqvsvKL zFjOLFC/ZWgzbO040a+3JFBCtgZOXWTwhLL5LAnMPD7mxr0ncptyQ18Rfwy6gXXmnWeM lPPSiehe/d36SItg2d529za4EC688ncJANN97Ydd1xy/LCKfcBTfMteX60l1E2LGLRqW 5hs9h/lLFlBTZd9AYgyc3OypmilokUHwk6iw0xfuWZOJDlSIx5agNq1/R4YuM4VcoCi0 4aqw== X-Received: by 10.107.15.226 with SMTP id 95mr28229213iop.12.1416979940187; Tue, 25 Nov 2014 21:32:20 -0800 (PST) Original-Received: by 10.107.165.143 with HTTP; Tue, 25 Nov 2014 21:32:00 -0800 (PST) X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=2607:f8b0:4001:c05::234; country=US X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 03Nk5wlHa - f73890f4dd86 - 20141126 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.org gmane.comp.tex.context:89315 Archived-At: --===============1469480225== Content-Type: multipart/alternative; boundary=001a113fe428fd25520508bc59e4 --001a113fe428fd25520508bc59e4 Content-Type: text/plain; charset=UTF-8 On Tue, Nov 25, 2014 at 5:33 PM, Wolfgang Schuster wrote: > > Am 24.11.2014 um 14:00 schrieb Christoph Reller < > christoph.reller@gmail.com>: > > > > Is it possible to change the text shown in \about[...] to be something > else than the text given to the title key of \startsection? > > > > \starttext > > \startsection[ > > title={Very Long}, > > % referencetext={Short}, % <- is there something like this? > > reference=mysec] > > We are now in \about[mysec]. % <- should render as "Short" > > \stopsection > > \stoptext > > > > Thank you for any help, > > You can use the selector mechanism to set multiple texts for the title. > > \defineselector[chaptertitle][max=2,n=2] > > \setuplist[chapter][textcommand={\setupselector[chaptertitle][n=1]}] > \setuphead[chapter][textcommand={\setupselector[chaptertitle][n=1]}] > > \starttext > > \completecontent > > \startchapter[reference=sec:short,title=\select{chaptertitle}{Long title > for the chapter}{Short title}] > > \input knuth > > \about[sec:short] > > \stopchapter > > \stoptext > > Wolfgang > Thank you Wolfgang! This is a perfect solution. Christoph --001a113fe428fd25520508bc59e4 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On T= ue, Nov 25, 2014 at 5:33 PM,=C2=A0Wolfgang Schuster=C2=A0wrote:
> Am 24.11.2014 um 14:00 schrieb Christoph Reller <christoph.reller@gmail.com>:
>
> Is it possible to change the text shown in \about[...] to be s= omething else than the text given to the title key of \startsection?
>
> \starttext
> \startsection[
>=C2=A0 =C2=A0title=3D{Very Long},
> %=C2=A0 referencetext=3D{Short}, % <- is there something like this?=
>=C2=A0 =C2=A0reference=3Dmysec]
>=C2=A0 =C2=A0We are now in \about[mysec]. % <- should render as &quo= t;Short"
> \stopsection
> \stoptext
>
> Thank you for any help,

You can use the selector mechanism to set multiple texts for the title.

\defineselector[chaptertitle][max=3D2,n=3D2]

\setuplist[chapter][textcommand=3D{\setupselector[chaptertitle][n=3D1]}] \setuphead[chapter][textcommand=3D{\setupselector[chaptertitle][n=3D1]}]
\starttext

\completecontent

\startchapter[reference=3Dsec:short,title=3D\select{chaptertitle}{Long titl= e for the chapter}{Short title}]

\input knuth

\about[sec:short]

\stopchapter

\stoptext

Wolfgang
=C2=A0
Thank you Wolfgang! This is = a perfect solution.
Christoph
--001a113fe428fd25520508bc59e4-- --===============1469480225== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly90ZXguYWFuaGV0Lm5ldAphcmNoaXZlICA6IGh0dHA6Ly9mb3VuZHJ5LnN1cGVsZWMu ZnIvcHJvamVjdHMvY29udGV4dHJldi8Kd2lraSAgICAgOiBodHRwOi8vY29udGV4dGdhcmRlbi5u ZXQKX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX18= --===============1469480225==--