This is based off a question asked on the forum here, but my question is instead: should I post a feature request for this? (Based on this question.)
A feature request for a line stroke that produces a double line.
- Because to draw double lines in tables, we need to use multiple rows
- But then the double line can not be above the
table.header
- But then the double line can not be above the
- Because drawing double lines with a tiling makes the line too wide, see below
Picture: this is pretty good, there is a double line above the table.header
drawn with a tiling. But because of stroke width (of the tiling, not of the lines), it juts out wider than the regular table.hline
#let dhpat(sep, stroke) = tiling(
size: (10pt, (sep + std.stroke(stroke).thickness) * 10),
{
let t = std.stroke(stroke).thickness / 2 + 0.1pt
let theline = line(length: 10pt, stroke: stroke)
place(dy: t, theline)
place(dy: t + sep, theline)
}
)
// problem: the top double line is longer than the table.hlines()
#set table.hline(stroke: 0.08em)
#table(
columns: 2,
stroke: (x, y) => 0pt,
align: (left, center),
table.hline(stroke: (thickness: 6pt, paint: dhpat(2pt, 0.8pt), cap: "butt")),
table.header([Mach range], [Flow physics]),
table.hline(),
$M_p <= 0.1$, [Incompressible],
$0.1 <= M_p <= 0.65$, [Compressible],
table.hline(),
table.cell(colspan: 2, inset: 0.12em, {}),
table.hline(),
)