From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/105441 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Kerry Sainsbury Newsgroups: gmane.comp.tex.context Subject: How to sort list of sections? Date: Thu, 7 Nov 2019 12:13:22 +1300 Message-ID: Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4731739223465897155==" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="231408"; mail-complaints-to="usenet@blaine.gmane.org" To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Nov 07 00:14:24 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 1iSUVL-000y3B-Ra for gctc-ntg-context-518@m.gmane.org; Thu, 07 Nov 2019 00:14:23 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 19A0E162B21; Thu, 7 Nov 2019 00:13: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 qJoM5tyd64If; Thu, 7 Nov 2019 00:13:40 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 16973162B23; Thu, 7 Nov 2019 00:13:40 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 4D60D162B20 for ; Thu, 7 Nov 2019 00:13:39 +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 l1koiGPrhFSb for ; Thu, 7 Nov 2019 00:13:38 +0100 (CET) Received-SPF: None (mailfrom) identity=mailfrom; client-ip=209.85.167.48; helo=mail-lf1-f48.google.com; envelope-from=kerry@fidelma.com; receiver= Original-Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com [209.85.167.48]) (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 7F01B162B1F for ; Thu, 7 Nov 2019 00:13:38 +0100 (CET) Original-Received: by mail-lf1-f48.google.com with SMTP id 19so14251359lft.13 for ; Wed, 06 Nov 2019 15:13:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fidelma-com.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=nURvHYldNW9OhKGHmbVIKLY2ELJB4idqmxKsRe3JQs4=; b=XhsUOTSH9OyVuSac1r0HOL6t59cgwerUub6U0DGnaqoVKRwxwndo4PxXVuAbw3Y9Wg S0wHyRDRrZZCiv2B+0x6Pzbt3yG9+9Ksnqe0SSPK64VuA0n+MzVnHJoJI1W9ZrcCi1l7 90/9rxrLGIlY2cH4Vxl8cX8UAyX4c4DXlxdHLkCfrc1cZPh5wj3IVQNSyuCXKYMiZKtV cFxf6ZNrtgWzXtlYZkp+5baWll9cLU6qm70MxvI8kpb0ctuu2iZEYwhv2fmOor0aVBWW LIhNtuiZtXFjEDYvUxN67AePdQ39oLTMwKkpU9Suk8Lqk6DdNf7topJzLT3GUBz4gwXX sv+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=nURvHYldNW9OhKGHmbVIKLY2ELJB4idqmxKsRe3JQs4=; b=pkalat50EWL1lykC5gFdp+H+LL5yBeInRMoPjZ+EHzXmEaATV+xRrX/C2rsap2pzWh F8AtK8flm9V+ytSNLp4GAlc45Wq2ttb+Z+goomoF8syMV9FQQsF84NNQzFs1itv94vC7 KTYMbkzXAypF8cypRbbYuXQSxxpFYPd6jRrcugOAiosZ4o3HpacTtOuh5OPthniRIORb pkjHZGLz7uURo9lVBPt5hVRdQamu8ptlMg0D0KauIkTEpPRY+87khHZlzSFk7SJD8Hka nA57mF556/yF37vogmFLm3+ij0WgOVUMMF2aEU2+z6K2dNldphEIq9U2OoO6HQ3GeKeG ojiQ== X-Gm-Message-State: APjAAAXOAY6RJaYRJ33Mn+mHw7ZDqkFEoMW21UriELVe+B0K4u17WNkN L2Q6cMXG+Fy83T9oD4Sxff2yVu/1P88LSqgo+RFr822AcV4= X-Google-Smtp-Source: APXvYqwn51jtrdP7VYOcyqPW5VqqnvGO8elC5T0/NdOlYkktlIkr3v3j79cU3gMWlxJfFDefeBicRWRt0K3qHSTl74E= X-Received: by 2002:ac2:5930:: with SMTP id v16mr7616028lfi.67.1573082017009; Wed, 06 Nov 2019 15:13:37 -0800 (PST) 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:105441 Archived-At: --===============4731739223465897155== Content-Type: multipart/alternative; boundary="000000000000d3a6690596b5b25b" --000000000000d3a6690596b5b25b Content-Type: text/plain; charset="UTF-8" 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. \setuphead[section][number=no ] % This was a guess at how I might be able to sort sections. I was wrong :-) \definesorting[section][sections] \setupsorting[sections][criterium=all] % I thought something like this might work too \definesorting[wahs] \definesorting[wah][wahs][\getmarking[section]][\getmarking[section]] \starttext placelist (not sorted, as you would expect): \placelist[section] \blank placelistofsorts (doesn't render anything. My guess was wrong) \placelistofsorts[wahs] Sections start here: \startsection[title={Beta}] Hello \startsection[title={Alpha}] World \stoptext Thank you for your time. I really appreciate it. Kerry --000000000000d3a6690596b5b25b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Folks,

If sections are ju= st lists, and lists can be sorted, how can I sort a list of sections?
<= /div>
My actual goal is to generate an 'index' that = is made up of section headings.
Here's my attempt = that does not work.


\setuphead[section][number=3Dno ]


% This was a guess at how I might be able to= sort sections. I was wrong :-)

\definesorting[section][sections]

=

\setupsorting[sections][criterium=3Dall]


% I thought something like this might work t= oo

\definesorting[wahs]

\definesorting[wah][wahs][\getmarking[sectio= n]][\getmarking[section]]


\starttext

placelist (not sorted, as you would expect):=

\placelist[section]

\blank


placelistofsorts (doesn't render anythin= g. My guess was wrong)

\placelistofsorts[wahs]


Sections start here:

\startsection[title=3D{Beta}]

Hello


\startsection[title=3D{Alpha}]

World

\stoptext



Thank you for your time. I really ap= preciate it.


= Kerry

--000000000000d3a6690596b5b25b-- --===============4731739223465897155== 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== --===============4731739223465897155==--