Multiline table cells with no line breaks #6947
Replies: 2 comments 1 reply
-
In Quarto, you can write tables as HTML, even if you are using LaTeX/PDF as output, see https://quarto.org/docs/authoring/tables.html#html-tables. In my opinion, your proposed syntax is not a great one as we can't even see the columns in it and is more limited than current available ones. Also, I believe you are missing several markdown tables syntaxes such as the grid markdown tables, see https://pandoc.org/chunkedhtml-demo/8.9-tables.html. ---
title: "Quarto Playground"
format: html
---
This is a playground for Quarto.
+------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------+
| This is the first column's header | And this is the second column's header, much better than the one you can see here in the left column | This is just a value, in the third column |
+================================================+==========================================================================================================================================================+===========================================+
| This is the first parameter | And here we go on and on explaining what it does, and what it would be better you, the inconsiderate user, don't do or touch to avoid messing things up. | 100% |
+------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------+
| This is the second parameter. Anything follows | | |
+------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------+
: Table caption {tbl-colwidths="[20,70,10]" .striped} Or more compact ---
title: "Quarto Playground"
format: html
---
This is a playground for Quarto.
+-----------------------------------+---------------------------------------------------+-----------------------+
| This is the first column's header | And this is the second column's header, | This is just a value, |
| | much better than the one you can | in the third column |
| | see here in the left column | |
+===================================+===================================================+=======================+
| This is the first parameter | And here we go on and on explaining what it does, | 100% |
| | and what it would be better you, | |
| | the inconsiderate user, | |
| | don't do or touch to avoid messing things up. | |
+-----------------------------------+---------------------------------------------------+-----------------------+
| This is the second parameter. | | |
| Anything follows | | |
+-----------------------------------+---------------------------------------------------+-----------------------+
: Table caption {tbl-colwidths="[20,70,10]" .striped}
I don't understand what you mean here and what's the issue. |
Beta Was this translation helpful? Give feedback.
-
The first thing I would like to point out is that a solution to my issue has already been offered, in Pandoc, by way of the RST-style list tables: https://github.com/pandoc-ext/list-table I've no idea if this can already be invoked by Quarto. Is it? I want it! The existing solutions, apart for this, are not good ones for my way of working.
But the list tables idea is what I need: elements clearly separated, and elegantly laid out so that they are very easy to read. |
Beta Was this translation helpful? Give feedback.
-
Description
Hi,
I've also posted this proposal in the Pandoc forum, since I think it can only be realized with a combined effort.
I deal with big tables, with multiline cells. These are usually descriptions of parameters or features.
The current solution for multiline cells is to manually break lines. This is not handy in case of editing or translation (with translation tools identifying broken lines as separate paragraphs).
My humble proposal is to use something starting from the grid table syntax, but allowing adjacent cells to be written into subsequent paragraphs. So, a table like this:
could be written like this:
If the compiler (for example, Quarto) allows for it, a set of configuration parameters between curly brackets could be attached to the table caption, as shown in the above example.
Paolo
Beta Was this translation helpful? Give feedback.
All reactions