docx to html numbering #10953
Unanswered
andrew-danieli-fj
asked this question in
Q&A
Replies: 1 comment 21 replies
-
Could you attach a simple example DOCX exhibiting the issues you describe? At the moment I find it hard to understand the issues you are facing, but I think an example doc might fix that. |
Beta Was this translation helpful? Give feedback.
21 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm currently using Pandoc (v3.7.0.2 on windows) to convert an application manual in docx format to html so that it can be used as an online help system. This was originally done using "Word" save as filtered html, however this produces cluttered html, which can be a pain to match the previous conversion (given changes in the version of Office used over the years). So far the results are promising, but I'm stuck with a section numbering issue.
The word document uses H1 - H6 for numbered section headings and numbered text paragraphs and H1 - H4 are fine with the default format (e.g. 1, 1.1, 1.1.1, 1.1.1.1) . H5 and H6 are actually formatted in word as ordered lists, H5 uses a. b. c. etc, whilst H6 uses (1) (2) (3) etc. Given how numerous H5 and H6 are used through the document, I don't really want to reformat it there, and was wondering if the Pandoc default numbering scheme could be overridden with a Lua filter to handle the formatting here?
The other issue I've found is that when a parent section header is skipped, the numbering for the child starts at zero.
If H3 was inserted between H2 and H4, the H4 numbering would be what I was expecting (and what is seen in the original word document). Is it possible to use a filter to reset the H4 numbering to start at 1 when the H3 isn't present?
Any suggestions would be appreciated. My only issue is that I'm new to Lua development, so will be learning as I go when developing any filters. Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions