* Naming Conventions for Class and Attribute Names? @ 2021-11-23 16:35 Martin Hepp [not found] ` <0B37EABB-86C6-40D1-BCD8-4FFDC4B5EDE3-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 0 siblings, 1 reply; 3+ messages in thread From: Martin Hepp @ 2021-11-23 16:35 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw Hi all, for a set of filters, I would like to define a hierarchical naming scheme for metadata classes and attributes. For instance, I would like do define a class .slides.beamer an use it like so :::{.slides.beamer} blabla ::: Or attributes that a filter can use to adjust picture formatting details by output format, like ![](image.png){width=90%, eisvogel.width=50%} The issue in here is not the filter (which would adjust the width) but whether it is possible and recommended to use dots within class and attribute names in Pandoc element meta-data. CamelCase would not be as nice; other delimiters (:, /, _, -) would work for me, but a dot would be preferred. I could not find the respective information in the documentation. Thanks! Best wishes Martin -- 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/0B37EABB-86C6-40D1-BCD8-4FFDC4B5EDE3%40gmail.com. ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <0B37EABB-86C6-40D1-BCD8-4FFDC4B5EDE3-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>]
* Re: Naming Conventions for Class and Attribute Names? [not found] ` <0B37EABB-86C6-40D1-BCD8-4FFDC4B5EDE3-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> @ 2021-11-23 16:38 ` Gwern Branwen [not found] ` <CAMwO0gyhdaJgmSFtBn4RrsRNXMH_Leho508tBcM-BS2LfsFiBg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 3+ messages in thread From: Gwern Branwen @ 2021-11-23 16:38 UTC (permalink / raw) To: pandoc-discuss If you use periods inside an identifier or class, wouldn't that generate invalid HTML output? I thought periods were forbidden characters precisely because you want to be able to manipulate them inside JS/CSS where '.' would then be ambiguous (is it part of the JS/CSS language, or part of the quoted name? If I write css on 'foo.bar { display: none; }', is that a <bar> inside a <foo>, or an element with the ID '#foo.bar'?). I was running into this with section headers where section headers like '# T. S. Eliot' were generating IDs like '#t.s.eliot' but that was then invalidating the HTML. -- gwern https://www.gwern.net ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <CAMwO0gyhdaJgmSFtBn4RrsRNXMH_Leho508tBcM-BS2LfsFiBg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: Naming Conventions for Class and Attribute Names? [not found] ` <CAMwO0gyhdaJgmSFtBn4RrsRNXMH_Leho508tBcM-BS2LfsFiBg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2021-11-24 18:28 ` Martin Hepp 0 siblings, 0 replies; 3+ messages in thread From: Martin Hepp @ 2021-11-24 18:28 UTC (permalink / raw) To: 'juh' via pandoc-discuss Hi, thanks! After looking at the naming specs for CSS, I come to the conclusion that the best separator for names in element meta-data (classes and attributes) is a dash; like {.output-beamer eisvogel-width=90% beamer-width=50%} etc. While not ideal, this is also in line with how the attribute names from Markdown are translated into HTML attributes with the "data-" prefix. Best wishes Martin > On 23. Nov 2021, at 17:38, Gwern Branwen <gwern-v26ZT+9V8bxeoWH0uzbU5w@public.gmane.org> wrote: > > If you use periods inside an identifier or class, wouldn't that > generate invalid HTML output? I thought periods were forbidden > characters precisely because you want to be able to manipulate them > inside JS/CSS where '.' would then be ambiguous (is it part of the > JS/CSS language, or part of the quoted name? If I write css on > 'foo.bar { display: none; }', is that a <bar> inside a <foo>, or an > element with the ID '#foo.bar'?). I was running into this with section > headers where section headers like '# T. S. Eliot' were generating IDs > like '#t.s.eliot' but that was then invalidating the HTML. > > -- > gwern > https://www.gwern.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/CAMwO0gyhdaJgmSFtBn4RrsRNXMH_Leho508tBcM-BS2LfsFiBg%40mail.gmail.com. ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-11-24 18:28 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-11-23 16:35 Naming Conventions for Class and Attribute Names? Martin Hepp [not found] ` <0B37EABB-86C6-40D1-BCD8-4FFDC4B5EDE3-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 2021-11-23 16:38 ` Gwern Branwen [not found] ` <CAMwO0gyhdaJgmSFtBn4RrsRNXMH_Leho508tBcM-BS2LfsFiBg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2021-11-24 18:28 ` Martin Hepp
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).