Skip to content

Commit

Permalink
lua,docx - port @edwintorok's changes in #8392 to v1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
cscheid committed Jan 29, 2024
1 parent 82f0bb0 commit 1c04190
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
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 "let"
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 @@ local function calloutDocxDefault(node, type, hasIcon)
<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 @@ local function calloutDocxDefault(node, type, hasIcon)

-- close the table
local suffix = pandoc.List({pandoc.RawBlock("openxml", [[
<w:p/>
</w:tc>
</w:tr>
</w:tbl>
Expand All @@ -121,16 +121,19 @@ local function calloutDocxSimple(node, type, hasIcon)
<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

0 comments on commit 1c04190

Please sign in to comment.