Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentarelbundock committed Oct 26, 2024
1 parent 442a0ba commit 600a76a
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions inst/templates/typst.typ
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,16 @@ block[ // start block
let tmp = it
for style in style-array {
let m = style.pairs.find(k => k.at(0) == it.x and k.at(1) == it.y)
if ("fontsize" in style) { tmp = text(size: style.fontsize, tmp) }
if ("color" in style) { tmp = text(fill: style.color, tmp) }
if ("indent" in style) { tmp = pad(left: style.indent, tmp) }
if ("underline" in style) { tmp = underline(tmp) }
if ("italic" in style) { tmp = emph(tmp) }
if ("bold" in style) { tmp = strong(tmp) }
if ("mono" in style) { tmp = math.mono(tmp) }
if ("strikeout" in style) { tmp = strike(tmp) }
if m != none {
if ("fontsize" in style) { tmp = text(size: style.fontsize, tmp) }
if ("color" in style) { tmp = text(fill: style.color, tmp) }
if ("indent" in style) { tmp = pad(left: style.indent, tmp) }
if ("underline" in style) { tmp = underline(tmp) }
if ("italic" in style) { tmp = emph(tmp) }
if ("bold" in style) { tmp = strong(tmp) }
if ("mono" in style) { tmp = math.mono(tmp) }
if ("strikeout" in style) { tmp = strike(tmp) }
}
}
tmp
}
Expand Down

0 comments on commit 600a76a

Please sign in to comment.