* Why Pandoc includes width for multeline tables? @ 2022-08-31 13:15 name name [not found] ` <9fab3376-8799-48c7-b325-bde333bf8efcn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 0 siblings, 1 reply; 2+ messages in thread From: name name @ 2022-08-31 13:15 UTC (permalink / raw) To: pandoc-discuss [-- Attachment #1.1: Type: text/plain, Size: 1303 bytes --] ``` Table 1 default right right ------- ------ ------ row 1 1,000,000 10 rr oo ww 2 10,000 1,000,000 ``` If I convert Table 1 to HTML, it will be as narrow as possible. ``` Table 2 -------------------------------------- default right right ------- ------ ------ row 1 line 1 1,000,000 10 row 1 ll ii nn ee 2 row 2 line 1 10,000 1,000,000 row 2 ll ii nn ee 2 -------------------------------------- ``` If I convert Table 2 to HTML, Pandoc will include its width and the width of each column: ``` <table style="width:54%;"> <colgroup> <col style="width: 29%" /> <col style="width: 15%" /> <col style="width: 9%" /> </colgroup> ... </table> ``` Why is that? And how is it possible to tell Pandoc to not include widths when converting tables such as Table 2 to HTML? -- 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/9fab3376-8799-48c7-b325-bde333bf8efcn%40googlegroups.com. [-- Attachment #1.2: Type: text/html, Size: 2255 bytes --] ^ permalink raw reply [flat|nested] 2+ messages in thread
[parent not found: <9fab3376-8799-48c7-b325-bde333bf8efcn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>]
* Re: Why Pandoc includes width for multeline tables? [not found] ` <9fab3376-8799-48c7-b325-bde333bf8efcn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> @ 2022-08-31 17:38 ` John MacFarlane 0 siblings, 0 replies; 2+ messages in thread From: John MacFarlane @ 2022-08-31 17:38 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw The reason is that multiline tables will typically not look good when formatted with one line per row. And that's how they'll appear in PDF-via-LaTeX unless we tell LaTeX what column widths to use. (Unlike browsers with HTML tables, LaTeX doesn't try to figure this out on its own.) Similar issues apply to other formats. HTML is rather special in giving you decent results even if you don't specify widths. Can you disable it? Yes, with a Lua filter. Just set all the table column widths to 0. > On Aug 31, 2022, at 6:15 AM, name name <ivan20151013-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > ``` > Table 1 > > default right right > ------- ------ ------ > row 1 1,000,000 10 > rr oo ww 2 10,000 1,000,000 > ``` > > If I convert Table 1 to HTML, it will be as narrow as possible. > > ``` > Table 2 > > -------------------------------------- > default right right > ------- ------ ------ > row 1 line 1 1,000,000 10 > row 1 ll ii nn ee 2 > > row 2 line 1 10,000 1,000,000 > row 2 ll ii nn ee 2 > -------------------------------------- > ``` > > If I convert Table 2 to HTML, Pandoc will include its width and the width of each column: > > ``` > <table style="width:54%;"> > <colgroup> > <col style="width: 29%" /> > <col style="width: 15%" /> > <col style="width: 9%" /> > </colgroup> > ... > </table> > ``` > > Why is that? And how is it possible to tell Pandoc to not include widths when converting tables such as Table 2 to HTML? > > -- > 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/9fab3376-8799-48c7-b325-bde333bf8efcn%40googlegroups.com. ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-08-31 17:38 UTC | newest] Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2022-08-31 13:15 Why Pandoc includes width for multeline tables? name name [not found] ` <9fab3376-8799-48c7-b325-bde333bf8efcn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 2022-08-31 17:38 ` 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).