Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions news/changelog-1.8.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ All changes included in 1.8:

- ([#12598](https://github.com/quarto-dev/quarto-cli/pull/12598)): Ensure `.fragment` on an image with caption applies to whole figure.

### `docx`

- ([#8392](https://github.com/quarto-dev/quarto-cli/issues/8392)): Fix `docx` generation issues in tables

## Projects

### `website`
Expand Down
4 changes: 2 additions & 2 deletions src/resources/filters/layout/docx.lua
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,11 @@ end

function docxAlign(align)
if align == "left" then
return "start"
return "left"
elseif align == "center" then
return "center"
elseif align == "right" then
return "end"
return "right"
else
return nil
end
Expand Down
15 changes: 9 additions & 6 deletions src/resources/filters/quarto-post/docx.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,16 @@ function calloutDocx(node)
<w:tblStyle w:val="Table" />
<w:tblLook w:firstRow="0" w:lastRow="0" w:firstColumn="0" w:lastColumn="0" w:noHBand="0" w:noVBand="0" w:val="0000" />
<w:tblBorders>
<w:left w:val="single" w:sz="24" w:space="0" w:color="$color"/>
<w:right w:val="single" w:sz="4" w:space="0" w:color="$color"/>
<w:top w:val="single" w:sz="4" w:space="0" w:color="$color"/>
<w:left w:val="single" w:sz="24" w:space="0" w:color="$color"/>
<w:bottom w:val="single" w:sz="4" w:space="0" w:color="$color"/>
<w:right w:val="single" w:sz="4" w:space="0" w:color="$color"/>
</w:tblBorders>
<w:tblCellMar>
<w:left w:w="144" w:type="dxa" />
<w:right w:w="144" w:type="dxa" />
</w:tblCellMar>
<w:tblInd w:w="164" w:type="dxa" />
<w:tblW w:type="pct" w:w="100%"/>
<w:tblLook w:firstRow="0" w:lastRow="0" w:firstColumn="0" w:lastColumn="0" w:noHBand="0" w:noVBand="0" w:val="0000" />
</w:tblPr>
<w:tr>
<w:trPr>
Expand Down Expand Up @@ -101,6 +100,7 @@ function calloutDocx(node)

-- close the table
local suffix = pandoc.List({pandoc.RawBlock("openxml", [[
<w:p/>
</w:tc>
</w:tr>
</w:tbl>
Expand All @@ -121,16 +121,19 @@ function calloutDocx(node)
<w:tbl>
<w:tblPr>
<w:tblStyle w:val="Table" />
<w:tblLook w:firstRow="0" w:lastRow="0" w:firstColumn="0" w:lastColumn="0" w:noHBand="0" w:noVBand="0" w:val="0000" />
<w:tblInd w:w="164" w:type="dxa" />
<w:tblBorders>
<w:left w:val="single" w:sz="24" w:space="0" w:color="$color"/>
</w:tblBorders>
<w:tblCellMar>
<w:left w:w="0" w:type="dxa" />
<w:right w:w="0" w:type="dxa" />
</w:tblCellMar>
<w:tblInd w:w="164" w:type="dxa" />
<w:tblLook w:firstRow="0" w:lastRow="0" w:firstColumn="0" w:lastColumn="0" w:noHBand="0" w:noVBand="0" w:val="0000" />
</w:tblPr>
<w:tblGrid>
<w:gridCol w:w="7920" />
</w:tblGrid>
<w:tr>
<w:trPr>
<w:cantSplit/>
Expand Down
Binary file modified tests/docs/smoke-all/2024/01/31/8507.docx.snapshot
Binary file not shown.
Loading