From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/89659 Path: news.gmane.org!not-for-mail From: Christoph Reller Newsgroups: gmane.comp.tex.context Subject: Re: Reference text differing from title Date: Mon, 29 Dec 2014 16:09:19 +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="===============0685121957==" X-Trace: ger.gmane.org 1419865839 22719 80.91.229.3 (29 Dec 2014 15:10:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 29 Dec 2014 15:10:39 +0000 (UTC) To: ntg-context Original-X-From: ntg-context-bounces@ntg.nl Mon Dec 29 16:10:35 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 1Y5bxn-00016Z-By for gctc-ntg-context-518@m.gmane.org; Mon, 29 Dec 2014 16:10:31 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 9C36310221 for ; Mon, 29 Dec 2014 16:10:30 +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 5P8nLl81es4o for ; Mon, 29 Dec 2014 16:10:29 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 409D810235 for ; Mon, 29 Dec 2014 16:09:52 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 4F094101F9 for ; Mon, 29 Dec 2014 16:09:49 +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 Ii3gvyp18Nm8 for ; Mon, 29 Dec 2014 16:09:48 +0100 (CET) Original-Received: from filter4-til.mf.surf.net (filter4-til.mf.surf.net [194.171.167.220]) by balder.ntg.nl (Postfix) with ESMTP id 73C6D101FA for ; Mon, 29 Dec 2014 16:09:47 +0100 (CET) Original-Received: from mail-ig0-x22f.google.com (mail-ig0-x22f.google.com [IPv6:2607:f8b0:4001:c05::22f]) by filter4-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id sBTF9eNi013321 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Mon, 29 Dec 2014 16:09:46 +0100 Original-Received: by mail-ig0-f175.google.com with SMTP id h15so11336819igd.14 for ; Mon, 29 Dec 2014 07:09:39 -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=2teYU02N+BXLWH+hAAOC4ufaWHWoSi+MXnH5sNbbg3s=; b=M6r613Ece0+RZ2hOowaiePSLUUtZbA7/nW3tuGhDC5Lpb6Iu328DjqM8Q4qPBHZZdU QLb6wO+Jh8fnYOKG0yzvt/Y5af10lJyd/TiDXMFgEGJsJjIJSZmeeKIFGY+wXjmZ5vnC KfTTfh81J3FVhR27+u5ctFuwiLK0xdH2Xy7c26yat2iJOqRI6Y9Hqmo7ErG3up693r+u QdVNBzWoQpEY/zvUCjxJQJR34yH7oBEAy6bbndF4AqSUBZBmPChBEoL6WMLle3F+U5L+ F3oFomwos5yR8ZQdISNE1c10naP3jWARV/2C/f0GZ1e9WnQwo9OzlzE5Ql2888u58CKJ izcA== X-Received: by 10.50.30.3 with SMTP id o3mr765488igh.44.1419865779475; Mon, 29 Dec 2014 07:09:39 -0800 (PST) Original-Received: by 10.107.165.149 with HTTP; Mon, 29 Dec 2014 07:09:19 -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::22f; country=US X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0VNxr9FRo - 5ac0d659c334 - 20141229 (trained as not-spam) Received-SPF: pass (filter4-til.mf.surf.net: domain of christoph.reller@gmail.com designates 2607:f8b0:4001:c05::22f as permitted sender) receiver=filter4-til.mf.surf.net; client-ip=2607:f8b0:4001:c05::22f; envelope-from=; helo=mail-ig0-x22f.google.com; identity=mailfrom 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:89659 Archived-At: --===============0685121957== Content-Type: multipart/alternative; boundary=e89a8f83941f6a1a96050b5c434e --e89a8f83941f6a1a96050b5c434e Content-Type: text/plain; charset=UTF-8 On Wed, Nov 26, 2014 at 6:32 AM, Christoph Reller < christoph.reller@gmail.com> wrote: > > 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 > Dear Wolfgang, The example you have provided works well for section titles, table of contents and references. What about bookmarks? The following extension of your example produces a bookmark "1 chaptertitle{Long title for the chapter}{Short title}": \setupinteraction[state=start] \placebookmarks[chapter] \defineselector[chaptertitle][max=2,n=2] \setuphead[chapter][textcommand={\setupselector[chaptertitle][n=1]}] \starttext \startchapter[reference=sec:short,title=\select{chaptertitle}{Long title for the chapter}{Short title}] \input knuth \about[sec:short] \stopchapter \stoptext For setuphead, is there something like a "textcommand" key for bookmarks? Thank you for any help, Christoph --e89a8f83941f6a1a96050b5c434e Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On W= ed, Nov 26, 2014 at 6:32 AM, Christoph Reller <christoph.reller@g= mail.com> wrote:
On Tue, Nov 25, 2014 at 5:33 PM= ,=C2=A0Wolfgang= Schuster=C2=A0wrote:
> Am 24.11.2014 um 14:0= 0 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.
Chri= stoph
=C2=A0
Dear Wolfgang,

The example you have provided wo= rks well for section titles, table of contents and references. What about b= ookmarks? The following extension of your example produces a bookmark "= ;1 chaptertitle{Long title for the chapter}{Short title}":
<= br>
\setupinteraction[state=3Dstart]
\placebookmar= ks[chapter]
\defineselector[chaptertitle][max=3D2,n=3D2]
\setuphead[chapter][textcommand=3D{\setupselector[chaptertitle][n=3D1]}]<= /div>
\starttext
\startchapter[reference=3Dsec:short,title=3D= \select{chaptertitle}{Long title for the chapter}{Short title}]
\= input knuth
\about[sec:short]
\stopchapter
\s= toptext

For setuphead, is there something li= ke a "textcommand" key for bookmarks?

Th= ank you for any help,
Christoph
--e89a8f83941f6a1a96050b5c434e-- --===============0685121957== 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= --===============0685121957==--