Hi Andreas, I would like to extend my heartfelt thanks to the Lovelace package, which has been instrumental in completing my master thesis.
I noticed a small issue that It does not make full use of 100% page width. For example, when I use #h(1fr), it still exists a gap with the edge of the page.
#block(
fill: luma(230),
[#lorem(30) #h(1fr)],
)
#line(length: 100%)
#figure(
kind: "algorithm",
supplement: [Algorithm],
pseudocode-list(booktabs: true, numbered-title: [My cool algorithm #h(1fr)],
indentation: 1em,
stroke: none,
)[
+ do something
+ do something else
+ *while* still something to do
+ do even more
+ *if* not done yet *then*
+ wait a bit
+ resume working
+ *else*
+ go home
+ *end*
+ *end*
]
)
I find it is affected by the parameter indentation . When indentation is 0em, there is no gap, but the code indents become weird.
When indentation is a non-zero value, the algorithm width is affected.
2em:
5em:
I have fixed this issue and added a parameter code-offset to specify the gap between the line numbers and the code. The width is not affected by the parameter indentation and that the code is indented correctly.
#block(
fill: luma(230),
[#lorem(30) #h(1fr)],
)
#line(length: 100%)
#figure(
kind: "algorithm",
supplement: [Algorithm],
pseudocode-list(booktabs: true, numbered-title: [My cool algorithm #h(1fr)],
indentation: 1em,
code-offset: .5em,
stroke: none,
)[
+ do something
+ do something else
+ *while* still something to do
+ do even more
+ *if* not done yet *then*
+ wait a bit
+ resume working
+ *else*
+ go home
+ *end*
+ *end*
]
)
indentation is set to 2em:
code-offset is set to 2em:
I'm a typst beginner, please feel free to give me advice.
Hi Andreas, I would like to extend my heartfelt thanks to the Lovelace package, which has been instrumental in completing my master thesis.
I noticed a small issue that It does not make full use of 100% page width. For example, when I use
#h(1fr)
, it still exists a gap with the edge of the page.I find it is affected by the parameter
indentation
. Whenindentation
is0em
, there is no gap, but the code indents become weird.When
indentation
is a non-zero value, the algorithm width is affected.2em:
5em:
I have fixed this issue and added a parameter
code-offset
to specify the gap between the line numbers and the code. The width is not affected by the parameterindentation
and that the code is indented correctly.indentation
is set to2em
:code-offset
is set to2em
:I'm a typst beginner, please feel free to give me advice.