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

1.3 xml fix #8392

Open
wants to merge 2 commits into
base: v1.3
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/resources/filters/layout/docx.lua
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,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
21 changes: 14 additions & 7 deletions src/resources/filters/quarto-pre/callout.lua
Original file line number Diff line number Diff line change
Expand Up @@ -583,20 +583,23 @@ function calloutDocxDefault(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:tblW w:type="pct" w:w="100%"/>
<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: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:tblGrid>
<w:gridCol w:w="7920" />
</w:tblGrid>
<w:tr>
<w:trPr>
<w:cantSplit/>
Expand Down Expand Up @@ -671,6 +674,7 @@ 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 @@ -691,16 +695,19 @@ 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