In Latex, a three-line table can be created by \toprule, \midrule and \bottomrule. Is there any similar solution in Typst?
1 Like
Sure. If you look at the documentation of the booktab
package for LaTeX, you will find these two lengths:
\heavyrulewidth=.08em
\lightrulewidth=.05em
So we can use them to mimic the booktab
look, like this:
#import "@preview/metalogo:1.0.2": TeX, LaTeX
#set table(stroke: none)
#let toprule = table.hline(stroke: 0.08em)
#let bottomrule = toprule
#let midrule = table.hline(stroke: 0.05em)
#table(
columns: 2,
toprule,
table.header(
[Name],
[Made public]
),
midrule,
[Typst], [2023],
LaTeX, [1984],
TeX, [1978],
bottomrule
)
1 Like
Thank you very much!