From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/113851 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Denis Maier via ntg-context Newsgroups: gmane.comp.tex.context Subject: Re: Setting table of contents depth by number rather than by list Date: Fri, 24 Dec 2021 18:42:47 +0100 (CET) Message-ID: <189952948.474639.1640367767341@office.mailbox.org> References: <585d8aea-8e50-e4c7-cb62-e9f62506fba0@gmail.com> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6212567894484716572==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23861"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Denis Maier To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Dec 24 18:43:19 2021 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n0ob8-00063U-SZ for gctc-ntg-context-518@m.gmane-mx.org; Fri, 24 Dec 2021 18:43:18 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id CCBDE280F79; Fri, 24 Dec 2021 18:42:54 +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 L4V3zjQ-bUa7; Fri, 24 Dec 2021 18:42:53 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 447C1288F68; Fri, 24 Dec 2021 18:42:53 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 942B0288F68 for ; Fri, 24 Dec 2021 18:42:52 +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 1CyXPnebJ3EO for ; Fri, 24 Dec 2021 18:42:51 +0100 (CET) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=80.241.56.151; helo=mout-p-101.mailbox.org; envelope-from=denismaier@mailbox.org; receiver= Original-Received: from mout-p-101.mailbox.org (mout-p-101.mailbox.org [80.241.56.151]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id A0F32280F79 for ; Fri, 24 Dec 2021 18:42:51 +0100 (CET) Original-Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:105:465:1:2:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4JLDt26f14zQkBm for ; Fri, 24 Dec 2021 18:42:50 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1640367768; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7IU/oZsmPpnHzKUaEHG6tzQSzXbt6eIQkkLkoI7jcUE=; b=dEjk8DXOMzaMXUk2QZDTnXgQs2lJYjR0cgWTVwnO/0Fi4qwFpuHxR28hn3/J4c5EWY5WyL 1BinNMb/NiPreeQ8WvIN4aUT3wQeBavTc6qNto6AkQHorUTgcoL4n+7cfsW12IdjVWfUno QeAjT8kEPeChalzPKj45deKw5ES81FHgv3Y8vVc0xJf41olh+MAhSc1HvzJ79yiYboCzum WYpsw3U0+Uz+JstedBMaU7i0gGm5F52OLBqzQKxtudYPudgYz0JSWSbHMWk07/tkBWHANy JfmkG1v6pyTU3WrIZUaOcqHaEMGj9VPGH4WSPinUvoov2ojTaDB17F+SmbQIog== In-Reply-To: <585d8aea-8e50-e4c7-cb62-e9f62506fba0@gmail.com> X-Priority: 3 Importance: Normal 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.io gmane.comp.tex.context:113851 Archived-At: --===============6212567894484716572== Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit
Can't you just define a default structurelevel scheme and a default combined list for the six. If a user redefines the structure level scheme, they will just redefine the combined list as well. Would that work?

Denis
Jason Ross via ntg-context <ntg-context@ntg.nl> hat am 24.12.2021 17:45 geschrieben:


Dear list,

Is it possible to set the maximum table of contents depth to a number
rather than providing an explicit list of section names?


Background:

I am developing an exporter for Org mode. In Org, users can specify the
number of levels they want in the table of contents with a number. I
currently do this by having the sectioning commands be known to the
exporter so I can generate a command like
\setupcombinedlist
[content]
[list={section,subsection}]
for n=2.

I'm considering using \start/stopsectionlevel for sectioning commands
instead. That way, users could add \definesectionlevels to the document
preamble to use whatever sectioning scheme they wanted. However, this
would mean that the exporter wouldn't know what sectioning commands to
use the TOC setup.


Thanks,

Jason
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

___________________________________________________________________________________
--===============6212567894484716572== 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== --===============6212567894484716572==--