(1) I have many tables from Markdown (which basically no markup). How can I adjust the row height in compiled PDF? (In html, one would use a custom CSS.)
(2) Is there any way to format the tables with header rows and alternate row shading like the attached when compiling to PDF?
For Question (1), it seems to be a paragraph spacing issue. Basically, we need to make the line spacing to be 1.0 and paragraph spacing to be 0, for all paragraphs inside tables.
We should also do the same for sibling items in a list.
The question is: can we set this once per document, at compile time or as a project property?
I ended up compiling my document into html, added a nice css like https://milligram.io/, and converted the html into pdf. The pdf looks great, including tables. But the linked pdf TOC is missing. Alas!
Note: did you try wrapping the table in a block style, perhaps that could then be converted into a CSS class at compile to simplify this a bit?
Also, if you were to use a markdown workflow, then you could automatically add CSS to the document and have it compile to PDF directly (using e.g. PrinceXML) all from the compiler.
Also, I don’t know what the HTML markup is like for direct-to-html from Scrivener, but at least for markdown workflows, a native Scrivener table like this:
Gets turned in to this HTML that is very easy to target with CSS as it is well formed with a numbered caption, table head and each row assigned an odd
and even
class:
<table class="table">
<caption>Table 1: This is native Scrivener table with a referenced table caption. You can also use one of the many markdown table types.</caption>
<thead>
<tr class="header">
<th><strong>Table Head 1</strong></th>
<th><strong>Table Head 2</strong></th>
<th><strong>Table Head 3</strong></th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>Item 1</td>
<td>Item 2</td>
<td>Item 3</td>
</tr>
<tr class="even">
<td>Item 4</td>
<td>Item 5</td>
<td>Item 6</td>
</tr>
<tr class="odd">
<td>Item 7</td>
<td>Item 8</td>
<td>Item 9</td>
</tr>
<tr class="even">
<td>Item 10</td>
<td>Item 11</td>
<td>Item 12</td>
</tr>
</tbody>
</table>