Replies: 6 comments
-
Have your tried this? https://github.com/pandoc-ext/list-table
Le Thursday 25 January 2024 à 02:26:38PM, ptram a écrit :
… Hi,
I would like list tables to be implemented. While they may not seem
visually appealing, they fit the Markdown philosophy very well.
Please let me explain my view on Markdown tables.
- The simplest one is easy and nice, but is conceived for an ideal,
bare bone table of the type:
Fruit | Q.ty
:----|:----:
pears | 6
apples | 5
It is most likely that a real table looks something like this:
Parameter | Meaning | Values
:----------|:---------|:------:
Attack Rate | The speed at which the sound goes from silence to the maximum intensity level. | 0 ~ 10 s
Frequency Cut | Frequency at which the low-pass filter starts to attenuate the harmonic content of the sound. | 300 Hz ~ 10 kHz
All considered, I could live with it, in particular if tabs are accepted
and can help create some sort of internal alignment.
Unfortunately, Pandoc can't merge cells (using the syntax I saw proposed
for CommonMark, using the "^" symbol for vertical merging and the "||"
symbols for horizontal merging).
- The grid table seems to me to go against the scope of Markdown, that
is separating content and formatting. It's an attempt to recreate
the old semi-graphical formatting of the dot-matrix printer age.
The worse problem, with this format, is that the content is broken into
separate lines, and can no longer be parsed by language tools (like CAT
tools, that can identify an unit by the ending period).
- HTML tables reintroduce the complexity and lack of readability that
Markdown tries to avoid. They obviously work perfectly fine, but
break the Markdown workflow. Technical and scientific works, that
are the ones most likely using Markdown, are full of complex tables.
- The format I find the easier to deal with is the list table. Pandoc
is not currently natively supporting it. The advantage of this
format is that complex tables are perfectly readable. For example:
* - Parameter
- Meaning
- Values
* - Attack Rate
- The speed at which the sound goes from silence to the maximum intensity level.
- 0 ~ 10 s
* - Frequency Cut
- Frequency at which the low-pass filter starts to attenuate the harmonic content of the sound.
- 300 Hz ~ 10 kHz
The syntax could be make a bit more powerful, adding devices to set the
column alignment. I also don't see a way to merge cells. But the raw
idea of using lists to represent tables seems to me to work fine.
Everything is set in a symmetric disposition. It doesn't look like a
table, but Markdown is meant to deal with content, not appearance. So, I
would appreciate it for its scope.
Paolo
—
Reply to this email directly,
#9374, or
https://github.com/notifications/unsubscribe-auth/AMTDGSQJV355QRYNUF5H3ZLYQLLZ5AVCNFSM6AAAAABCLIMS3WVHI2DSMVQWIX3LMV43ERDJONRXK43TNFXW4OZWGEZTGNBTGM.
You are receiving this because you are subscribed to this
thread.[]Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I had seen it in the past, but had no longer found this particular page. Thank you! What I can't understand is if this immediately works in Pandoc. I did a first try with Panwriter, and it didn't translate to a formatted table in HTML or PDF. |
Beta Was this translation helpful? Give feedback.
-
It should, in the makefile the test is run just with:
pandoc --lua-filter list-table.lua --to=html sample.md
Le Thursday 25 January 2024 à 02:59:36PM, ptram a écrit :
… Have your tried this?
I had seen it in the past, but had no longer found this particular page.
Thank you!
What I can't understand is if this immediately works in Pandoc. I did a
first try with Panwriter, and it didn't translate to a formatted table
in HTML or PDF.
—
Reply to this email directly,
#9374 (comment),
or
https://github.com/notifications/unsubscribe-auth/AMTDGSU5BY2LEABOWS3J24LYQLPVRAVCNFSM6AAAAABCLIMS3WVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DENJQHAZDG.
You are receiving this because you commented.[]Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Just as a followup: I could add to my Quarto project the list-table filter developed by Martin Fisher, as suggested above. No need to enter parameters for Pandoc, since Quarto managed it with its external filter system. I just had to put the
Quarto rendered my list table without a hassle. Beautiful! |
Beta Was this translation helpful? Give feedback.
-
I wouldn't say that the point of markdown is separating content and formatting. That's a goal that is well achieved by XML. The prime directive of markdown is rather to have structured text in a form that is readable in the source, without processing. Grid tables are great for that. They look like tables; the information is all there, just as it would be on a printed page. |
Beta Was this translation helpful? Give feedback.
-
I don't know if this is the place to talk about that, but I really like list -tables, and this why I always use it in my markdown file. However pandoc only allows to write list-tables in function Writer(doc, opts)
local filter = {
Table = function(el)
-- convert to rst grid-table
local doc= pandoc.Pandoc(el)
local listTable = pandoc.write(doc, "rst")
return pandoc.RawBlock('markdown', listTable)
end
}
return pandoc.write(doc:walk(filter), 'markdown', opts)
end
Template = pandoc.template.default 'markdown' However, I can't find a way to add the the option --list-tables in the writer. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I would like list tables to be implemented. While they may not seem visually appealing, they fit the Markdown philosophy very well.
Please let me explain my view on Markdown tables.
It is most likely that a real table looks something like this:
All considered, I could live with it, in particular if tabs are accepted and can help create some sort of internal alignment.
Unfortunately, Pandoc can't merge cells (using the syntax I saw proposed for CommonMark, using the "^" symbol for vertical merging and the "||" symbols for horizontal merging).
The worse problem, with this format, is that the content is broken into separate lines, and can no longer be parsed by language tools (like CAT tools, that can identify an unit by the ending period).
HTML tables reintroduce the complexity and lack of readability that Markdown tries to avoid. They obviously work perfectly fine, but break the Markdown workflow. Technical and scientific works, that are the ones most likely using Markdown, are full of complex tables.
The format I find the easier to deal with is the list table. Pandoc is not currently natively supporting it. The advantage of this format is that complex tables are perfectly readable. For example:
The syntax could be made a bit more powerful, adding devices to set the column alignment. I also don't see a way to merge cells. But the raw idea of using lists to represent tables seems to me to work fine.
Everything is set in a symmetric disposition. It doesn't look like a table, but Markdown is meant to deal with content, not appearance. So, I would appreciate it for its scope.
Paolo
Beta Was this translation helpful? Give feedback.
All reactions