* resulting HTML tables be given IDs? @ 2021-09-23 18:02 Joseph Reagle [not found] ` <3b04ddd1-260e-1a0c-8896-5c8f04b6101f-T1oY19WcHSwdnm+yROfE0A@public.gmane.org> 0 siblings, 1 reply; 5+ messages in thread From: Joseph Reagle @ 2021-09-23 18:02 UTC (permalink / raw) To: pandoc-discuss Just as headings and sections can take automatic fragment identifiers (and be included in ToCs), has any thought been given (or have I missed) doing the same for tables/captions? Or is the consensus this is best left to the author, as in the example below? # Results ::: {style="font: 90% 'Airal', sans-serif;"} : [Table 1]{#table_spins}: Reddit phrases and automated spins ... ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <3b04ddd1-260e-1a0c-8896-5c8f04b6101f-T1oY19WcHSwdnm+yROfE0A@public.gmane.org>]
* Re: resulting HTML tables be given IDs? [not found] ` <3b04ddd1-260e-1a0c-8896-5c8f04b6101f-T1oY19WcHSwdnm+yROfE0A@public.gmane.org> @ 2021-09-24 5:45 ` John MacFarlane [not found] ` <m2o88i1q8t.fsf-d8241O7hbXoP5tpWdHSM3tPlBySK3R6THiGdP5j34PU@public.gmane.org> 0 siblings, 1 reply; 5+ messages in thread From: John MacFarlane @ 2021-09-24 5:45 UTC (permalink / raw) To: Joseph Reagle, pandoc-discuss You can put an identifier on part of the capture in the way you describe, but currently there's no good way to put an identifier on the Table element itself -- though the AST now does allow attributes there. Well, actually, there is one way, but only in commonmark with the attributes extension: ``` % pandoc -f commonmark_x {#mytable} | This | is | | --- | -- | | my | table | <table id="mytable"> <thead> <tr class="header"> <th>This</th> <th>is</th> </tr> </thead> <tbody> <tr class="odd"> <td>my</td> <td>table</td> </tr> </tbody> </table> ``` Joseph Reagle <joseph.2011-T1oY19WcHSwdnm+yROfE0A@public.gmane.org> writes: > Just as headings and sections can take automatic fragment identifiers (and be included in ToCs), has any thought been given (or have I missed) doing the same for tables/captions? Or is the consensus this is best left to the author, as in the example below? > > # Results > > ::: {style="font: 90% 'Airal', sans-serif;"} > > : [Table 1]{#table_spins}: Reddit phrases and automated spins > > ... > > -- > 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/3b04ddd1-260e-1a0c-8896-5c8f04b6101f%40reagle.org. -- 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/m2o88i1q8t.fsf%40Johns-Air.hsd1.ca.comcast.net. ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <m2o88i1q8t.fsf-d8241O7hbXoP5tpWdHSM3tPlBySK3R6THiGdP5j34PU@public.gmane.org>]
* Re: resulting HTML tables be given IDs? [not found] ` <m2o88i1q8t.fsf-d8241O7hbXoP5tpWdHSM3tPlBySK3R6THiGdP5j34PU@public.gmane.org> @ 2021-09-24 17:40 ` BPJ 2021-09-24 20:03 ` Joseph Reagle 1 sibling, 0 replies; 5+ messages in thread From: BPJ @ 2021-09-24 17:40 UTC (permalink / raw) To: pandoc-discuss; +Cc: Joseph Reagle [-- Attachment #1: Type: text/plain, Size: 2650 bytes --] If the purpose is to style a table with CSS wrapping the table in a div and using a child selector like `div#my-id table` will work fine. Den fre 24 sep. 2021 07:46John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> skrev: > > You can put an identifier on part of the capture in the > way you describe, but currently there's no good way to > put an identifier on the Table element itself -- though > the AST now does allow attributes there. > > Well, actually, there is one way, but only in commonmark > with the attributes extension: > > ``` > % pandoc -f commonmark_x > {#mytable} > | This | is | > | --- | -- | > | my | table | > <table id="mytable"> > <thead> > <tr class="header"> > <th>This</th> > <th>is</th> > </tr> > </thead> > <tbody> > <tr class="odd"> > <td>my</td> > <td>table</td> > </tr> > </tbody> > </table> > ``` > > Joseph Reagle <joseph.2011-T1oY19WcHSwdnm+yROfE0A@public.gmane.org> writes: > > > Just as headings and sections can take automatic fragment identifiers > (and be included in ToCs), has any thought been given (or have I missed) > doing the same for tables/captions? Or is the consensus this is best left > to the author, as in the example below? > > > > # Results > > > > ::: {style="font: 90% 'Airal', sans-serif;"} > > > > : [Table 1]{#table_spins}: Reddit phrases and automated spins > > > > ... > > > > -- > > 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/3b04ddd1-260e-1a0c-8896-5c8f04b6101f%40reagle.org > . > > -- > 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/m2o88i1q8t.fsf%40Johns-Air.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/CADAJKhCG8MeKBnAhVZJWDMh-41f6wHE%2BLJSmTuDVCs%2BOmA_B7g%40mail.gmail.com. [-- Attachment #2: Type: text/html, Size: 4193 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: resulting HTML tables be given IDs? [not found] ` <m2o88i1q8t.fsf-d8241O7hbXoP5tpWdHSM3tPlBySK3R6THiGdP5j34PU@public.gmane.org> 2021-09-24 17:40 ` BPJ @ 2021-09-24 20:03 ` Joseph Reagle [not found] ` <bf1b477e-7537-3b19-0c2c-34d9ad6f2bc7-T1oY19WcHSwdnm+yROfE0A@public.gmane.org> 1 sibling, 1 reply; 5+ messages in thread From: Joseph Reagle @ 2021-09-24 20:03 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw Attributes can directly precede a table in commonmark; good to know. And I take it, then, there's not much interest in auto-identifiers for tables (using caption text). On 21-09-24 01:45, John MacFarlane wrote: > > You can put an identifier on part of the capture in the > way you describe, but currently there's no good way to > put an identifier on the Table element itself -- though > the AST now does allow attributes there. > > Well, actually, there is one way, but only in commonmark > with the attributes extension: ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <bf1b477e-7537-3b19-0c2c-34d9ad6f2bc7-T1oY19WcHSwdnm+yROfE0A@public.gmane.org>]
* Re: resulting HTML tables be given IDs? [not found] ` <bf1b477e-7537-3b19-0c2c-34d9ad6f2bc7-T1oY19WcHSwdnm+yROfE0A@public.gmane.org> @ 2021-09-27 1:35 ` John MacFarlane 0 siblings, 0 replies; 5+ messages in thread From: John MacFarlane @ 2021-09-27 1:35 UTC (permalink / raw) To: Joseph Reagle, pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw Joseph Reagle <joseph.2011-T1oY19WcHSwdnm+yROfE0A@public.gmane.org> writes: > Attributes can directly precede a table in commonmark; good to know. commonmark *with* the (unofficial) attributes extension. This is enabled automatically if you use commonmark_x. > And I take it, then, there's not much interest in auto-identifiers for tables (using caption text). Those would be some pretty long identifiers. I don't think this makes sense the way auto identifiers for headings do. ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-09-27 1:35 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-09-23 18:02 resulting HTML tables be given IDs? Joseph Reagle [not found] ` <3b04ddd1-260e-1a0c-8896-5c8f04b6101f-T1oY19WcHSwdnm+yROfE0A@public.gmane.org> 2021-09-24 5:45 ` John MacFarlane [not found] ` <m2o88i1q8t.fsf-d8241O7hbXoP5tpWdHSM3tPlBySK3R6THiGdP5j34PU@public.gmane.org> 2021-09-24 17:40 ` BPJ 2021-09-24 20:03 ` Joseph Reagle [not found] ` <bf1b477e-7537-3b19-0c2c-34d9ad6f2bc7-T1oY19WcHSwdnm+yROfE0A@public.gmane.org> 2021-09-27 1:35 ` 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).