How do I reference plain text with tags to be used later in the document?

Good day!

I’ve been using Typst for the past couple weeks for creating template reports and have been loving it since!

I’m trying to tackle a scenario where I have a text listed in a table, and I want that exact text to be referenced below, perhaps as a heading or text. Below is an example code of what I am trying to achieve.

The below @tab:SimulationsPerformed describes the scenarios run as per the requirements:
#figure(
  caption: "Simulations performed",
  table(
    columns:(15%,35%,50%), 
    table.header([*CASE*],[*VALUES*],[*REMARKS*]),
    [A.1 <0.9Case>],[0.9],[All units in operation],
    [A.2],[1],[All units in operation],
    [A.3],[1.1],[All units in operation],
    )
  )<tab:SimulationsPerformed>

As per @0.9Case, blah blah blah.
Or I want a heading from the referenced text.
=== @0.9Case

Hope you case see here from the example that, I want the text “A.1” to be referenceable as text or to be part of a heading.
Currently with the above example, I’m getting an error at the referencing point as “cannot reference text”.

I’ve checked the Typst documentation and it seems like only headings, equations, etc. can be referenced, and that too by the heading/eqn. number?

I would appreciate any inputs to help out here.

Thank you in advance!

1 Like

Hi @YellowSeas, could you maybe try to revise your post’s title to be a complete question as per the question guidelines:

Good titles are questions you would ask your friend about Typst.

We hope by adhering to this, we make the information in this forum easy to find in the future. Thanks!

1 Like