-
-
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 writer: Customizable figure and table caption for docx output #7451
Comments
Table numbers were changed in 0948af9 to use Word's numbering system, so they ought to be customizable using the mechanisms in Word. |
Well, maybe this isn't enough for what you want. I guess we're hard-coding that the numbers are ARABIC. It would be better to make this adjustable in a style, but I don't know how to do this. Even if they were adjustable, Word doesn't offer a sequence number like S#. You can mess with translations data files to make the translation for Figure "Figure S", but you'll get a space between "S" and #, so probably not what you want. You can make the whole caption boldface with the Caption style, but again probably not what you want. You might be expecting a degree of customization that goes beyond what we can easily provide. |
Thanks for your reply. In that case, I might either 1) use an older version of pandoc that doesn't insert the hardcoded text so it just uses the image/table caption numbering format from my reference.docx (this would lose the ability to insert a table of figures, which is fine in my case) or 2) just post process the word doc with a find and replace. I appreciate your time! |
How do you customize the caption numbering format in your reference.docx? |
Up until now, I was using pandoc-crossref for the figure numbering. While I think the support for automatic numbering in docx are a great addition, I am not entirely sure how to do the referencing to figures now. 2.14.1 creates a dilemma:
Or am I mistaken and you can reference a figure with its future number when writing? If the dilemma as I state it here is indeed correct, an options to suppress automatic figure/table numbering would indeed be useful to be able to use docx writer with crossref/fignos; maybe as an extension? |
See #7499. In the commit I just pushed, |
For the 2.14.1 release that included changes to the Docx writer, which adds fields with numbering for figures and tables (a3d745e), the outputted Docx figures and tables with captions appear to have the following prepended to the captions:
Figure #: (caption) and Table #: (caption)
Is there a way to make this prepended text customizable so we can have:
Figure S#: (caption) or Fig. #: (caption) or Figure #: (caption)?
I've tried changing this with numbering the table/image caption style in the custom-reference Docx, but then I end up with:
[custom numbering] Figure #: (caption)
Thank you!
The text was updated successfully, but these errors were encountered: