quarto-dev / quarto-dev/quarto-cli

[Typst] Add Code Filename support

Open
#9,768 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

code-blocks enhancement typst
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Description

Discussed in https://github.com/quarto-dev/quarto-cli/discussions/9627

Originally posted by MathisC22 May 9, 2024

Description

File names of code cell blocks are not shown when using Typst as backend, whereas they do show when you use LaTeX or HTML to render the file. That is, the following cell only shows the contents:

```{.python filename="matplotlib.py"}
import matplotlib.pyplot as plt
plt.plot([1,23,2,4])
plt.show()
```

Would be really neat if it would also work with Typst!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing discussion #9627 and reproduce the shown code cell with the Typst backend. Compare the existing filename behavior in the LaTeX and HTML outputs, then identify the Typst rendering entry point. Done means the filename, such as matplotlib.py, is displayed for Typst code cells as it is for the other backends.

Written by the indexing model from the issue text.

Assessment

Domain
backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.