-
-
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
Docx: separate format style for tables #2033
Comments
That's going to be a little hard. Consider for example the case when there is a compact list inside a table cell. Pandoc uses |
Currently, I know nearly nothing about the implementation side in pandoc and why it represents two different syntactic and symantic elements as the same AST element. Is this intentional or just caused by code evolution? From the users point of view I guess that having a compact list inside a table is much less frequent than having simple tables and compact lists outside of tables. Hence the benefit of a "plain table style" would outweight the rare cases of compact lists inside tables. But indeed, an inconsistency would be introduced at the same time. |
As far as I can see, pandoc allows lists inside tables only for grid tables and the extension |
Pandoc's AST does not make any distinction between different table 2015-03-29 20:48 GMT+03:00 Mathias Walter notifications@github.com:
|
You are right in that way that in Word there is no predefined style for tables. But there are themes available for tables and you can create a custom style with style type 'table' and can define first, last, even, odd rows, etc. BTW: There are some predefined styles for (un-)numbered lists. Personally, I would use those styles for the different kind of lists pandoc can generate, rather than the compact style. |
Lists in Word are... weird, let's leave it at that for now. It would be a very non-trivial thing to use list styles on lists, as unintuitive as it might sound. I might tackle this later, but not for a while most likely. As for tables, I could probably hack together a solution for most-used case, i.e. plain text in cells, but it will probably be hacky as hell, so I'm not sure it is the right thing to do. It is possible to do with a filter though (yes, yes, I know, answer to every other request seems to be "use a filter", but that's kind of how it is...) |
See also #774 which is more general. |
This will be very useful. I recently used pandoc to generate some docx format reports. When set Anyone working on this? |
I am having a very similar problem as @tolot27. I am converting HTML to DOCX, and I have Has anyone been able to do this? Would you please point me in the right direction? Thank you so much for your help. |
This can be closed, IMO, as pandoc 2.2.1 uses the "Table" table style from the reference-doc now. |
This PR changes the `Table` style in the custom-reference.docx file in order to create a better looking table in generatee SSP and other documents. Pandoc prior 2.2.0 and earlier used `Compact` style for styling tables. Pandoc 2.2.1 and higher use `Table` style for styling tables. See: jgm/pandoc#2033 (comment)
This PR changes the `Table` style in the custom-reference.docx file in order to create a better looking table in generatee SSP and other documents. Pandoc prior 2.2.0 and earlier used `Compact` style for styling tables. Pandoc 2.2.1 and higher use `Table` style for styling tables. See: jgm/pandoc#2033 (comment) Co-authored-by: Greg Elin <greg.elin@govready.com>
Because the compact style in docx files is used not only by compact lists, but also for table cells, it is not possible to give tables their own look.
Hence, I propose a different style which is only applied to tables.
The text was updated successfully, but these errors were encountered: