-
Notifications
You must be signed in to change notification settings - Fork 77
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
subfigure images in docx does not rescale #394
Comments
Hi. Thanks for the report. Apparently, Pandoc interprets image widths in docx relative to the page width, regardless of context since 3.0. Well, there is a relatively simple fix for this (hopefully, IIUC what's going on), but I don't have the mental bandwidth to implement it at the moment. Please ping me if I don't get around to it by the end of this week. If you want to make a PR, that'd be even better, I think all that needs to be done is this code here pandoc-crossref/lib-internal/Text/Pandoc/CrossRef/References/Blocks/Subfigures.hs Lines 130 to 134 in ef8fcf6
needs to set image width to column width instead of |
@lierdakil Ping 🙏 |
Okay, sorry, I completely forgot about it 🤦 Anyway, I believe I have a fix. ---
subfigGrid: true
---
<div id="fig:coolFig" class="subfigures">
{#fig:cfquatSample}
{#fig:cfquatStar}
{#fig:cfquatBlueStar}
{#fig:cfquatProf}
{#fig:cfbs}
{#fig:cfpc}
{#fig:cfbs2}
{#fig:cfpc2}
Pngfiles
</div> gets us this docx: |
Imma keep this open for now. 40852a9 should finish building in the next half an hour, so if anyone wants to verify the fix, feel free to grab artifacts from https://github.com/lierdakil/pandoc-crossref/actions/runs/12337044436. I'll make a patch release within a few days. |
with
subfigGrid=true
, following code in html creates auto-rescales image table.However on docx output images retain original size.

Is there a way to fit image for docx table cell?
Regular
width
specification determines col width and I could not find a way to manually rescale image.The text was updated successfully, but these errors were encountered: