The markdown docs claim:
A backslash followed by a newline is also a hard line break. Note: in multiline and grid table cells, this is the only way to create a hard line break, since trailing spaces in the cells are ignored.
I have an 2 column table where I could make this work for the last column in the row:
-------------------------------------------------
35
-------------------------- ----------------------
**0-6 mon** 1 \
0.5 \
0 \
0 \
0
-------------------------------------------------
However, when I try to do it for two columns in a row, it fails. If I do it like this, it makes a table, but only puts hard breaks on the last column:
------------------------------------------------------------------------
35 35-45
-------------------------- ---------------------- ----------------------
**0-6 mon** 1 \
0.5 \
0 \
0 \
0 3 \
13 \
0 \
0.02 \
0
------------------------------------------------------------------------
If I do it like this, it doesn't consider it a valid table:
------------------------------------------------------------------------
35 35-45
-------------------------- ---------------------- ----------------------
**0-6 mon** 1 \
0.5 \
0 \
0 \
0 3 \
13 \
0 \
0.02 \
0
------------------------------------------------------------------------
Has anyone ever got this to work?
The answer appears to be: you can not do this with a "multiline" table, only with a grid table. The question marked as a potential duplicate was asking about how to do this in HTML, my question is how to do this so it will work for any output format.
In Pandoc you can use grid tables:
+---------------+---------------+--------------------+
| Fruit | Price | Advantages |
+===============+===============+====================+
| Bananas | first line\ | first line\ |
| | next line | next line |
+---------------+---------------+--------------------+
| Bananas | first line\ | first line\ |
| | next line | next line |
+---------------+---------------+--------------------+
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With