public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* How is the grid table column width calculated in pandoc?
@ 2022-07-14 15:40 A A
       [not found] ` <CAMwawgN+D-cNfRKXmigUjXXuTVgVSkpkeRrrTE0hVfwK4iFHXw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: A A @ 2022-07-14 15:40 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 1782 bytes --]

Dear All,

The pandoc user guide shows the following example for a grid table:

: Sample grid table.

+---------------+---------------+--------------------+
| Fruit         | Price         | Advantages         |
+===============+===============+====================+
| Bananas       | $1.34         | - built-in wrapper |
|               |               | - bright color     |
+---------------+---------------+--------------------+
| Oranges       | $2.10         | - cures scurvy     |
|               |               | - tasty            |
+---------------+---------------+--------------------+

Which renders the following html using the default writer:

<table style="width:74%;">
<caption>Sample grid table.</caption>
<colgroup>
<col style="width: 22%" />
<col style="width: 22%" />
<col style="width: 29%" />
</colgroup>
<thead>
<tr class="header">
<th>Fruit</th>
<th>Price</th>
<th>Advantages</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>Bananas</td>
<td>$1.34</td>
<td><ul>
<li>built-in wrapper</li>
<li>bright color</li>
</ul></td>
</tr>
<tr class="even">
<td>Oranges</td>
<td>$2.10</td>
<td><ul>
<li>cures scurvy</li>
<li>tasty</li>
</ul></td>
</tr>
</tbody>
</table>

My question is, where does it get the width values in col style from? Also
how can I adjust those to an exact value if I know the value I want to set
it to?

Regards,

Amine

-- 
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/CAMwawgN%2BD-cNfRKXmigUjXXuTVgVSkpkeRrrTE0hVfwK4iFHXw%40mail.gmail.com.

[-- Attachment #2: Type: text/html, Size: 7663 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-07-14 16:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-14 15:40 How is the grid table column width calculated in pandoc? A A
     [not found] ` <CAMwawgN+D-cNfRKXmigUjXXuTVgVSkpkeRrrTE0hVfwK4iFHXw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-07-14 16:46   ` Joseph Reagle

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).