In the text, the @table_1 call return an error. I could put the rotate in #figure instead, but the table is large and by doing that the caption is rejected on the next page (and therefore not in the same direction as the figure).
You are currently attaching the label to the rotate function instead of the figure. Thus, when you later reference that label, Typst does not know that you wanted to reference the figure.
The syntax you use to attach the label to the figure with <table_1> only works if you are in markup mode. You can read more about the different modes here, but the most important thing is that you leave markup mode and enter into code mode when you use the # character, as you did in #rotate(...). This means that you can not do something like
// This does not work!
#rotate(-90deg, reflow: true,
figure(
caption: [...],
table(...)
) <table_1>
)
as you are in code mode when you put the figure into the argument of the rotate function. What you can instead do, is to use a content block as the argument, as you then are back in markup mode:
As an unrelated note, you don’t need to explicitly specify the kind: table when the body of the figure is a table, as Typst is smart enough to detect that automatically.
Hey @fdekerm! Welcome to the forum. I’ve updated your post, as well as Heading style for specific section, to use ```typ at the start of Typst code blocks (instead of just ```) to ensure the code is properly highlighted as Typst code. Make sure to keep this in mind for future posts, as it turns your code more readable