Multimarkdown table - Captions above table not below

When using the multimarkdown table plugin I have noticed that if a caption is defined Joplin places it above the table.

| Main Header Cell||||
| Sub Header Cell || Sub Header Cell ||
| Name | Name | Name | Name |
| --- | --- | --- | --- |
| Cell | Cell | Cell | Cell |
| Cell | Cell | Cell | Cell |
| Cell | Cell | Cell | Cell |
| Cell | Cell | Cell | Cell |
[*Caption*]

joplin

The Joplin site makes reference to https://fletcher.github.io/MultiMarkdown-6/syntax/tables.html which suggests that the caption should be below?

Not an earth-shattering problem by any stretch of the imagination. I just wondered if this was something that may ever change or be corrected (assuming that Joplin is not rendering the multimarkdown table correctly).

I would also like to thank the Joplin team for adding this plugin because (for me at least) it has made a HUGE differnce to the versatility of Joplin.

1 Like

We use the markdown-it-multimd-table module, which states the following in its README.md:


For now, the following features are provided:

  • Cells spanning multiple columns
  • Grouped table headers
  • Grouped table rows
  • Table captions
  • Lists in table cell (optional)
  • Line breaks in table cells (optional)

Noted that the plugin might behave differently from MultiMarkdown in some edge cases; since the plugin aims just to follow the rules in MultiMarkdown User’s Guide.


It seems caption is not supported. But you could open a feature request with the module.

Edit: table captions are supported. I missed it. Now we have to find out if this is a problem with the module or Joplin. Sinve we only use the module, I reckon the former.
Can you open a bug report with them?

Just did a test with the standalone module and your example.

The html that is created is as follows:

<table>
<thead>
<tr>
<th colspan="4">Main Header Cell</th>
</tr>
<tr>
<th colspan="2">Sub Header Cell</th>
<th colspan="2">Sub Header Cell</th>
</tr>
<tr>
<th>Name</th>
<th>Name</th>
<th>Name</th>
<th>Name</th>
</tr>
</thead>
<tbody>
<tr>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
</tr>
<tr>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
</tr>
<tr>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
</tr>
<tr>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
</tr>
</tbody>
<caption id="caption"><em>Caption</em></caption>
</table>

And my browser shows the caption above the table. I did some more checking and according to the HTML specification, the caption is strangely placed above the table by default.

But you can change this with css:

caption {
  display: table-caption; /* default */
  text-align: center; /* default */
  caption-side: bottom;
}

see also Custom CSS

@tessus

Thanks for looking into that so quickly. As I said, it was not a great problem but may have annoyed those who were wanting to keep more "scientific" style notes in Joplin. The userstyle.css workaround is good enough for me but of course printing the note will put it back on top.

Admittedly @laurent has stated in the past that a printstyle.css may possibly be an option in the future.

I suppose it would depend on whether implementing printstyle.css would create more support problems than it solves.

Anyway, thanks again and I think it is about time I sent in another donation to the project.