Skip to content

Add Typst/LaTeX comment for code-annotation #13615

Closed

Description

@mcanouil

Currently Quarto does not support the proper comment syntax for Typst and LaTex block.
This means you need to write for Typst:

```{.typst filename="typst-template.typ"}
#let article(title: none, authors: none, body) = {
  set page(paper: "a4", margin: 2.5cm) # <1>

  set text(font: "Inter", size: 11pt) # <2>

  if title != none { # <3>
    align(center, text(weight: "bold", 1.5em, title)) # <3>
  } # <3>

  body # <4>
}
```

1. Page setup.
2. Typography settings.
3. Conditional title block.
4. Main content insertion.

where is should be:

```{.typst filename="typst-template.typ"}
#let article(title: none, authors: none, body) = {
  set page(paper: "a4", margin: 2.5cm) // <1>

  set text(font: "Inter", size: 11pt) // <2>

  if title != none { // <3>
    align(center, text(weight: "bold", 1.5em, title)) // <3>
  } // <3>

  body // <4>
}
```

1. Page setup.
2. Typography settings.
3. Conditional title block.
4. Main content insertion.

It would be great for teaching purposes if Quarto could use the correct comment symbol.

Note that .typ and .typst can be use. Similar for LaTeX code blocks.

Typst: //
LaTeX: %

Activity

  1. self-assigned this
    on Oct 27, 2025
  2. added this to the v1.9 milestone on Oct 27, 2025
  3. mcanouil commented on Feb 1, 2026

    @mcanouil
    CollaboratorAuthor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

code-annotationenhancement

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions