From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/31815 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: BPJ Newsgroups: gmane.text.pandoc Subject: Re: Auto-number list continuations Date: Mon, 28 Nov 2022 23:33:23 +0100 Message-ID: References: <87pmd7nuub.fsf@zeitkraut.de> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000003a5f4405ee8f7639" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22858"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCWMVYEK54FRBQHOSSOAMGQEH5XDIFI-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon Nov 28 23:33:41 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-pl1-f192.google.com ([209.85.214.192]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ozmh2-0005kM-Jv for gtp-pandoc-discuss@m.gmane-mx.org; Mon, 28 Nov 2022 23:33:40 +0100 Original-Received: by mail-pl1-f192.google.com with SMTP id o8-20020a170902d4c800b001898ea5e030sf3568921plg.13 for ; Mon, 28 Nov 2022 14:33:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1669674819; cv=pass; d=google.com; s=arc-20160816; b=CYmIIuvMIxZaYEpbOI1fEppddmuE4DzQzsua/Qx4/7nJSXNLG6ww6Wa49VHiuCSm2I 0mANPpdBoiZ5ZOG9WFmHlz22QTJl8CClqlLtbwVPIczEFNeeqqSX4Wiw+Kx6HcSS52G2 g9h4MvoDLUyuwDFz48LTaSXyr2S+66rmtXRZx+ALbHmFFwLi37zBSVEstvQpBxYmOoUP IJ+ZI05m0HBjqScb2Qdza5GkOIgCb69oTrufhnHbBo6wCJ8j+XfrkiiLGHMEGUZRogYU ZxhUT6eh1xYxFJ08dyuq9YnaF3Ygqy3Qf38vmuwlj1GBaWXZVib7M1ozliSIJdN3wPOV plDg== 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:to:subject:message-id:date :from:in-reply-to:references:mime-version:sender:dkim-signature :dkim-signature; bh=6jTDy7DlMtJhLUc5KIym9j/tRiTt0S9/I0FDz/EWeOY=; b=rN5GpFvsQaCYsRWldi3LPHST4fA1NXAcXEbOrZGBFJasH5KPCpwj9BAO4F1CQdg17x uzODaqvRiAoZ+wMTkh2xnNIiKnNLA7VGjGPwzvCqe9k1O46rkS1HX/RFNaUKe42yvorF 3W4UXH1xOJD4RdOdl+Nto6C3JK1A62h+hv+j2c0Js/wpqvHMPqvRlp2Fq3c/jf0NMGQk gV2agzCJzbIQkeA7Cq3o5Yj1s8gN/vz7tLHDTyBBuWjX8p06wLEpOUbttqS2ULLI+Bce xjRgapZvmCbigA7I6esWSYmGT+CtTjYwoi1+rsaOMg4W7aExPGfwRmi5+p/QqQsIgveQ bZjQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=GsmjzYHp; spf=pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::1131 as permitted sender) smtp.mailfrom=melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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:to:subject :message-id:date:from:in-reply-to:references:mime-version:sender :from:to:cc:subject:date:message-id:reply-to; bh=6jTDy7DlMtJhLUc5KIym9j/tRiTt0S9/I0FDz/EWeOY=; b=oUPw+1CaWNHJTnC0THV40EV6JFbGRNkqx1tjVGjicc6PJ0aDs0JI+rDNlclScdKvg0 CaJ3ASsyxXOM6slFTs4U4VyCv+usSRrzTulzpNPmbX3ehv1KUpmBi28T14xi3L2fsHoj KYa+vtjvaHRdP/mBTxZokSVl9a0VALx+ie8xxGltjdKYIZdkGydU/r8C10AottmRdrW/ CDVI0X+6ZKhANVNMy9iigUQ2R9Qo1YvrNDG7AEXQ3XX1h5jl9MVjX0BB/7DLi13vm/M3 HwWcXEvv2ONCVCuaEjzoPcRqytVnsWWe72VYwrlj7qlSjQgD9/1NKItHKtkL6fVbOHua Ux0g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.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:to:subject :message-id:date:from:in-reply-to:references:mime-version:from:to:cc :subject:date:message-id:reply-to; bh=6jTDy7DlMtJhLUc5KIym9j/tRiTt0S9/I0FDz/EWeOY=; b=MSi0wMMJPzG1y9tLbNRx+Q9IyeqirUowTycVvCMaGBXNhQuAB5VnI7POK+kMJjVZvW p/HfLKCxtQo/wGPPkW9cqO3+Er3QkpV+W//uFOVrAKf+6vBay5Qzi3LWa/L/10bDi4fV HzvoOHdLysVLqTYaTGRMKeOdsW80LExS+wLlaWfRxYGDPwMM9cEYjaEjygsnHWDnhNL2 63zwrW74Q7e3P77bppnmpX9O3CTEwV6iRUqB2mDFxknzIgoTiKnXkV8nxbYggQVAICn7 6BSjZ+nkiT4yPWr9kMnssK9v3Yv7KZz/nJ+iCbaJ7jSTrMN1WWhuU/GRVcXVyD7ciTWt Pw1w== 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:to:subject :message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:sender:from:to:cc:subject:date:message-id :reply-to; bh=6jTDy7DlMtJhLUc5KIym9j/tRiTt0S9/I0FDz/EWeOY=; b=hwv4dFnKz4rxTy3uQXOfeo6gJis6HWZMq+BUV18ahSG0xjmOTwRlQDt948F2ot9Hf5 xAIF5grJ/xPAAwn51V89sMOf9IE2v7/ULRyuAUq77OUSRcqBlIA/xir1N3Rpf6leNvST tpVyGXtoE/ePJ2X2PU/5Cxg2yqWpitGENfuVpDzZilQXFIvYScUD1hQ9Dh+5ZIW7vK6D mRomqklGZOpVaun5MAs2JnID3W9JH/vvmeg4tpV99GuMGLe00YRWP6W8LY8A9LyWsJkf GyjCy4EFahIJ1wKp5+R3Lt4wcZWgzPIpuzZmVcJc3rA10k Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: ANoB5pkhk4NULOFfvqUHfRMtHyNsujGBJ8cFhA2HXjBdVYPZ+U+EW4p0 TtNg4HD3qKpaLRkHi8OpfxI= X-Google-Smtp-Source: AA0mqf7z9papo3VuHsLEn9sA7fXc5APT53DChFr4kCM5SFecQ2j3ehH3vQkVSUHW/ANPbo+i6BI35A== X-Received: by 2002:a17:90a:67c4:b0:213:ba14:3032 with SMTP id g4-20020a17090a67c400b00213ba143032mr63048778pjm.111.1669674819283; Mon, 28 Nov 2022 14:33:39 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6a00:1d99:b0:56c:78e9:352e with SMTP id z25-20020a056a001d9900b0056c78e9352els6087214pfw.7.-pod-prod-gmail; Mon, 28 Nov 2022 14:33:35 -0800 (PST) X-Received: by 2002:a62:1bce:0:b0:574:91bc:13d5 with SMTP id b197-20020a621bce000000b0057491bc13d5mr22253325pfb.35.1669674815685; Mon, 28 Nov 2022 14:33:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669674815; cv=none; d=google.com; s=arc-20160816; b=quNoN/4161Am2YeYm1dm0BzOPSGgqQdgbBj8yhXpcQLck2gnY1/82TEWJ3vHfQF1eG CzDw8jI7YewAmdaSIVnznU8TXwcblaR8qURBebre9zR9MhTqZDyU9B9K0yefGBGAuxWv 4qPad+xZiY54HnvasBbMb5pnYhm28JOoXY/VztC2IKxm5aRkwm1K/JTu0K1/YM2OZuOg lCzUT9HjKM3iznub1Uca9K/O5rmbW64xSPk/vvaBa2ukd2sQiQd47P6Fgu4yxVBjYR3j Fjw4iEm0NUfP/kZzhDr++sZ6r/MhwMkDR65qU1UEk0ttFuaAIrEiGhbZ2lVdlXQKLFHz EiIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=nP8LTirE1wnTJd93bpibfndCBXz7Q40fruR7yu2nUHc=; b=vZqnBI4TY0YwAm+blsuhGfOC+WuaaVUMZ8obOEjYOhy2QXuiNCHIbXC0/bDEqtxRVg XiusoXgLVjjnrF0VFEkfe/EPNiCG2T2+B4vJNtIed5IPN8u9oXozt4qYXfBW2jAgH+kj 5/av+OrGqbXmQaUyXDVCyzmduuV9Xmgr2vFpQIQ+jC5vX30rJ2eszHb7RR3m6V714P29 5y3YsB7wURUjG4RcUJSPp1L2qvEI1RGlZ1CNeOkoK35flEbxtQxNuXoPiq6Q5+5Wz4dj xPwuPcU0fAQSAh1Mir7SqZXjORmKI63lGWS6u++BhJFTgM5TC8jemJ88Pb7JVfh1netX 72Fw== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=GsmjzYHp; spf=pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::1131 as permitted sender) smtp.mailfrom=melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Original-Received: from mail-yw1-x1131.google.com (mail-yw1-x1131.google.com. [2607:f8b0:4864:20::1131]) by gmr-mx.google.com with ESMTPS id c5-20020a170902d48500b00186b3b9870fsi652949plg.11.2022.11.28.14.33.35 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 28 Nov 2022 14:33:35 -0800 (PST) Received-SPF: pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::1131 as permitted sender) client-ip=2607:f8b0:4864:20::1131; Original-Received: by mail-yw1-x1131.google.com with SMTP id 00721157ae682-3c21d6e2f3aso60817637b3.10 for ; Mon, 28 Nov 2022 14:33:35 -0800 (PST) X-Received: by 2002:a81:a148:0:b0:3b4:8af5:48e with SMTP id y69-20020a81a148000000b003b48af5048emr22629227ywg.383.1669674814822; Mon, 28 Nov 2022 14:33:34 -0800 (PST) In-Reply-To: <87pmd7nuub.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org> X-Original-Sender: melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=GsmjzYHp; spf=pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::1131 as permitted sender) smtp.mailfrom=melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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:31815 Archived-At: --0000000000003a5f4405ee8f7639 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Den m=C3=A5n 28 nov. 2022 13:10Albert Krewinkel skrev: > 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= keeps > 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 > ``` > I would have expected that you would need `topdown=3Dtrue` for this to work= . Why not? > There's also a blog post, but the above is already the gist of it. > https://tarleb.com/posts/list-continuation/ > > -- > Albert Krewinkel > GPG: 8eed e3e2 e8c5 6f18 81fe e836 388d c0b2 1f63 1124 > > -- > 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 > email 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%40zeitkra= ut.de > . > --=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/CADAJKhCeP59UU5sf92H0NKG5DtiPFfj10hr%3Drtv0XpMCoW-C5Q%40mail= .gmail.com. --0000000000003a5f4405ee8f7639 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


Den m=C3=A5n 28 nov. 2022 13:10Albert Krewinkel <albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org> skrev:
Just want to share a l= ittle filter that I wrote to automate item
counting in continued lists. E.g.

> i.=C2=A0 =C2=A0one
> #.=C2=A0 =C2=A0another
>
> Interruption; not part of any list.
>
> iii. continue
> #.=C2=A0 =C2=A0keep 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)
=C2=A0 local key =3D ol.style .. '|' .. ol.delimiter
=C2=A0 if ol.start >=3D 90 then
=C2=A0 =C2=A0 ol.start =3D next_starts[key] or 1
=C2=A0 =C2=A0 next_starts[key] =3D ol.start + #ol.content
=C2=A0 else
=C2=A0 =C2=A0 next_starts[key] =3D #ol.content + 1
=C2=A0 end

=C2=A0 return ol
end
```

I would have expected that you would need `topdown=3Dtrue` for this to w= ork. Why not?

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://group= s.google.com/d/msgid/pandoc-discuss/CADAJKhCeP59UU5sf92H0NKG5DtiPFfj10hr%3D= rtv0XpMCoW-C5Q%40mail.gmail.com.
--0000000000003a5f4405ee8f7639--