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

Supporting pandoc 2.11 #51

Closed
ickc opened this issue Jul 2, 2020 · 9 comments · Fixed by #56
Closed

Supporting pandoc 2.11 #51

ickc opened this issue Jul 2, 2020 · 9 comments · Fixed by #56

Comments

@ickc
Copy link
Owner

ickc commented Jul 2, 2020

See sergiocorreia/panflute#142

Edit:

Warning: after studying the new AST, the decision is to completely rewrite pantable. I'd advice against PR for now, as the current code base is going to be obsolete soon.

Links on new table AST

pandoc reader/writer support status

2.10: add new table AST

2.10.1: add LaTeX reader support: rowspan, colspan

2.11:

  • DocBook reader: column span

  • HTML writer

  • OpenDocument writer

@ickc ickc changed the title Supporting pandoc 2.10 Supporting pandoc 2.11 Nov 8, 2020
@ickc ickc self-assigned this Nov 8, 2020
@ickc ickc added the on hold label Nov 8, 2020
@ickc ickc added enhancement and removed on hold labels Nov 10, 2020
@ickc ickc assigned ickc and unassigned ickc Nov 10, 2020
@alerque
Copy link
Contributor

alerque commented Nov 13, 2020

Do you have work-in-progress code for the rewrite in a branch somewhere?

@ickc
Copy link
Owner Author

ickc commented Nov 13, 2020

No. It probably is quite simple to support panflute>=2 from the current code base. But I've bigger plan for it which basically requires major rewrite and the old code base will becomes obsolete very soon so I don't think it will be time well spent to do that.

That said if anyone want to have a PR for that it would be welcomed. pantable2csv would be a bit strange there but we could assume it was a simple table like in the past and it would at least passes current tests. But I don't know if anyone would spend time on such a PR that would have been overwritten by the major change very soon.

No promise on the time line—but I'd guess by the end of the year.

P.S. The "bigger plan", which is always the goal of pantable, is to be able to write a table with all features supported in pandoc.

@ickc
Copy link
Owner Author

ickc commented Nov 25, 2020

C.f. jgm/pandoc-types#86. Because of the potential breaking change, this project will be put on hold indefinitely until a stable pandoc table AST is decided.

@ickc ickc added the on hold label Nov 25, 2020
@alerque
Copy link
Contributor

alerque commented Nov 25, 2020

Ug 😞. I understand of course, but still ug.

@ickc
Copy link
Owner Author

ickc commented Nov 25, 2020

Frankly I have quite a big plan for pantable and it has gotten into a state I quite like it. May be I'm overreacting but knowing the AST may change again really is a wake up call for me to pause a bit and not betting too much in the stability of the pandoc AST.

May be the goal of supporting every feature pandoc table support is too ambitious. (That requires pantable having a lossless representation of pandoc AST and therefore very sensitive to AST change.) But that's really my motivation for pantable from day 1.

@alerque
Copy link
Contributor

alerque commented Nov 25, 2020

While I get that, 0% coverage is a lot worse than 0% < 𝑥 < 100% coverage. For the vast majority of my production use cases I'm just converting CSV data to very basic tables that pose no particular challenges for the AST. I have to imagine the bulk of what other people do with this is in line with those same basic requirements.

@ickc
Copy link
Owner Author

ickc commented Nov 25, 2020

I'm considering to use what I have written as is and just make the 2 filters as lossy conversion to my internal structure for now and just pause for my big plan for the moment.

@tzok
Copy link

tzok commented Nov 25, 2020

I would like to share my current solution: https://gist.github.com/tzok/3d017b4b35601aa1330adee38e827403

Namely, I have a Docker image with pandoc 2.9.2.1 - the last one compatible with current pantable. There is also a Makefile to show how to use the image.

For simple tables this works just fine.

@ickc ickc mentioned this issue Dec 19, 2020
@ickc ickc closed this as completed in #56 Dec 19, 2020
ickc added a commit that referenced this issue Dec 19, 2020
@ickc
Copy link
Owner Author

ickc commented Dec 19, 2020

Unless I did something wrong, pip install pantable==0.13.0 should now supports pandoc 2.11.2+. This is a big release so please be careful on potential regression and open new issues for any that you find.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants