public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: BPJ <melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Cc: Hossam Ghorab <hossamghorab404-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: Re: Use {@x} to End a Numbered Example List, where x is identifier for this specific list
Date: Thu, 30 Dec 2021 13:16:17 +0100	[thread overview]
Message-ID: <CADAJKhA0Xe6mx+tDhA1Qze7_zwXSWhDvbwwoLKo2gRWGzyv6aw@mail.gmail.com> (raw)
In-Reply-To: <m2czlfyzj0.fsf-jF64zX8BO0+FqBokazbCQ6OPv3vYUT2dxr7GGTnW70NeoWH0uzbU5w@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 6432 bytes --]

Den ons 29 dec. 2021 20:37John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> skrev:

> Hossam Ghorab <hossamghorab404-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>
> > Thanks for sharing your idea. Maybe we can post our suggestions
> somewhere
> > where core Pandoc developers can see? They don't seem very active here.
>
> Really?  I've posted here 320 times in the last year.
>
> Note that the syntax `(@foo)` is already used for regular example
> lists; `foo` identifies the specific list number, not a list
> series.
>

Hence my proposal of curly brackets. However I discovered a later fuller
version where I addressed the issue of named list items, the full syntax
being

    @{[^]<counter_name>[:<item_name>][([<counter init>[!]]["<label>"[!]])]}

where the parts in `[…]` are optional, each of `<counter_name>` and
`<item_name>` is an (ASCII) alphanumeric identifier and `<counter init>` is
a valid decimal, roman or alphabetical (starting) list item number and `!`
indicates that the counter/label should be reinitialized/set even if it has
been initialized/set before (e.g. for a per-chapter counter), and `^`
indicates that the label should have an initial capital (like in Bash
parameter expansion) so that e.g.

`(@{foo:bar(i)})`

~   Initializes the counter `foo` with lowercase Roman numerals starting
from one *unless* it has been initialized before, and sets the identifier
of this item to `bar` and no label. Renders as `(i)`

`(@{foo:bar(i!)})`

~   The same but forces the reinitialization of the counter.

`(@{foo:baz})`

~   Either a list item marker of counter `foo` with list item identifier
`baz` or a reference to the same (possibly becoming a link in formats which
allow that).

`(@{^sentence:quux(1 "mening")})`

~   Initializes the counter `sentence` to 1, with label "mening" (Swedish
for 'Sentence') and item identifier `quux`. Renders as `(Mening 1)`.

`(@{^sentence:fop})`

~   List item or reference of the above counter with item identifier `fop`.
Renders as `(Mening <n>)`, where `<n>` is the sequential number of item
`fop`.

`@{sentence:fop}`

~   Reference to the same item which renders as `mening <n>` without
capitalization of the label.



>
> >> This has come up before, and it wouldn't surprise me if there is
> already
> >> an issue for it, although I can't find one at the moment. (For all that
> I
> >> know I might even have opened such an issue myself but don't remember
> it.)
> >> I have a file with a proposal, but I don't remember if I ever posted
> it. My
> >> idea was to use curly brackets to distinguish counters from citations
> so
> >> `(@{foo})` would be the counter named `foo` and then optionally a colon
> and
> >> a number/letter which gives the numbering type and the start number as
> for
> >> regular lists so `@{foo:10}` = the counter `foo` starting at 10 with
> >> decimal numbers, `@{bar:x}` = the counter `bar` starting at 10 with
> >> lowercase roman numbers, `@{baz:J}` = the counter `baz` starting at 10
> with
> >> upper alpha numbers, with the `:N` bit being ignored except at the
> first
> >> occurrence of the counter, or maybe resetting the counter, as I imagine
> >> that one of the main usea of this feature might be to have a separate
> count
> >> for each chapter, and then resetting the same counter makes sense.
> >>
> >> Den ons 22 dec. 2021 21:17Hossam Ghorab <hossamg...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:
> >>
> >>> Dear all,
> >>>
> >>> Regarding the [continued numbered example lists](
> >>> https://pandoc.org/MANUAL.html#numbered-example-lists). A problem is
> >>> that we can only define a single list that gets continued along the
> >>> document. Why don't we use `(@x)` where we can simply call the
> identifier
> >>> of this list, x, whenever we want to continue it's numbering? The list
> >>> identifier may be any character not just a number. Something like:
> >>>
> >>> ``` (@1) element 1 of list 1 (@1) element 2 of list 1
> >>> --interruption---- List 2: (@2) element 1 of list 2  (@2) element 2 of
> >>> list 2  ---- interruption---- List 1 continuous: (@1) element 3 of
> list 1
> >>>    (@1) element 4 of list 1
> >>> ```
> >>> This is a primary suggestion open to all kinds of arguments. And many
> >>> thanks to [@cderv](https://github.com/cderv) who has been a great
> help
> >>> regarding Pandoc issues facing Rmarkdown users.
> >>>
> >>> --
> >>> 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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> >>> To view this discussion on the web visit
> >>>
> https://groups.google.com/d/msgid/pandoc-discuss/bae691bb-767f-4d26-9e6e-21886fea9bd2n%40googlegroups.com
> >>> <
> https://groups.google.com/d/msgid/pandoc-discuss/bae691bb-767f-4d26-9e6e-21886fea9bd2n%40googlegroups.com?utm_medium=email&utm_source=footer
> >
> >>> .
> >>>
> >>
> >
> > --
> > 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/febfa13f-00aa-4526-875e-5e33c024d02dn%40googlegroups.com
> .
>
> --
> 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/m2czlfyzj0.fsf%40MacBook-Pro-2.hsd1.ca.comcast.net
> .
>

-- 
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/CADAJKhA0Xe6mx%2BtDhA1Qze7_zwXSWhDvbwwoLKo2gRWGzyv6aw%40mail.gmail.com.

[-- Attachment #2: Type: text/html, Size: 9909 bytes --]

      parent reply	other threads:[~2021-12-30 12:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-22 20:16 Hossam Ghorab
     [not found] ` <bae691bb-767f-4d26-9e6e-21886fea9bd2n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-12-22 20:18   ` Hossam Ghorab
2021-12-23 10:13   ` BPJ
     [not found]     ` <CADAJKhCMDSvHQNesFWoZyZ5OKXsv1hsBc44PBHBPZKX3zsAadw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2021-12-23 19:47       ` Hossam Ghorab
     [not found]         ` <febfa13f-00aa-4526-875e-5e33c024d02dn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-12-29 19:36           ` John MacFarlane
     [not found]             ` <m2czlfyzj0.fsf-jF64zX8BO0+FqBokazbCQ6OPv3vYUT2dxr7GGTnW70NeoWH0uzbU5w@public.gmane.org>
2021-12-29 22:47               ` Hossam Ghorab
     [not found]                 ` <f60b6c88-99e5-4d3f-881d-63c5063f47d5n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-12-30  0:09                   ` John MacFarlane
2021-12-30 12:16               ` BPJ [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CADAJKhA0Xe6mx+tDhA1Qze7_zwXSWhDvbwwoLKo2gRWGzyv6aw@mail.gmail.com \
    --to=melroch-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=hossamghorab404-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).