* Fenced div main class as string and more attributes later
@ 2019-06-25 21:12 Chao Xu
[not found] ` <7ed7a801-1691-4285-9ad5-56945a90558a-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
0 siblings, 1 reply; 7+ messages in thread
From: Chao Xu @ 2019-06-25 21:12 UTC (permalink / raw)
To: pandoc-discuss
[-- Attachment #1.1: Type: text/plain, Size: 1347 bytes --]
Hi all,
What should be the desired behavior for the following code in Pandoc
Markdown?
::: Theorem {#id}
This is a theorem.
:::
Knowing both::: Theorem and ::: {.Theorem #id} exists, I would expect it
behaves as
::: {.Theorem #id}
This is a theorem.
:::
But that is not true. The HTML output is.
<p>::: Theorem {#id} This is a theorem. :::</p>
Of course, as the current pandoc markdown states:
> As with fenced code blocks, one can use either attributes in curly braces
or a single unbraced word, which will be treated as a class name.
But I do believe what I suggest is more reasonable, especially most of the
time there are no additional attributes except the class name.
I've raised the issue here.
https://github.com/jgm/pandoc/issues/5611
Best,
Chao Xu
--
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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/7ed7a801-1691-4285-9ad5-56945a90558a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
[-- Attachment #1.2: Type: text/html, Size: 2785 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <7ed7a801-1691-4285-9ad5-56945a90558a-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>]
* Re: Fenced div main class as string and more attributes later [not found] ` <7ed7a801-1691-4285-9ad5-56945a90558a-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> @ 2019-06-26 13:16 ` BP Jonsson [not found] ` <CAFC_yuSJDq9oNEP2Ka4bs3dhTQRMqD-JfpMsfNjnJpqALnW1Ug-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 7+ messages in thread From: BP Jonsson @ 2019-06-26 13:16 UTC (permalink / raw) To: pandoc-discuss [-- Attachment #1: Type: text/plain, Size: 2505 bytes --] The two styles, a *single* class without braces or CSS-like attributes in braces, are mutually exclusive, i.e. you can use one or the other on any given block but you can't mix them on the same block, so if you want both a class and an id you must use {#id .class} Den tis 25 juni 2019 23:12Chao Xu <mgcclx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev: > Hi all, > > What should be the desired behavior for the following code in Pandoc > Markdown? > > ::: Theorem {#id} > This is a theorem. > ::: > > Knowing both::: Theorem and ::: {.Theorem #id} exists, I would expect it > behaves as > > ::: {.Theorem #id} > This is a theorem. > ::: > > But that is not true. The HTML output is. > > <p>::: Theorem {#id} This is a theorem. :::</p> > > > Of course, as the current pandoc markdown states: > > As with fenced code blocks, one can use either attributes in curly > braces or a single unbraced word, which will be treated as a class name. > > But I do believe what I suggest is more reasonable, especially most of the > time there are no additional attributes except the class name. > > I've raised the issue here. > https://github.com/jgm/pandoc/issues/5611 > > Best, > Chao Xu > > -- > 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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit > https://groups.google.com/d/msgid/pandoc-discuss/7ed7a801-1691-4285-9ad5-56945a90558a%40googlegroups.com > <https://groups.google.com/d/msgid/pandoc-discuss/7ed7a801-1691-4285-9ad5-56945a90558a%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAFC_yuSJDq9oNEP2Ka4bs3dhTQRMqD-JfpMsfNjnJpqALnW1Ug%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout. [-- Attachment #2: Type: text/html, Size: 4538 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <CAFC_yuSJDq9oNEP2Ka4bs3dhTQRMqD-JfpMsfNjnJpqALnW1Ug-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: Fenced div main class as string and more attributes later [not found] ` <CAFC_yuSJDq9oNEP2Ka4bs3dhTQRMqD-JfpMsfNjnJpqALnW1Ug-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2019-06-26 15:55 ` Chao Xu [not found] ` <CAJQg2_0Lyq87W4jcRfD0Vnr+490dAkq5F7QTBCaS+xbv3QPwSQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 7+ messages in thread From: Chao Xu @ 2019-06-26 15:55 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw [-- Attachment #1: Type: text/plain, Size: 3957 bytes --] Does it make sense to make them mutually exclusive? The syntax is identical to the `header_attributes` extension. Except for that string in front is the class name instead of the header. However, it still makes sense, because often the class name itself acts as a header for a div. (warning, theorem, remark, etc) I'm suggesting making an enhancement, allowing the one I showed in the email. Best, Chao Xu On Wed, Jun 26, 2019 at 9:16 AM BP Jonsson <bpjonsson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > The two styles, a *single* class without braces or CSS-like attributes in > braces, are mutually exclusive, i.e. you can use one or the other on any > given block but you can't mix them on the same block, so if you want both a > class and an id you must use {#id .class} > > Den tis 25 juni 2019 23:12Chao Xu <mgcclx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev: > >> Hi all, >> >> What should be the desired behavior for the following code in Pandoc >> Markdown? >> >> ::: Theorem {#id} >> This is a theorem. >> ::: >> >> Knowing both::: Theorem and ::: {.Theorem #id} exists, I would expect it >> behaves as >> >> ::: {.Theorem #id} >> This is a theorem. >> ::: >> >> But that is not true. The HTML output is. >> >> <p>::: Theorem {#id} This is a theorem. :::</p> >> >> >> Of course, as the current pandoc markdown states: >> > As with fenced code blocks, one can use either attributes in curly >> braces or a single unbraced word, which will be treated as a class name. >> >> But I do believe what I suggest is more reasonable, especially most of >> the time there are no additional attributes except the class name. >> >> I've raised the issue here. >> https://github.com/jgm/pandoc/issues/5611 >> >> Best, >> Chao Xu >> >> -- >> 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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/pandoc-discuss/7ed7a801-1691-4285-9ad5-56945a90558a%40googlegroups.com >> <https://groups.google.com/d/msgid/pandoc-discuss/7ed7a801-1691-4285-9ad5-56945a90558a%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > -- > You received this message because you are subscribed to a topic in the > Google Groups "pandoc-discuss" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/pandoc-discuss/2NWx-P7p7P4/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit > https://groups.google.com/d/msgid/pandoc-discuss/CAFC_yuSJDq9oNEP2Ka4bs3dhTQRMqD-JfpMsfNjnJpqALnW1Ug%40mail.gmail.com > <https://groups.google.com/d/msgid/pandoc-discuss/CAFC_yuSJDq9oNEP2Ka4bs3dhTQRMqD-JfpMsfNjnJpqALnW1Ug%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAJQg2_0Lyq87W4jcRfD0Vnr%2B490dAkq5F7QTBCaS%2Bxbv3QPwSQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout. [-- Attachment #2: Type: text/html, Size: 6850 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <CAJQg2_0Lyq87W4jcRfD0Vnr+490dAkq5F7QTBCaS+xbv3QPwSQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: Fenced div main class as string and more attributes later [not found] ` <CAJQg2_0Lyq87W4jcRfD0Vnr+490dAkq5F7QTBCaS+xbv3QPwSQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2019-06-28 8:55 ` mb21 [not found] ` <8e050d22-4d80-45c9-b5c8-74dbb263da11-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 0 siblings, 1 reply; 7+ messages in thread From: mb21 @ 2019-06-28 8:55 UTC (permalink / raw) To: pandoc-discuss [-- Attachment #1.1: Type: text/plain, Size: 4422 bytes --] I agree that the proposed variant looks nicer. However, it adds yet another way to do the same thing, which may lead to confusion (and may make learning pandoc markdown harder). Another question is whether fenced code blocks would then have to support that style as well... On Wednesday, June 26, 2019 at 5:55:27 PM UTC+2, Chao Xu wrote: > > Does it make sense to make them mutually exclusive? > > The syntax is identical to the `header_attributes` extension. Except for > that string in front is the class name instead of the header. > However, it still makes sense, because often the class name itself acts as > a header for a div. (warning, theorem, remark, etc) > > I'm suggesting making an enhancement, allowing the one I showed in the > email. > > Best, > Chao Xu > > > On Wed, Jun 26, 2019 at 9:16 AM BP Jonsson <bpjo...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > <javascript:>> wrote: > >> The two styles, a *single* class without braces or CSS-like attributes in >> braces, are mutually exclusive, i.e. you can use one or the other on any >> given block but you can't mix them on the same block, so if you want both a >> class and an id you must use {#id .class} >> >> Den tis 25 juni 2019 23:12Chao Xu <mgc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <javascript:>> skrev: >> >>> Hi all, >>> >>> What should be the desired behavior for the following code in Pandoc >>> Markdown? >>> >>> ::: Theorem {#id} >>> This is a theorem. >>> ::: >>> >>> Knowing both::: Theorem and ::: {.Theorem #id} exists, I would expect >>> it behaves as >>> >>> ::: {.Theorem #id} >>> This is a theorem. >>> ::: >>> >>> But that is not true. The HTML output is. >>> >>> <p>::: Theorem {#id} This is a theorem. :::</p> >>> >>> >>> Of course, as the current pandoc markdown states: >>> > As with fenced code blocks, one can use either attributes in curly >>> braces or a single unbraced word, which will be treated as a class name. >>> >>> But I do believe what I suggest is more reasonable, especially most of >>> the time there are no additional attributes except the class name. >>> >>> I've raised the issue here. >>> https://github.com/jgm/pandoc/issues/5611 >>> >>> Best, >>> Chao Xu >>> >>> -- >>> 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-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>. >>> To post to this group, send email to pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org >>> <javascript:>. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/pandoc-discuss/7ed7a801-1691-4285-9ad5-56945a90558a%40googlegroups.com >>> <https://groups.google.com/d/msgid/pandoc-discuss/7ed7a801-1691-4285-9ad5-56945a90558a%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> For more options, visit https://groups.google.com/d/optout. >>> >> -- >> You received this message because you are subscribed to a topic in the >> Google Groups "pandoc-discuss" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/pandoc-discuss/2NWx-P7p7P4/unsubscribe. >> To unsubscribe from this group and all its topics, send an email to >> pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>. >> To post to this group, send email to pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org >> <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/pandoc-discuss/CAFC_yuSJDq9oNEP2Ka4bs3dhTQRMqD-JfpMsfNjnJpqALnW1Ug%40mail.gmail.com >> <https://groups.google.com/d/msgid/pandoc-discuss/CAFC_yuSJDq9oNEP2Ka4bs3dhTQRMqD-JfpMsfNjnJpqALnW1Ug%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > -- 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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/8e050d22-4d80-45c9-b5c8-74dbb263da11%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. [-- Attachment #1.2: Type: text/html, Size: 9734 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <8e050d22-4d80-45c9-b5c8-74dbb263da11-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>]
* Re: Fenced div main class as string and more attributes later [not found] ` <8e050d22-4d80-45c9-b5c8-74dbb263da11-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> @ 2019-06-30 17:55 ` Chao Xu [not found] ` <CAJQg2_35kSAh3ooTEOuT0nmqW1PJurM1mSsbgFeTkj1njvLsxQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 7+ messages in thread From: Chao Xu @ 2019-06-30 17:55 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw [-- Attachment #1: Type: text/plain, Size: 5696 bytes --] If it is more intuitive, then it is less confusing. When I wrote it for the first time, Theorem {#id} did not work, and that was fairly confusing to me... Also, this update can be helpful towards adding an attribute to all markdown elements. https://github.com/jgm/pandoc/issues/684 Best, Chao Xu On Fri, Jun 28, 2019 at 1:55 AM mb21 <mauro.bieg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > I agree that the proposed variant looks nicer. However, it adds yet > another way to do the same thing, which may lead to confusion (and may make > learning pandoc markdown harder). Another question is whether fenced code > blocks would then have to support that style as well... > > > On Wednesday, June 26, 2019 at 5:55:27 PM UTC+2, Chao Xu wrote: >> >> Does it make sense to make them mutually exclusive? >> >> The syntax is identical to the `header_attributes` extension. Except for >> that string in front is the class name instead of the header. >> However, it still makes sense, because often the class name itself acts >> as a header for a div. (warning, theorem, remark, etc) >> >> I'm suggesting making an enhancement, allowing the one I showed in the >> email. >> >> Best, >> Chao Xu >> >> >> On Wed, Jun 26, 2019 at 9:16 AM BP Jonsson <bpjo...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> >>> The two styles, a *single* class without braces or CSS-like attributes >>> in braces, are mutually exclusive, i.e. you can use one or the other on any >>> given block but you can't mix them on the same block, so if you want both a >>> class and an id you must use {#id .class} >>> >>> Den tis 25 juni 2019 23:12Chao Xu <mgc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev: >>> >>>> Hi all, >>>> >>>> What should be the desired behavior for the following code in Pandoc >>>> Markdown? >>>> >>>> ::: Theorem {#id} >>>> This is a theorem. >>>> ::: >>>> >>>> Knowing both::: Theorem and ::: {.Theorem #id} exists, I would expect >>>> it behaves as >>>> >>>> ::: {.Theorem #id} >>>> This is a theorem. >>>> ::: >>>> >>>> But that is not true. The HTML output is. >>>> >>>> <p>::: Theorem {#id} This is a theorem. :::</p> >>>> >>>> >>>> Of course, as the current pandoc markdown states: >>>> > As with fenced code blocks, one can use either attributes in curly >>>> braces or a single unbraced word, which will be treated as a class name. >>>> >>>> But I do believe what I suggest is more reasonable, especially most of >>>> the time there are no additional attributes except the class name. >>>> >>>> I've raised the issue here. >>>> https://github.com/jgm/pandoc/issues/5611 >>>> >>>> Best, >>>> Chao Xu >>>> >>>> -- >>>> 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-...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>> To post to this group, send email to pandoc-...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>> To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/pandoc-discuss/7ed7a801-1691-4285-9ad5-56945a90558a%40googlegroups.com >>>> <https://groups.google.com/d/msgid/pandoc-discuss/7ed7a801-1691-4285-9ad5-56945a90558a%40googlegroups.com?utm_medium=email&utm_source=footer> >>>> . >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> -- >>> You received this message because you are subscribed to a topic in the >>> Google Groups "pandoc-discuss" group. >>> To unsubscribe from this topic, visit >>> https://groups.google.com/d/topic/pandoc-discuss/2NWx-P7p7P4/unsubscribe >>> . >>> To unsubscribe from this group and all its topics, send an email to >>> pandoc-...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> To post to this group, send email to pandoc-...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/pandoc-discuss/CAFC_yuSJDq9oNEP2Ka4bs3dhTQRMqD-JfpMsfNjnJpqALnW1Ug%40mail.gmail.com >>> <https://groups.google.com/d/msgid/pandoc-discuss/CAFC_yuSJDq9oNEP2Ka4bs3dhTQRMqD-JfpMsfNjnJpqALnW1Ug%40mail.gmail.com?utm_medium=email&utm_source=footer> >>> . >>> For more options, visit https://groups.google.com/d/optout. >>> >> -- > You received this message because you are subscribed to a topic in the > Google Groups "pandoc-discuss" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/pandoc-discuss/2NWx-P7p7P4/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit > https://groups.google.com/d/msgid/pandoc-discuss/8e050d22-4d80-45c9-b5c8-74dbb263da11%40googlegroups.com > <https://groups.google.com/d/msgid/pandoc-discuss/8e050d22-4d80-45c9-b5c8-74dbb263da11%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAJQg2_35kSAh3ooTEOuT0nmqW1PJurM1mSsbgFeTkj1njvLsxQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout. [-- Attachment #2: Type: text/html, Size: 9260 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <CAJQg2_35kSAh3ooTEOuT0nmqW1PJurM1mSsbgFeTkj1njvLsxQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: Fenced div main class as string and more attributes later [not found] ` <CAJQg2_35kSAh3ooTEOuT0nmqW1PJurM1mSsbgFeTkj1njvLsxQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2019-07-01 9:24 ` BP Jonsson [not found] ` <CAFC_yuQuSke3By09b48QXDL3dis2wrtXc7UNL=q42faiqMoMng-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 7+ messages in thread From: BP Jonsson @ 2019-07-01 9:24 UTC (permalink / raw) To: pandoc-discuss [-- Attachment #1: Type: text/plain, Size: 8586 bytes --] TL;DR: such a change would entail much work for dubious benefits and most importantly would break backward compatibility. The problem as I see it is that the possibility of specifying classes *in two different ways simultaneously* --- one undotted class outside the braces and any number of dotted classes inside the braces is inconsistent and thus confusing to most users. People already tend to think that the lone class undotted class without braces is not just a normal class, which it is except that the highlighting mechanism picks up the *first* class, whether undotted and without braces or dotted and inside braces, as the language name. It might be argued that things could be changed so that a language name always has to be specified as a/the undotted class outside the braces, but this is hard to do for several reasons: one is that in Pandoc's abstract representation of the document this class is not stored specially; it is just the first in the list of classes, and if it was "bare" it is *incidentally* the only class. The developers are very unwilling to change the internal representation (I'm not stating this as critique but merely as a fact), if I understand correctly because any change to the internal representation would mean that numerous changes would need to be made in many places in the code. To users a change would mean that old documents which rely on the current behavior where the language class is just the first class however specified would not work anymore. These two concerns meet when it comes to filters since filters and the various filter libraries, including but not limited to the official Lua filter mechanism and its associated libraries, rely on the current internal representation. Den sön 30 juni 2019 19:55Chao Xu <mgcclx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev: > If it is more intuitive, then it is less confusing. > When I wrote it for the first time, Theorem {#id} did not work, and that > was fairly confusing to me... > > Also, this update can be helpful towards adding an attribute to all > markdown elements. > https://github.com/jgm/pandoc/issues/684 > > Best, > Chao Xu > > > On Fri, Jun 28, 2019 at 1:55 AM mb21 <mauro.bieg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> I agree that the proposed variant looks nicer. However, it adds yet >> another way to do the same thing, which may lead to confusion (and may make >> learning pandoc markdown harder). Another question is whether fenced code >> blocks would then have to support that style as well... >> >> >> On Wednesday, June 26, 2019 at 5:55:27 PM UTC+2, Chao Xu wrote: >>> >>> Does it make sense to make them mutually exclusive? >>> >>> The syntax is identical to the `header_attributes` extension. Except for >>> that string in front is the class name instead of the header. >>> However, it still makes sense, because often the class name itself acts >>> as a header for a div. (warning, theorem, remark, etc) >>> >>> I'm suggesting making an enhancement, allowing the one I showed in the >>> email. >>> >>> Best, >>> Chao Xu >>> >>> >>> On Wed, Jun 26, 2019 at 9:16 AM BP Jonsson <bpjo...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >>> >>>> The two styles, a *single* class without braces or CSS-like attributes >>>> in braces, are mutually exclusive, i.e. you can use one or the other on any >>>> given block but you can't mix them on the same block, so if you want both a >>>> class and an id you must use {#id .class} >>>> >>>> Den tis 25 juni 2019 23:12Chao Xu <mgc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev: >>>> >>>>> Hi all, >>>>> >>>>> What should be the desired behavior for the following code in Pandoc >>>>> Markdown? >>>>> >>>>> ::: Theorem {#id} >>>>> This is a theorem. >>>>> ::: >>>>> >>>>> Knowing both::: Theorem and ::: {.Theorem #id} exists, I would expect >>>>> it behaves as >>>>> >>>>> ::: {.Theorem #id} >>>>> This is a theorem. >>>>> ::: >>>>> >>>>> But that is not true. The HTML output is. >>>>> >>>>> <p>::: Theorem {#id} This is a theorem. :::</p> >>>>> >>>>> >>>>> Of course, as the current pandoc markdown states: >>>>> > As with fenced code blocks, one can use either attributes in curly >>>>> braces or a single unbraced word, which will be treated as a class name. >>>>> >>>>> But I do believe what I suggest is more reasonable, especially most of >>>>> the time there are no additional attributes except the class name. >>>>> >>>>> I've raised the issue here. >>>>> https://github.com/jgm/pandoc/issues/5611 >>>>> >>>>> Best, >>>>> Chao Xu >>>>> >>>>> -- >>>>> 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-...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>>> To post to this group, send email to pandoc-...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>>> To view this discussion on the web visit >>>>> https://groups.google.com/d/msgid/pandoc-discuss/7ed7a801-1691-4285-9ad5-56945a90558a%40googlegroups.com >>>>> <https://groups.google.com/d/msgid/pandoc-discuss/7ed7a801-1691-4285-9ad5-56945a90558a%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>> . >>>>> For more options, visit https://groups.google.com/d/optout. >>>>> >>>> -- >>>> You received this message because you are subscribed to a topic in the >>>> Google Groups "pandoc-discuss" group. >>>> To unsubscribe from this topic, visit >>>> https://groups.google.com/d/topic/pandoc-discuss/2NWx-P7p7P4/unsubscribe >>>> . >>>> To unsubscribe from this group and all its topics, send an email to >>>> pandoc-...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>> To post to this group, send email to pandoc-...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>> To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/pandoc-discuss/CAFC_yuSJDq9oNEP2Ka4bs3dhTQRMqD-JfpMsfNjnJpqALnW1Ug%40mail.gmail.com >>>> <https://groups.google.com/d/msgid/pandoc-discuss/CAFC_yuSJDq9oNEP2Ka4bs3dhTQRMqD-JfpMsfNjnJpqALnW1Ug%40mail.gmail.com?utm_medium=email&utm_source=footer> >>>> . >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> -- >> You received this message because you are subscribed to a topic in the >> Google Groups "pandoc-discuss" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/pandoc-discuss/2NWx-P7p7P4/unsubscribe. >> To unsubscribe from this group and all its topics, send an email to >> pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/pandoc-discuss/8e050d22-4d80-45c9-b5c8-74dbb263da11%40googlegroups.com >> <https://groups.google.com/d/msgid/pandoc-discuss/8e050d22-4d80-45c9-b5c8-74dbb263da11%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > -- > 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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit > https://groups.google.com/d/msgid/pandoc-discuss/CAJQg2_35kSAh3ooTEOuT0nmqW1PJurM1mSsbgFeTkj1njvLsxQ%40mail.gmail.com > <https://groups.google.com/d/msgid/pandoc-discuss/CAJQg2_35kSAh3ooTEOuT0nmqW1PJurM1mSsbgFeTkj1njvLsxQ%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAFC_yuQuSke3By09b48QXDL3dis2wrtXc7UNL%3Dq42faiqMoMng%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout. [-- Attachment #2: Type: text/html, Size: 12776 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <CAFC_yuQuSke3By09b48QXDL3dis2wrtXc7UNL=q42faiqMoMng-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: Fenced div main class as string and more attributes later [not found] ` <CAFC_yuQuSke3By09b48QXDL3dis2wrtXc7UNL=q42faiqMoMng-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2019-07-03 10:00 ` John MacFarlane 0 siblings, 0 replies; 7+ messages in thread From: John MacFarlane @ 2019-07-03 10:00 UTC (permalink / raw) To: BP Jonsson, pandoc-discuss The proposed change wouldn't require a different internal representation. It is just a question of markdown syntax. If we made the change, the bare word, if present, would be included as the first class in the attributes. One reservation I have is that if we did extend attributes to every block type, allowing them to be specified on the line before, then we wouldn't want to have bare words, since this would create too much ambiguity: it needs to be obvious when you're specifying attributes. If the generic block attributes format required {}s, but you could add a bare word on the same line for code blocks and divs, that would be an inconsistency in the syntax that people might find confusing. BP Jonsson <bpjonsson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes: > TL;DR: such a change would entail much work for dubious benefits and most > importantly would break backward compatibility. > > The problem as I see it is that the possibility of specifying classes *in > two different ways simultaneously* --- one undotted class outside the > braces and any number of dotted classes inside the braces is inconsistent > and thus confusing to most users. People already tend to think that the > lone class undotted class without braces is not just a normal class, which > it is except that the highlighting mechanism picks up the *first* class, > whether undotted and without braces or dotted and inside braces, as the > language name. It might be argued that things could be changed so that a > language name always has to be specified as a/the undotted class outside > the braces, but this is hard to do for several reasons: one is that in > Pandoc's abstract representation of the document this class is not stored > specially; it is just the first in the list of classes, and if it was > "bare" it is *incidentally* the only class. The developers are very > unwilling to change the internal representation (I'm not stating this as > critique but merely as a fact), if I understand correctly because any > change to the internal representation would mean that numerous changes > would need to be made in many places in the code. To users a change would > mean that old documents which rely on the current behavior where the > language class is just the first class however specified would not work > anymore. These two concerns meet when it comes to filters since filters and > the various filter libraries, including but not limited to the official Lua > filter mechanism and its associated libraries, rely on the current internal > representation. > > Den sön 30 juni 2019 19:55Chao Xu <mgcclx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev: > >> If it is more intuitive, then it is less confusing. >> When I wrote it for the first time, Theorem {#id} did not work, and that >> was fairly confusing to me... >> >> Also, this update can be helpful towards adding an attribute to all >> markdown elements. >> https://github.com/jgm/pandoc/issues/684 >> >> Best, >> Chao Xu >> >> >> On Fri, Jun 28, 2019 at 1:55 AM mb21 <mauro.bieg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> >>> I agree that the proposed variant looks nicer. However, it adds yet >>> another way to do the same thing, which may lead to confusion (and may make >>> learning pandoc markdown harder). Another question is whether fenced code >>> blocks would then have to support that style as well... >>> >>> >>> On Wednesday, June 26, 2019 at 5:55:27 PM UTC+2, Chao Xu wrote: >>>> >>>> Does it make sense to make them mutually exclusive? >>>> >>>> The syntax is identical to the `header_attributes` extension. Except for >>>> that string in front is the class name instead of the header. >>>> However, it still makes sense, because often the class name itself acts >>>> as a header for a div. (warning, theorem, remark, etc) >>>> >>>> I'm suggesting making an enhancement, allowing the one I showed in the >>>> email. >>>> >>>> Best, >>>> Chao Xu >>>> >>>> >>>> On Wed, Jun 26, 2019 at 9:16 AM BP Jonsson <bpjo...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >>>> >>>>> The two styles, a *single* class without braces or CSS-like attributes >>>>> in braces, are mutually exclusive, i.e. you can use one or the other on any >>>>> given block but you can't mix them on the same block, so if you want both a >>>>> class and an id you must use {#id .class} >>>>> >>>>> Den tis 25 juni 2019 23:12Chao Xu <mgc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev: >>>>> >>>>>> Hi all, >>>>>> >>>>>> What should be the desired behavior for the following code in Pandoc >>>>>> Markdown? >>>>>> >>>>>> ::: Theorem {#id} >>>>>> This is a theorem. >>>>>> ::: >>>>>> >>>>>> Knowing both::: Theorem and ::: {.Theorem #id} exists, I would expect >>>>>> it behaves as >>>>>> >>>>>> ::: {.Theorem #id} >>>>>> This is a theorem. >>>>>> ::: >>>>>> >>>>>> But that is not true. The HTML output is. >>>>>> >>>>>> <p>::: Theorem {#id} This is a theorem. :::</p> >>>>>> >>>>>> >>>>>> Of course, as the current pandoc markdown states: >>>>>> > As with fenced code blocks, one can use either attributes in curly >>>>>> braces or a single unbraced word, which will be treated as a class name. >>>>>> >>>>>> But I do believe what I suggest is more reasonable, especially most of >>>>>> the time there are no additional attributes except the class name. >>>>>> >>>>>> I've raised the issue here. >>>>>> https://github.com/jgm/pandoc/issues/5611 >>>>>> >>>>>> Best, >>>>>> Chao Xu >>>>>> >>>>>> -- >>>>>> 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-...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>>>> To post to this group, send email to pandoc-...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>>>> To view this discussion on the web visit >>>>>> https://groups.google.com/d/msgid/pandoc-discuss/7ed7a801-1691-4285-9ad5-56945a90558a%40googlegroups.com >>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/7ed7a801-1691-4285-9ad5-56945a90558a%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>>> . >>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>> >>>>> -- >>>>> You received this message because you are subscribed to a topic in the >>>>> Google Groups "pandoc-discuss" group. >>>>> To unsubscribe from this topic, visit >>>>> https://groups.google.com/d/topic/pandoc-discuss/2NWx-P7p7P4/unsubscribe >>>>> . >>>>> To unsubscribe from this group and all its topics, send an email to >>>>> pandoc-...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>>> To post to this group, send email to pandoc-...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>>> To view this discussion on the web visit >>>>> https://groups.google.com/d/msgid/pandoc-discuss/CAFC_yuSJDq9oNEP2Ka4bs3dhTQRMqD-JfpMsfNjnJpqALnW1Ug%40mail.gmail.com >>>>> <https://groups.google.com/d/msgid/pandoc-discuss/CAFC_yuSJDq9oNEP2Ka4bs3dhTQRMqD-JfpMsfNjnJpqALnW1Ug%40mail.gmail.com?utm_medium=email&utm_source=footer> >>>>> . >>>>> For more options, visit https://groups.google.com/d/optout. >>>>> >>>> -- >>> You received this message because you are subscribed to a topic in the >>> Google Groups "pandoc-discuss" group. >>> To unsubscribe from this topic, visit >>> https://groups.google.com/d/topic/pandoc-discuss/2NWx-P7p7P4/unsubscribe. >>> To unsubscribe from this group and all its topics, send an email to >>> pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/pandoc-discuss/8e050d22-4d80-45c9-b5c8-74dbb263da11%40googlegroups.com >>> <https://groups.google.com/d/msgid/pandoc-discuss/8e050d22-4d80-45c9-b5c8-74dbb263da11%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> For more options, visit https://groups.google.com/d/optout. >>> >> -- >> 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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/pandoc-discuss/CAJQg2_35kSAh3ooTEOuT0nmqW1PJurM1mSsbgFeTkj1njvLsxQ%40mail.gmail.com >> <https://groups.google.com/d/msgid/pandoc-discuss/CAJQg2_35kSAh3ooTEOuT0nmqW1PJurM1mSsbgFeTkj1njvLsxQ%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > > -- > 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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAFC_yuQuSke3By09b48QXDL3dis2wrtXc7UNL%3Dq42faiqMoMng%40mail.gmail.com. > For more options, visit https://groups.google.com/d/optout. -- 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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/87muhvmo8m.fsf%40johnmacfarlane.net. For more options, visit https://groups.google.com/d/optout. ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2019-07-03 10:00 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2019-06-25 21:12 Fenced div main class as string and more attributes later Chao Xu [not found] ` <7ed7a801-1691-4285-9ad5-56945a90558a-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 2019-06-26 13:16 ` BP Jonsson [not found] ` <CAFC_yuSJDq9oNEP2Ka4bs3dhTQRMqD-JfpMsfNjnJpqALnW1Ug-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2019-06-26 15:55 ` Chao Xu [not found] ` <CAJQg2_0Lyq87W4jcRfD0Vnr+490dAkq5F7QTBCaS+xbv3QPwSQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2019-06-28 8:55 ` mb21 [not found] ` <8e050d22-4d80-45c9-b5c8-74dbb263da11-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 2019-06-30 17:55 ` Chao Xu [not found] ` <CAJQg2_35kSAh3ooTEOuT0nmqW1PJurM1mSsbgFeTkj1njvLsxQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2019-07-01 9:24 ` BP Jonsson [not found] ` <CAFC_yuQuSke3By09b48QXDL3dis2wrtXc7UNL=q42faiqMoMng-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2019-07-03 10:00 ` John MacFarlane
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).