From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/31809 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Albert Krewinkel Newsgroups: gmane.text.pandoc Subject: Auto-number list continuations Date: Mon, 28 Nov 2022 13:01:07 +0100 Message-ID: <87pmd7nuub.fsf@zeitkraut.de> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35471"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCZJF7XJTILRBIOKSKOAMGQE2MCUX5Q-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon Nov 28 13:10:17 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-lf1-f59.google.com ([209.85.167.59]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ozcxj-0008rN-9n for gtp-pandoc-discuss@m.gmane-mx.org; Mon, 28 Nov 2022 13:10:15 +0100 Original-Received: by mail-lf1-f59.google.com with SMTP id k19-20020ac24f13000000b004a49391ef9esf3710495lfr.9 for ; Mon, 28 Nov 2022 04:10:15 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1669637414; cv=pass; d=google.com; s=arc-20160816; b=eAyCffWK0SUQv0uL9mrJ9iFXypI5/g/PYqMSTq3xAayQ7K/4G2NiNvcEnsbHpC/xlF aue1QsMhL6bzozgUxQF4c6jnTGH0+jttjgpuNzjqdu1ckkBsNAsD8rQWYw4/209ynaey 6KImKl7vHla4KAvb//55r2c91NJJSLgtBPoxFq4d/akgkERvlWwQ7MoPMC8Hwg30sZ4u 2j4WF6QwncG3FCkKpr2qLjgUS8i+MT6ZyrRgiuuYhJ2aBD0cw8TJeKSM8XKb2iA+7viP VacOHz6SUNCMtErgpe5oSNFd45QBYyK09V1JS9Sg9x16RV7Qo4f5JBSIKnimazJusIhw /WZQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:content-transfer-encoding :mime-version:message-id:date:subject:to:from:sender:dkim-signature; bh=DMU6c7rG1M/Pkgd2hsDTazcSPRhTLAUtilhqujfuCQs=; b=RtzjoH7XQB6qMYPCr6NWsOUIWpmXE69vSaRLnidJsGq44mbm+5VvAWVK9oQlrRfyQu UV5sxMOKGbVjVYzxZ3ArtalQSIUyq7t8yyXE367BlcHTN3KoPJNnTC5XpW1UnAtJPKMr jWfwCAJZUR8nx1j0RAuOBwUSE1hExmKeNOYUEkzgNMepZ8fTG1Hk/HopWe2Fgj0tNIqw rkFlnhYbofPl8yy43yZgeI1cifPi25Lqtlcc5F9BuMP7PsROmf3wbuwu2rifK6r2FolL nv1xmldihpcb59vO1GZGqGBZRG6YigijoEIWgDchD1U2amApJ1wmqnpJ3mkeMu0o6dIP QP1g== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org designates 80.241.56.151 as permitted sender) smtp.mailfrom=albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender :content-transfer-encoding:mime-version:message-id:date:subject:to :from:sender:from:to:cc:subject:date:message-id:reply-to; bh=DMU6c7rG1M/Pkgd2hsDTazcSPRhTLAUtilhqujfuCQs=; b=PBcqvUGy6CnGuweAh8iYqxLrb4gbYJK/vX5j7A1YbtKd58BIM3EBFKLsZfP8ybFjMj uEPXt8g3gGSCYRwjEgEW7iYdrSF6J7tjKAl6I7vLTs9l380nhpfhL0eMoGZ9QMU0B1lJ 5ep9k/P62hX3rj4GA/J0bWsxNUtYyPwiJMiJXvzjUDzk8yI00rQkyB/VfAgbutgUFtch 5ZU+upA/z/R2ul+U065aXkU/sCp0LFUbEj9tK6nABXy/HgeaDJBrrgZONqeFrlnb0iSl oCcJUdJjFXjO1v70d63b7HYGGlGaWgkxamTLqYN48VyuHYlRjGqGOX1ui4Cp8ByXc/nD Fu/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender :content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:sender:from:to:cc:subject:date:message-id :reply-to; bh=DMU6c7rG1M/Pkgd2hsDTazcSPRhTLAUtilhqujfuCQs=; b=0UFsgS8U5imkb85TOhRVuZ4tjk4qWrcM6YWHIC/MPVGSHJpsBSfogd2RW3UmOOWHCd 2TzoqucJVs5Epcpug1ac/9xHU2UVCbZIYuKf+hN50iO75KBNfgQRchDfb8IKHDhHiBKp T8aAXJjWNMPtLhHMIAa/MLH1X6xhpJKCdctUTp9KqKqm94g5q6CNe6PhbzcOtCYL5QBq 8OKXDTR4fuvE0Y9ylXsofrWeelnbrIL6kJiN8UZj2dsKWJ5cRtWwnhB3pLVH7fM4sgxp uisvtOd3HmYmPFNIdI42n7sHVkT6EKO/Xj4KF7dFSOl Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: ANoB5pkJvtatWMO+cQAURvw7v+R4F/qudOn9EFhlTaalv2RxWbZVgoXX fKgqgJvO5JEuexc67BRup8I= X-Google-Smtp-Source: AA0mqf5cKkCpQKc4EWDncATy9GlXuDc7IQT5Kcck069ltgGWfPvFnZkOCiJ0OEWTB8oKsDV9xpKlHQ== X-Received: by 2002:a05:6512:3a93:b0:4b4:c0c6:c91 with SMTP id q19-20020a0565123a9300b004b4c0c60c91mr16368022lfu.152.1669637414623; Mon, 28 Nov 2022 04:10:14 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:ac2:5e38:0:b0:494:6c7d:cf65 with SMTP id o24-20020ac25e38000000b004946c7dcf65ls728172lfg.2.-pod-prod-gmail; Mon, 28 Nov 2022 04:10:08 -0800 (PST) X-Received: by 2002:a19:431e:0:b0:494:8b3d:bb84 with SMTP id q30-20020a19431e000000b004948b3dbb84mr10885972lfa.48.1669637408523; Mon, 28 Nov 2022 04:10:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669637408; cv=none; d=google.com; s=arc-20160816; b=bbxWU8aITmN5bYTY+g575HYB5U2zqouG29Fygp/GKHV2TOXDLPxmKigmP1J9BqtMfp xZ9aCsDgTxFLXQnPnoE1/aoFfU7wr6wpdOnFzkBtm4cHa3xT0c6WOPSiDP+hl9rFEKWH MTDFNePPciXNmg5D0kg92QpUL8acUZyRUVqRHvORBSaRBqyZ9xyVr37F4bNwjedIDPHF fALC1u8jXyctJZpsEk65SzcVnDCjZr7aRkFmUbCXXdAhZXr5JZZKQOyE+/W2BorJFgAR XysXQ3HdhtF9dEYMfHoAqjJh3qZbXgOQG2syjZthhRJKMxdQykgfGDMgoYoL8jvj3vLg +KFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from; bh=i97kElMJv4xtaM9AgoVZSylFj/yvI1jsF/11rzBCNcY=; b=K79H7JdVseH4zTBP+hOme9DzRs6trkYmd0nRvsLqlstl3R4nQsU2pBupwR/VD/9QXb QWTH47I9KcJ+xTRe3e5+8d5pqXkUB9ZbBmcyjCobesMO44k+BmuVnWAOMTj6LZrwrTnj 4aaCW96Ima07UA+FAVqUs5xnESMfli6QH83S9OrM4xEDuayxBo4gArfKwtU6SnExlqI4 kn2Ta3abM1zc4pasYDwq12+Alf/AClv0KftQsMv2jyfXDtNIWTGGi0MzyDkQkegPfwHO K+9LmT2WPMgmlI1W651fA7zfJdjsZ+0nETbnocmynLe1LUHJCbrd0aRGiZ6B6hhVBouX h4IQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org designates 80.241.56.151 as permitted sender) smtp.mailfrom=albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org Original-Received: from mout-p-101.mailbox.org (mout-p-101.mailbox.org. [80.241.56.151]) by gmr-mx.google.com with ESMTPS id q17-20020a2eb4b1000000b002773925701bsi467408ljm.1.2022.11.28.04.10.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Nov 2022 04:10:08 -0800 (PST) Received-SPF: pass (google.com: domain of albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org designates 80.241.56.151 as permitted sender) client-ip=80.241.56.151; Original-Received: from smtp1.mailbox.org (smtp1.mailbox.org [10.196.197.1]) (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 4NLPRd62Cqz9sX1 for ; Mon, 28 Nov 2022 13:10:05 +0100 (CET) X-Original-Sender: albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org designates 80.241.56.151 as permitted sender) smtp.mailfrom=albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:31809 Archived-At: Just want to share a little filter that I wrote to automate item counting in continued lists. E.g. > i. one > #. another > > Interruption; not part of any list. > > iii. continue > #. keep counting The filter assumes that a continuation has a start number =E2=89=A590 and k= eeps track of different list styles. ``` lua local next_starts =3D {} function OrderedList (ol) local key =3D ol.style .. '|' .. ol.delimiter if ol.start >=3D 90 then ol.start =3D next_starts[key] or 1 next_starts[key] =3D ol.start + #ol.content else next_starts[key] =3D #ol.content + 1 end return ol end ``` There's also a blog post, but the above is already the gist of it. https://tarleb.com/posts/list-continuation/ --=20 Albert Krewinkel GPG: 8eed e3e2 e8c5 6f18 81fe e836 388d c0b2 1f63 1124 --=20 You received this message because you are subscribed to the Google Groups "= pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an e= mail to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/= pandoc-discuss/87pmd7nuub.fsf%40zeitkraut.de.