| aligns | aligns=LRCD | aligns=LRCD | | alignment: LRCD | | source | source | file | source | source | | captio | caption | caption | title | caption | | header | header=yes|no | header=yes|no | has-header: | header: True|False | | type | type=simple|multiline|grid | | | | | | pandoc-csv2table | pandoc-placetable | panflute example | my proposal | I’m not sure if I should follow them.Ī comparison of the keys: (The output is generated by my filter) - - - - - header vs has-header, caption vs title.Īnd for alignment, pandoc-csv2table/placetable use aligns. But I actually think pandoc-csv2table/placetable’s keys make more sense. Backward-compatibility-wise, since pandoc-csv2table and pandoc-placetable use attributes to store metadata, while panflute’s example and mine use YAML to store, the only one I need to consider backward-compatibility is panflute’s. My biggest questions is which metadata keys to use. The current syntax is this (borrow much from panflute’s example, and the csv is borrowed from pandoc-csv2table): ~~~csvĪ Comparison of Metadata Keys Between Pandoc Filters on CSV Tables There’s a notebook in ickc/pandoc-table-csv-test/panflute-csv2table.ipynb and the the filter is at ickc/pandoc-table-csv-test/csv-tables.py. And comparing with the 2 said filters, panflute’s example use YAML to store data, rather than the attributes of the code-block (which I think is more natural for data). What separate this to existing filters is the automatic calculation of the column-width (in contrast with pandoc-placetable) and write to pandoc AST directly (in contrast with pandoc-csv2table), as well as specifying the table width (a ratio to the line-width). And I’m still thinking about which exact syntax to use. `**` instead of indentation), but don't look as naturalįor those who are interested in using CSV tables in pandoc markdown, I’m writing a filter that build upon one of panflute’s example. To write (because, for example, sublists are indicated by This design goal is really important to keep in mind whenĬomparing Markdown to alternatives, which are often easier > plain text, without looking like it’s been marked up withĬSV is simple (though not as flexible as HTML formatting). > Markdown-formatted document should be publishable as-is, as > The overriding design goal for Markdown’s formatting syntax Quoting from John Gruber's original Markdown syntax page: Powerful." It's about having source files that are If "simple yet powerful" is what you want, HTML syntax forīut the Markdown philosophy is not about being "simple but > for the Markdown philosophy of keeping things simple yet > by Pandoc do their job, but don't look like a good fit > In my view the current table implementations supported Itself, as an option, but the code and syntax would not One could think about integrating the filter into pandoc (The CSV will show up as code rather than garbage.) You render it with a standard markdown renderer. I think that using a filter that processes specially markedĬode blocks is a better way to go than introducing yetįor one thing, this will degrade much more gracefully when > Bananas,$1.34,- built-in wrapper\n- bright color > documentation, this could look like this: Using the grid_tables example from the Pandoc > think a Pandoc "csv_tables" Pandoc extension would make this easier for This has been done before using Pandoc filters, but I > table formats allow (multi-column formats and column alignment are a > CSV format, and you can do most of the things with CSV that the other Everyone (and many tools) understands the > attempts to format tables in markdown (simple_tables, multiline_tables, If cell content wants to include pipe or backtick symbols, symbols need to be escaped.> For the second use case I see a clear advantage of CSV over the various Table cell data can include all other markdown content styles like links, bold table’s data like header and row can contain simple text or markdown content Markdown table content format styles.pipe symbol on row start and end are optional.Each column of row data is separated by the pipe symbol.Pipes(|) symbol is optional, but use for readability.Minimum of 3 hyphens(dash symbol)under each header name is required, can declare more than three dashes. ![]() tables without header are not supported in core specification.Output generated in the browser is Header1 Header2 Header3 data1 data2 data3 data11 data12 data13 Header1 Header2 Header3 data1 data2 data3 data11 data12 data13
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |