Passing color to the augment line in matrix (#2281)

This commit is contained in:
LU Jialin 2023-10-02 22:22:33 +08:00 committed by GitHub
parent 07e3fde54c
commit 34ebbaeb10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 0 deletions

View File

@ -378,6 +378,7 @@ fn layout_mat_body(
let default_stroke_thickness = DEFAULT_STROKE_THICKNESS.scaled(ctx);
let default_stroke = FixedStroke {
thickness: default_stroke_thickness,
paint: TextElem::fill_in(ctx.styles()),
line_cap: LineCap::Square,
..Default::default()
};

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -0,0 +1,9 @@
// https://github.com/typst/typst/issues/2268
// The augment line should be of the same color as the text
#set text(
font: "New Computer Modern",
lang: "en",
fill: yellow,
)
$mat(augment: #1, M, v) arrow.r.squiggly mat(augment: #1, R, b)$