Draw booktabs rules with their own weights and spans
This commit is contained in:
1 parent
d0ffeea94b
commit
c3e75bd244
5 files changed
+267
-7
No files matched your search
@@ -273,6 +273,15 @@ impl Halign {
|
||||
};
|
||||
let mut y = 0_i64;
|
||||
for (row_index, row) in self.rows.iter().enumerate() {
|
||||
for rule in self.rules.iter().filter(|rule| rule.row == row_index) {
|
||||
let (x, width) = self.rule_rect(rule);
|
||||
list.push(DisplayItem::Rule {
|
||||
x,
|
||||
y,
|
||||
width,
|
||||
height: rule.width,
|
||||
});
|
||||
}
|
||||
if row.rule {
|
||||
let height = 26_214; // 0.4pt in scaled points.
|
||||
list.push(DisplayItem::Rule {
|
||||
@@ -319,6 +328,15 @@ impl Halign {
|
||||
}
|
||||
y += row_height;
|
||||
}
|
||||
for rule in self.rules.iter().filter(|rule| rule.row == self.rows.len()) {
|
||||
let (x, width) = self.rule_rect(rule);
|
||||
list.push(DisplayItem::Rule {
|
||||
x,
|
||||
y,
|
||||
width,
|
||||
height: rule.width,
|
||||
});
|
||||
}
|
||||
list
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user