-
First of all, thank you for your work (and other contributors) on this library. I just started to learn Typst recently, and currently I am in the middle of writing my thesis using Typst and found this library which helps me a lot. I would like to nest colspanx and rowspanx. However, I encountered error. #tablex(
columns: (2fr, 1fr, 2fr, 1fr),
colspanx(4)(rowspanx(2)[a]),
) I followed the example here. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hello, Within Typst's syntax, you can write either Therefore, what you meant to write is |
Beta Was this translation helpful? Give feedback.
Hello,
Within Typst's syntax, you can write either
function(a, b)
,function(a, [b])
orfunction(a)[b]
(the last one being a shorthand for the previous one).function(a)(b)
would first callfunction(a)
and then attempt to call its result as a function with the parameterb
. Here, thus, you are callingcolspanx(4)
(which fails because it requires content) and then trying to call its result as a function with the single argumentrowspanx(2)[a]
.Therefore, what you meant to write is
colspanx(4, rowspanx(2)[a])
. Hope this helps!