Skip to content

Commit

Permalink
Merge pull request #1150 from KarstenSchulz/reorder_caller_args
Browse files Browse the repository at this point in the history
Reorder caller args as discussed in #1146
  • Loading branch information
akrabat committed Apr 24, 2023
2 parents 3a3e80c + fccb930 commit 9bb7e8e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion rst2pdf/createpdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ def createPdf(
t_style = TableStyle(self.styles['endnote'].commands)
colWidths = self.styles['endnote'].colWidths
elements.append(
DelayedTable([[n[0], n[1]]], style=t_style, colWidths=colWidths)
DelayedTable([[n[0], n[1]]], colWidths=colWidths, style=t_style)
)

if self.floating_images:
Expand Down
20 changes: 10 additions & 10 deletions rst2pdf/genelements.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,8 @@ def gather_elements(self, client, node, style):
return [
DelayedTable(
[[fn, fb]],
style=t_style,
colWidths=client.styles['field-list'].colWidths,
style=t_style,
)
]

Expand Down Expand Up @@ -380,7 +380,7 @@ def gather_elements(self, client, node, style):
client.gather_elements(node, style=style),
]
]
return [DelayedTable(td, style=t_style, colWidths=colWidths)]
return [DelayedTable(td, colWidths=colWidths, style=t_style)]


class HandleFList(NodeHandler):
Expand Down Expand Up @@ -579,8 +579,8 @@ def gather_elements(self, client, node, style):
node.elements = [
DelayedTable(
[[client.PreformattedFit(optext, client.styles["literal"]), desc]],
style=t_style,
colWidths=colWidths,
style=t_style,
)
]
return node.elements
Expand Down Expand Up @@ -690,17 +690,17 @@ def gather_elements(self, client, node, style):
MySpacer(0, sb),
SplitTable(
[[Paragraph(b, style=bStyle), el]],
style=t_style,
colWidths=colWidths,
style=t_style,
),
]
else:
node.elements = [
MySpacer(0, sb),
DelayedTable(
[[Paragraph(b, style=bStyle), el]],
style=t_style,
colWidths=colWidths,
style=t_style,
),
]
return node.elements
Expand Down Expand Up @@ -845,7 +845,7 @@ def gather_elements(self, client, node, style):
cw = [w]
sub_elems = client.gather_elements(node, style=None)
t_style = TableStyle(cmd)
table = DelayedTable([[e] for e in sub_elems], style=t_style, colWidths=cw)
table = DelayedTable([[e] for e in sub_elems], colWidths=cw, style=t_style)
table.hAlign = node.get('align', 'CENTER').upper()
return [
MySpacer(0, style.spaceBefore),
Expand Down Expand Up @@ -920,7 +920,7 @@ def gather_elements(self, client, node, style):
t.append(r)
t_style = TableStyle(client.styles['table'].commands)
colWidths = client.styles['table'].colWidths
return [DelayedTable(t, style=t_style, colWidths=colWidths)]
return [DelayedTable(t, colWidths=colWidths, style=t_style)]


class HandleFootnote(NodeHandler, docutils.nodes.footnote, docutils.nodes.citation):
Expand Down Expand Up @@ -969,7 +969,7 @@ def gather_elements(self, client, node, style):
colWidths = client.styles['endnote'].colWidths
node.elements = [
MySpacer(0, st.spaceBefore),
DelayedTable([[label, contents]], style=t_style, colWidths=colWidths),
DelayedTable([[label, contents]], colWidths=colWidths, style=t_style),
MySpacer(0, st.spaceAfter),
]
if client.real_footnotes:
Expand Down Expand Up @@ -1075,8 +1075,8 @@ def gather_elements(self, client, node, style):
MySpacer(0, st.spaceBefore),
SplitTable(
[['', rows]],
style=t_style,
colWidths=[0, None],
style=t_style,
padding=st.borderPadding,
),
MySpacer(0, st.spaceAfter),
Expand All @@ -1089,7 +1089,7 @@ def gather_elements(self, client, node, style):
t_style.add(*p4)
node.elements = [
MySpacer(0, st.spaceBefore),
DelayedTable([['', rows]], style=t_style, colWidths=[0, None]),
DelayedTable([['', rows]], colWidths=[0, None], style=t_style),
MySpacer(0, st.spaceAfter),
]
return node.elements
Expand Down

0 comments on commit 9bb7e8e

Please sign in to comment.