From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/105452 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Kerry Sainsbury Newsgroups: gmane.comp.tex.context Subject: Re: How to sort list of sections? Date: Fri, 8 Nov 2019 09:45:24 +1300 Message-ID: References: Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3501648111602125766==" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="265093"; mail-complaints-to="usenet@blaine.gmane.org" Cc: mailing list for ConTeXt users To: Hans Hagen Original-X-From: ntg-context-bounces@ntg.nl Thu Nov 07 21:46:01 2019 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iSofI-0016rh-RJ for gctc-ntg-context-518@m.gmane.org; Thu, 07 Nov 2019 21:46:00 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 8DBFB162C08; Thu, 7 Nov 2019 21:45:43 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mE6CFf-badlr; Thu, 7 Nov 2019 21:45:42 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 9DA22162C06; Thu, 7 Nov 2019 21:45:42 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 8C43E162C08 for ; Thu, 7 Nov 2019 21:45:41 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id q3z6gPTxUy43 for ; Thu, 7 Nov 2019 21:45:40 +0100 (CET) Received-SPF: None (mailfrom) identity=mailfrom; client-ip=209.85.208.175; helo=mail-lj1-f175.google.com; envelope-from=kerry@fidelma.com; receiver= Original-Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com [209.85.208.175]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 5598C162C03 for ; Thu, 7 Nov 2019 21:45:40 +0100 (CET) Original-Received: by mail-lj1-f175.google.com with SMTP id m9so3781547ljh.8 for ; Thu, 07 Nov 2019 12:45:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fidelma-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=XaB+e8/tESClGDVXXePl3bOtVWpmeB5mmk+db1AQB/0=; b=EdKuDPrKnmkwt1x8YGKtSxDYUEjwtOUbqiZb8JPDBhMZ0j3lxYvxkRix/7TfqcmgKB /l8X02IOscjy6a2XSr7DKhl+ktCVIpSepM6LOfFoDGpar2MWvM5+Squ74cyB2T94SPGj ale/rAvv2UdQgV/tINXcfKdvSLUDgMZCt0KZ45CC1rZM2ItOiX9cnO5f0JEwvn59FMjN BqlhG7uuP4NEgsQv5TWe9oudCM69WKwq7IIwOK2cMG3GzG1z5F4ZB/F4jVW6iIpyNad8 8axxvSwnFTtKEZfPnsbAAWl8GO4WCNgxHGjZA+qhDbVB2HjazFu2XdFY5+JiWIWHcx4k pwYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=XaB+e8/tESClGDVXXePl3bOtVWpmeB5mmk+db1AQB/0=; b=FjZKbRj0yh/aXhyO3cGFFV9DTLlaj18IfhZIC4moF+Q2udPWF27d4fwTTh10wChtJA aZx0WuCbU82iDjPX+G2lSTuArqOZgDJWESUde8yeMHTPz0hIdx5CR3RuZ5fANtvOLqZ/ /Y7npXk58lJ+LBAPuWsu9K0GivI3Bm5goDy2J89JIMbP4YTEy45ucxD+pWxuAxm1Ek3m qpoIlHC7pFQ3+4zE2Uwhpxrjiz2UD/de+T5R9XtZY4fHmCcuSaZA+xYIYU6cTLy3+p0p b5ZaUcy146byqpkI7oDiziCk2ohtDQ92X8l4lQg/AogTQlrK+upjr2q++caZc7cHTRVs 5+DQ== X-Gm-Message-State: APjAAAVfLMOwIj43rcM+JHvQ7k6GVQ5o+GNieRpS872Xf9HstGH0iqPN F9+LHvJNPKgqgluGG1sbD8+YPWoqoZ5kXyXMciodIQ== X-Google-Smtp-Source: APXvYqwdJdh36iNJydHU7irVMRt0RyFNfHWLWUH26FSHFsSBA5gMGLkDw7Een52iDI2CgITFgCfs668xGfZ6VKy4B6w= X-Received: by 2002:a2e:95c5:: with SMTP id y5mr4023436ljh.184.1573159539333; Thu, 07 Nov 2019 12:45:39 -0800 (PST) In-Reply-To: X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 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:105452 Archived-At: --===============3501648111602125766== Content-Type: multipart/alternative; boundary="0000000000008467ac0596c7bfa3" --0000000000008467ac0596c7bfa3 Content-Type: text/plain; charset="UTF-8" Thanks Hans. For the sake of any future users who may have stumbled across this post I want to point out that if you want the list of sections to appear at the *end *of your document you need to use "criterium=previous" \placelist[section][criterium=previous,order=title] On Fri, 8 Nov 2019 at 04:52, Hans Hagen wrote: > On 11/7/2019 12:13 AM, Kerry Sainsbury wrote: > > Hi Folks, > > > > If sections are just lists, and lists can be sorted, how can I sort a > > list of sections? > > My actual goal is to generate an 'index' that is made up of section > > headings. > > Here's my attempt that does not work. > here's one that does ... > > \setuphead[section][number=no] > > \starttext > > \startchapter[title=foo] > > \placelist[section][criterium=local,order=title] > > \startsection[title={Beta}] \input sapolsky \stopsection > \startsection[title={Alpha}] \input sapolsky \stopsection > \startsection[title={Gamma}] \input sapolsky \stopsection > > \stopchapter > > \stoptext > > it's an experimental feature already present for a while but probably > unknown > > Hans > > > ----------------------------------------------------------------- > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl > ----------------------------------------------------------------- > --0000000000008467ac0596c7bfa3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks Hans. For the sake of any future users who may= have stumbled across this post I want to point out that if you want the li= st of sections to appear at the end of your document you need to use= "criterium=3Dprevious"


\placelist[sec= tion][criterium=3Dprevious,order=3Dtitle]


On Fri, 8= Nov 2019 at 04:52, Hans Hagen <j.hagen@xs4all.nl> wrote:
On 11/7/2019 12:13 AM, Kerry Sainsbury wro= te:
> Hi Folks,
>
> If sections are just lists, and lists can be sorted, how can I sort a =
> list of sections?
> My actual goal is to generate an 'index' that is made up of se= ction
> headings.
> Here's my attempt that does not work.
here's one that does ...

\setuphead[section][number=3Dno]

\starttext

\startchapter[title=3Dfoo]

=C2=A0 =C2=A0 =C2=A0\placelist[section][criterium=3Dlocal,order=3Dtitle]
=C2=A0 =C2=A0 =C2=A0\startsection[title=3D{Beta}]=C2=A0 \input sapolsky \st= opsection
=C2=A0 =C2=A0 =C2=A0\startsection[title=3D{Alpha}] \input sapolsky \stopsec= tion
=C2=A0 =C2=A0 =C2=A0\startsection[title=3D{Gamma}] \input sapolsky \stopsec= tion

\stopchapter

\stoptext

it's an experimental feature already present for a while but probably <= br> unknown

Hans


-----------------------------------------------------------------
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0Hans Hagen | PRAGMA ADE
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Ridderstraat 27 | 80= 61 GH Hasselt | The Netherlands
=C2=A0 =C2=A0 =C2=A0 =C2=A0 tel: 038 477 53 69 | www.pragma-ade.nl | www.= pragma-pod.nl
-----------------------------------------------------------------
--0000000000008467ac0596c7bfa3-- --===============3501648111602125766== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============3501648111602125766==--