-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Support for table column spans, table attributes in AST #1024
Comments
+++ Alberto Leal [Oct 16 13 17:35 ]:
Long-term, yes, I'd like to. |
Are there any plans for this? I'm also interested in this. |
+++ jokogr [Oct 22 15 08:00 ]:
Yes, it would be good to do, but it's a big change as it |
Is there anything I could do to speed this up? |
+1 |
2 similar comments
+1 |
+1 |
@jokogr, sorry for my obvious reply: providing a patch may help. |
+++ Pablo Rodríguez [Mar 09 16 22:03 ]:
This would require some major architecture change, |
@jgm is there any way to achieve this with a two-step process? Compile multimarkdown to an intermediate state and then that result with pandoc? |
+++ Brian Feister [Mar 10 16 08:50 ]:
No, the problem is very simple. Pandoc's internal document |
Sidenote: probably this issue should be applied the label In an attempt to make a suggestion here, I stumbled on issue #3154: pandoc "almost" has a 5th table extension: using native HTML as table. If it were true: then after the AST changed to allow The reason for this suggestion is that settling for a syntax(es) is often tricky and requires a lot of discussions (except for possibly " |
An AST change to tables would require changes in both |
@jgm said,
I don't know much about the design of the AST. Can a new AST including column & row span be a superset of the current AST? If so, the transition period can be made smoother, i.e. a gradual roll out of the feature rather than changing the AST and all the writers & readers at the same time:
|
One of the reasons this feature is important is that in scientific setting whenever one needs to compare multiple groups, some kind of subheader is needed in the table. Having that, would permanently make pandoc place firm foot within the space of scientific writing. |
+++ lf_araujo [Oct 11 16 22:34 ]:
Actually there are two issues here, right?
|
No, changing the table AST would definitely require changes |
I don't understand. Can we put a switch in the reader such that when a pandoc command is used, knowing the output writer do not understand colspans, then the reader do not parse colspans. It seems like somekind of switch are already being used, say when some extensions is turned off in the command line. I can see a problem might occur if the input format is AST or JSON where the reader cannot (as least difficult to) switch off the colspan/row features. But people should know what they are doing if AST/JSON is used (and show an error message to them). |
Yes. The ability to format subheaders would be also needed. |
+++ ickc [Oct 12 16 01:15 ]:
No, readers are always independent of writers. But you're |
I see. Then that is really a huge task. And I guess since changing AST would have compatibility issue, one didn't want to change that often, which means the strategy is probably to do serveral important AST change at once, which would make it even a bigger challenge. And since AST change will break backward compatibility, it is safe to say it will only be in pandoc v2.0? In that case should a milestone be setup (even with no deadline), and add those important AST change to it (among other things). |
Thanks for the attention. I will leave two models of tables that are prevalent in papers. The first should be approachable in future iterations of pandoc, the second one, however, is a little more tricky and may not.
The equals were used to represent the bits that usually have lines to separate the subreader. The second trickier table occurs when one wants to span vertically two cells. This is not essential, I am putting as an example of a common types of tables (a table for description of the population in this case).
What typically happens is a merge of the cell containing the value .99 and the cell above. That statistics concerns both Male and Female. I hope I am being clear. |
Pandoc currently allows at most one header row, which must be at the top. A rule is inserted below it in default LaTeX output. One could try to separate conceptually between being a header cell and having a rule under, so that a cell could have one of these properties without the other. Perhaps the idea in @lf-araujo's example is that a rule of hyphens |
I've not read this thread entirely but I'm currently using pandoc (2.7.2) with wkhtmltopdf and am finding that the same issue is occurring. I wondered if anyone can explain why this won't work when using wkhtmltopdf to generate the html -> pdf conversion? Thanks very much! |
@welly, question like this might fit pandoc-discuss better. The issue tracker is for discussing the feature request. Currently the pandoc AST doesn't have a model for this so it isn't supported in pandoc yet. |
Really cry for this feature.
|
I went looking for multi-span rows and columns in pandoc, and ended up here. My interest is not with the science community, but in the writing of government standards. We are currently experimenting with writing the standard texts in markdown and rst, and use pandoc to convert them to PDF (via docbook). But the lack of rowspan support in the tables make it impossible to represent the layout of the original docx. It would thus would be great if pandoc supported spans. Sorry for not having any code to contribute, but thought it would be useful to know about yet another use case. |
I found this after a search about formatting / laying out tables also.
The markup is based on the UK Gov's Design System: https://design-system.service.gov.uk/components/table/ - but we have a use case for these types of tables. |
A strong use case for this are some 3GPP specs that contain bit fields, e.g. https://portal.3gpp.org/desktopmodules/Specifications/SpecificationDetails.aspx?specificationId=3111 |
For those who have been following this issue, we have a PR for new table types here: |
Is the Markdown syntax for these new features described in prose/with examples somewhere? |
There's no markdown syntax. That's a separate issue, and it may be quite a while before that changes. You shouldn't even assume that we will provide a markdown syntax capable of representing all these distinctions. For now the focus is just on providing types capable of representing more complex tables, which can certainly be represented in other formats. |
@jgm is there a timeframe for a binary release with these great improvements?? and is there a good way to contribute for input/output format handling? |
This can be closed now: we have these features in the AST. |
There will be regular API docs once the new pandoc-types is released. |
|
I tried looking for this within the Pandoc's docs. None of the flavours of markdown tables support column spanning. I don't think there are known markdown flavours that support column spanning except for multimarkdown.
Are there plans to support this?
The text was updated successfully, but these errors were encountered: