* All numeric heading identifiers @ 2021-08-29 17:49 andreas....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org [not found] ` <70061a93-5913-4668-8bac-3bdaedb9c710n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 0 siblings, 1 reply; 5+ messages in thread From: andreas....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org @ 2021-08-29 17:49 UTC (permalink / raw) To: pandoc-discuss [-- Attachment #1.1: Type: text/plain, Size: 1037 bytes --] I read the sections Heading Identifiers and Extension: auto_identifiers <https://pandoc.org/MANUAL.html#extension-auto_identifiers> in the manual. So, I think I understand why the following produces `id="section"` $ printf '# 47\n' | pandoc <h1 id="section">47</h1> But why is it that I cannot make Pandoc use a specific identifier like in $ printf '# 47 {#47}\n' | pandoc <h1 id="section">47 {#47}</h1> I expected Pandoc to produce `id="47"`. BTW, I came upon this because I was wondering how to reference ISO dates in headers, like ## 2021-08-29 because ## 2021-08-29 {#2021-08-29} produces `id="section"` too. -- 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/70061a93-5913-4668-8bac-3bdaedb9c710n%40googlegroups.com. [-- Attachment #1.2: Type: text/html, Size: 1890 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <70061a93-5913-4668-8bac-3bdaedb9c710n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>]
* Re: All numeric heading identifiers [not found] ` <70061a93-5913-4668-8bac-3bdaedb9c710n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> @ 2021-08-29 17:56 ` 'Saku Laesvuori' via pandoc-discuss [not found] ` <20210829175628.5vqzpwmdgtcht6h7-8gZB9jwuPzi3bl2xfHZzInzaFgp7qdfK@public.gmane.org> 2021-08-30 2:06 ` John MacFarlane 1 sibling, 1 reply; 5+ messages in thread From: 'Saku Laesvuori' via pandoc-discuss @ 2021-08-29 17:56 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw [-- Attachment #1: Type: text/plain, Size: 306 bytes --] > But why is it that I cannot make Pandoc use a specific identifier like in > > $ printf '# 47 {#47}\n' | pandoc > <h1 id="section">47 {#47}</h1> > > I expected Pandoc to produce `id="47"`. As a workaround you can write '# 123 {id=123}\n' but not being able to use the #-syntax seems like a bug to me. ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <20210829175628.5vqzpwmdgtcht6h7-8gZB9jwuPzi3bl2xfHZzInzaFgp7qdfK@public.gmane.org>]
* Re: All numeric heading identifiers [not found] ` <20210829175628.5vqzpwmdgtcht6h7-8gZB9jwuPzi3bl2xfHZzInzaFgp7qdfK@public.gmane.org> @ 2021-08-29 18:21 ` William Lupton 0 siblings, 0 replies; 5+ messages in thread From: William Lupton @ 2021-08-29 18:21 UTC (permalink / raw) To: pandoc-discuss [-- Attachment #1: Type: text/plain, Size: 1478 bytes --] One of the steps in the auto_identifiers algorithm is: - Remove everything up to the first letter (identifiers may not begin with a number or punctuation mark). On Sun, 29 Aug 2021, 18:56 'Saku Laesvuori' via pandoc-discuss, < pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> wrote: > > But why is it that I cannot make Pandoc use a specific identifier like in > > > > $ printf '# 47 {#47}\n' | pandoc > > <h1 id="section">47 {#47}</h1> > > > > I expected Pandoc to produce `id="47"`. > > As a workaround you can write '# 123 {id=123}\n' but not being able to > use the #-syntax seems like a bug to me. > > -- > 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/20210829175628.5vqzpwmdgtcht6h7%40komputilacxo.localdomain > . > -- 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/CAEe_xxiRB5yhHkJ9mn-bkozVOUPW6eW_uOc21oDdicNoYW7%3Djw%40mail.gmail.com. [-- Attachment #2: Type: text/html, Size: 2677 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: All numeric heading identifiers [not found] ` <70061a93-5913-4668-8bac-3bdaedb9c710n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 2021-08-29 17:56 ` 'Saku Laesvuori' via pandoc-discuss @ 2021-08-30 2:06 ` John MacFarlane [not found] ` <m2lf4jbs9x.fsf-jF64zX8BO0+FqBokazbCQ6OPv3vYUT2dxr7GGTnW70NeoWH0uzbU5w@public.gmane.org> 1 sibling, 1 reply; 5+ messages in thread From: John MacFarlane @ 2021-08-30 2:06 UTC (permalink / raw) To: andreas....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, pandoc-discuss When the attribute syntax was introduced, the decision was made to require that identifiers start with a letter. That is required for both HTML4 and XML -- and hence for XHTML5, which we aim for in HTML output (so that this output is "polyglot," and also so that it can be used in EPUB3, which requires XHTML5). This applies both to autogenerated and explicitly given ids. "andreas....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <andreas.schamanek-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes: > I read the sections Heading Identifiers and Extension: auto_identifiers > <https://pandoc.org/MANUAL.html#extension-auto_identifiers> in the manual. > So, I think I understand why the following produces `id="section"` > > $ printf '# 47\n' | pandoc > <h1 id="section">47</h1> > > But why is it that I cannot make Pandoc use a specific identifier like in > > $ printf '# 47 {#47}\n' | pandoc > <h1 id="section">47 {#47}</h1> > > I expected Pandoc to produce `id="47"`. > > BTW, I came upon this because I was wondering how to reference ISO dates in > headers, like > > ## 2021-08-29 > > because > > ## 2021-08-29 {#2021-08-29} > > produces `id="section"` too. > > -- > 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/70061a93-5913-4668-8bac-3bdaedb9c710n%40googlegroups.com. ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <m2lf4jbs9x.fsf-jF64zX8BO0+FqBokazbCQ6OPv3vYUT2dxr7GGTnW70NeoWH0uzbU5w@public.gmane.org>]
* Re: All numeric heading identifiers [not found] ` <m2lf4jbs9x.fsf-jF64zX8BO0+FqBokazbCQ6OPv3vYUT2dxr7GGTnW70NeoWH0uzbU5w@public.gmane.org> @ 2021-08-30 5:29 ` andreas....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org 0 siblings, 0 replies; 5+ messages in thread From: andreas....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org @ 2021-08-30 5:29 UTC (permalink / raw) To: pandoc-discuss [-- Attachment #1.1: Type: text/plain, Size: 780 bytes --] On Monday, August 30, 2021 at 4:06:34 AM UTC+2 John MacFarlane wrote: > > When the attribute syntax was introduced, the decision was made > to require that identifiers start with a letter. (…) > This applies both to autogenerated and explicitly given ids. > Thanks for clarifying this. Thanks @Saku Laesvuori for the workaround using `{id=123}`. -- 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/d3467dc6-513f-4d85-a5d5-de822867c947n%40googlegroups.com. [-- Attachment #1.2: Type: text/html, Size: 1348 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-08-30 5:29 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-08-29 17:49 All numeric heading identifiers andreas....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org [not found] ` <70061a93-5913-4668-8bac-3bdaedb9c710n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 2021-08-29 17:56 ` 'Saku Laesvuori' via pandoc-discuss [not found] ` <20210829175628.5vqzpwmdgtcht6h7-8gZB9jwuPzi3bl2xfHZzInzaFgp7qdfK@public.gmane.org> 2021-08-29 18:21 ` William Lupton 2021-08-30 2:06 ` John MacFarlane [not found] ` <m2lf4jbs9x.fsf-jF64zX8BO0+FqBokazbCQ6OPv3vYUT2dxr7GGTnW70NeoWH0uzbU5w@public.gmane.org> 2021-08-30 5:29 ` andreas....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
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).