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

docx and --number-sections #1413

Closed
tolot27 opened this issue Jul 11, 2014 · 5 comments
Closed

docx and --number-sections #1413

tolot27 opened this issue Jul 11, 2014 · 5 comments

Comments

@tolot27
Copy link
Contributor

tolot27 commented Jul 11, 2014

It would be great if the DocXWriter would also handle the --number-sections parameter.

Indeed, it seem to be possible to apply the list style 'Headings' predifined by Word after opening the document or adjusting the reference.docx accordingly to avoid repetitions and automate the conversion process.
Unfortunately, that's not possible with non-english Word versions. I struggled with this problem the last two days and found no solution.
Even changing the UI language of Word to British or American English does not solve the problem. Word (I'm using 2010 version with multilanguage pack and pandoc 1.12.4.2) always blows up the reference.docx after saving, even in compatibility mode. It changes nearly all style names and translates it to the local language.
Defining a custom multilevel list style is possible but it is impossible to change it afterwards. Even if I use a custom list style with the english names, pandoc does not seem to use it. I get incorrect numbering.

I just want to have

1 Heading 1
1.1 Heading 2
1.1.1 Heading 3
...

but get

. Heading 1
   - Heading 2
     a Heading 3

Maybe that is related to #1305 but the language problem still persists. Many users don't have a multilanguage version of Word.

Also, I was not able to find a native english normal.docx which contains the correct list style. If one can provide such a file or reference-numbered-sections.docx i.e. in the Wiki User contributed templates that would be very helpful. Then I can merge the corresponding parts of numbering.xml and style.xml into my own reference.docx.

But the best would be if pandoc itself would insert the correct fragments into numbering.xml or style.xml. The fix of #1305 indicates that the numbering.xml is now merged. Hence it would be easy to extend by the number-sections fragment.

@tolot27
Copy link
Contributor Author

tolot27 commented Jul 15, 2014

I can confirm that it works with the current development version.

Nevertheless, I believe the main extension is still highly useful.

On difficulty arose: headings marked as non-numbered (followed by a {-}) still get a number in Word. That should be treated differently and of course automatically (just by removing the numbering format). Doing all this stuff manually is really boring. ;-)

@tdihp
Copy link

tdihp commented Mar 17, 2018

After a while I found that using MSWord's outline numbering feature, then use the modified output as reference docx works.

@jooyoungseo
Copy link

It would be so nicer if someone could provide reference-numbered-sections.docx template to pandoc wiki so that those who have the same issue can get help there.

@krissen
Copy link

krissen commented Apr 10, 2020

It would be so nicer if someone could provide reference-numbered-sections.docx template to pandoc wiki so that those who have the same issue can get help there.

Done!

Found this thread when looking for a solution myself. Made a reference docx and linked to it from the pandoc wiki.

@jooyoungseo
Copy link

Thanks @krissen! It looks great!

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

6 participants