Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rST writer: add option for list tables, closes #4564 #4780

Closed
wants to merge 1 commit into from

Conversation

danse
Copy link
Contributor

@danse danse commented Jul 18, 2018

I moved some code from the body of blockToRST to a gridTableRST function which exposes the same interface as listTable.

I wrote mapTable and joinTable thinking that they could end up to the Shared module some day. They are straightforward but i think that using them makes the code more readable.

I also fixed the help string for the reference-links option.

@jgm
Copy link
Owner

jgm commented Jul 19, 2018

This changes the public-facing API, and these changes should be carefully described. As a result of the API change, this PR would require at least a bump to 2.3.

@danse
Copy link
Contributor Author

danse commented Jul 19, 2018

This is a non-breaking change, so according to the versioning policy it must affect only C in A.B.C, if i understand correctly.

When you say carefully described you mean a line for the changelog and the release notes, or a paragraph somewhere in the manual?

@danse
Copy link
Contributor Author

danse commented Jul 19, 2018

Note that, differently from what is discussed in #4564, list tables are not the default option, here. I figured it's better to introduce it as a new option for now, it will be easy to change the default behaviour later if we will want to

@jgm
Copy link
Owner

jgm commented Jul 19, 2018 via email

this changes the API adding a global `--list-table` option which only
affects the rST writer, and causes all tables to be rendered using the
list table syntax documented here
http://docutils.sourceforge.net/docs/ref/rst/directives.html#list-table
@danse
Copy link
Contributor Author

danse commented Jul 19, 2018

i edited the commit message and force-pushed. while writing it occurred to me that, being an option that only involves one format, maybe it could be exposed as an extension in order not to pollute the space of global options. it could be used with -t rst+list-tables. i cannot assess the possibility of list tables to be adopted for other markup languages

@kaushalmodi
Copy link

@danse Seeing that you are tweaking the table option in RST writer, would you have time to implement exporting of simple_table too? (#4750)

Thanks!

@danse
Copy link
Contributor Author

danse commented Jul 26, 2018

hi @kaushalmodi, the simple table syntax alternative doesn't seem to add much value in terms of maintainability in comparison with other styles, at least in my opinion. Anyway i will submit the idea to my team and check whether is there any interest, thanks

@kaushalmodi
Copy link

kaushalmodi commented Jul 26, 2018

@danse As the original issue mentions, it adds value to my use case of converting Org mode documentation to RST format, which the Nim language doc generator requires (and the RST parser in Nim accepts only simple table syntax). Thanks for considering this request.


Update: Also, may be continue the conversation about simple tables in #4750 so that this thread doesn't get off-topic.

@jgm
Copy link
Owner

jgm commented Sep 14, 2018 via email

@danse
Copy link
Contributor Author

danse commented Sep 17, 2018

so if i understand correctly, extensions are expected to affect reading and writing. is there a place where we keep a glossary? it would be great for refining these concepts. about list tables, if they are one of the allowed syntaxes, then we want them to pass through the parser anyway. i guess that this principle applies to all readers

@kwshaw1
Copy link

kwshaw1 commented Dec 11, 2019

Is this a functional solution yet? Can I get a version of Pandoc that generates list tables instead of grid tables when converting to RST?

@danse
Copy link
Contributor Author

danse commented Jan 20, 2020

Hi @kwshaw1, this solution worked and was merged in this fork, which hasn't been updated in a while

@petterreinholdtsen
Copy link

I would love to see list-table write support in pandoc. Need it for a Norwegian national standard. Any hope to have support for it in an official pandoc version any time soon?

@krzychb
Copy link

krzychb commented Aug 6, 2020

@danse another happy pandoc user here 👍
Grid tables, especially when big and in big quantity are far less convenient to use than the list tables.
Adding to several good comments in #4564, unlike for the grid tables, I like the list tables for their flexibility when it comes to text translation and editing.
Our life will be even better having the list table support in pandoc ❤️
Thank you for this great conversion tool.

@danse
Copy link
Contributor Author

danse commented Jan 29, 2021

Superseeded by a corresponding updated pull request

@danse danse closed this Jan 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants