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

word to wikitext number list is not converted correctly. #5134

Closed
liao24hoho opened this issue Dec 7, 2018 · 7 comments
Closed

word to wikitext number list is not converted correctly. #5134

liao24hoho opened this issue Dec 7, 2018 · 7 comments

Comments

@liao24hoho
Copy link

liao24hoho commented Dec 7, 2018

When using pandoc to convert from word(docx) to wikitext,
the end result wikitext does not have the big numbered list.
looks like the resultant wikitext treat the list items as separate items.

I tried two versions of Pandoc:

  1. pandoc-2.0.4-windows
  2. pandoc-2.5-windows-x86_64.msi
@mb21
Copy link
Collaborator

mb21 commented Dec 8, 2018

What is the exact command used? What do you mean with wikitext?

@liao24hoho
Copy link
Author

The command used:
pandoc.exe --from=docx --to=mediawiki 2>&1
by wikitext I mean mediawiki wikitext

@liao24hoho
Copy link
Author

liao24hoho commented Dec 10, 2018

You can see from the uploaded image that the header “Content Migration" has number 1 but in the original document it has number 2.

@jgm
Copy link
Owner

jgm commented Dec 10, 2018

It's an issue with the docx reader, not the mediawiki writer.
The bullet lists are all being parsed with default start number 1.
@jkr can you see what is going on here?

@jkr
Copy link
Collaborator

jkr commented Dec 10, 2018

These are separate items, so it's an issue with the start num. There seems to be a w:startOverride entry which we hadn't read:

  <w:num w:numId="2">
    <w:abstractNumId w:val="5"/>
    <w:lvlOverride w:ilvl="0">
      <w:startOverride w:val="2"/>
    </w:lvlOverride>

So I have to implement a lvlOverride and startOverrride. Semester just ended, so I'll get on it right now.

jkr added a commit to jkr/pandoc that referenced this issue Dec 10, 2018
There can be overrides for the definitions of certain levels in
numbering definitions. This implements that behavior.

Closes: jgm#5134
@jkr
Copy link
Collaborator

jkr commented Dec 10, 2018

Ok -- I have a fix. @liao24hoho, would it be okay if I used a (simplified) copy of your file as a test case? I don't know how to reproduce this behavior from scratch. I'll push it as soon as a I hear back.

@liao24hoho
Copy link
Author

@jkr feel free to use it.

@jkr jkr closed this as completed in 448fb35 Dec 11, 2018
daamien pushed a commit to daamien/pandoc that referenced this issue Dec 27, 2018
There can be overrides for the definitions of certain levels in
numbering definitions. This implements that behavior.

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

No branches or pull requests

4 participants