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 output: extra blank line before table #6

Closed
kugelblitz opened this issue Jul 4, 2017 · 5 comments
Closed

docx output: extra blank line before table #6

kugelblitz opened this issue Jul 4, 2017 · 5 comments
Labels

Comments

@kugelblitz
Copy link

kugelblitz commented Jul 4, 2017

Hello,

The docx output basically works, though the three docx output files for examples stored in the repo give a false impression that it does not.

That said, I have a serious problem using pandoc-tablenos with docx output: the filter adds an extra blank line before each table's caption. There is no extra blank line if I skip applying the filter. I do not understand the cause and found no way to work that around, can you help me?

Best regards,

Dmitry

@jrennstich
Copy link

I have the same issue.

@tomduck
Copy link
Owner

tomduck commented Jan 14, 2018

I'm restarting work on docx support for the pandoc-fignos/eqnos/tablenos filters. I'm hoping to do either pandoc-fignos or pandoc-eqnos first. See:

and corresponding wikis to organize materials at:

Once those two have been solved, moving on to solve the same problem in pandoc-tablenos should be pretty straight-forward.

@landlord11
Copy link

Hi, I ran into this problem with pandoc-fignos, and making this change to the code removed the blank line:

@@ -258,10 +258,10 @@
             # As per http://officeopenxml.com/WPhyperlink.php
             bookmarkstart = \
               RawBlock('openxml',
-                       '<w:p><w:bookmarkStart w:id="0" w:name="%s"/><w:r><w:t>'
+                       '<w:bookmarkStart w:id="0" w:name="%s"/>'
                        %attrs[0])
             bookmarkend = \
-              RawBlock('openxml', '</w:t></w:r><w:bookmarkEnd w:id="0"/></w:p>')
+              RawBlock('openxml', '<w:bookmarkEnd w:id="0"/>')
             return [bookmarkstart, Para(value), bookmarkend]

I assume something similar is being done in tablenos, too. Hope this helps.

Brian

@tomduck
Copy link
Owner

tomduck commented Aug 8, 2018

Thank you all for this bug report, and @landlord11 for the working code. I have implemented it as above in the nextrelease branch of both pandoc-fignos and pandoc-tablenos, and will ship new versions to pipy in the next few days. Please let me know if anything breaks: I am not a docx user.

Cheers,
Tom

@tomduck
Copy link
Owner

tomduck commented Aug 9, 2018

I'm closing this in anticipation of a new release today.

@tomduck tomduck closed this as completed Aug 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants