typst / typst/typst

Allow line numbering in floating text

Open
#6,322 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request layout
Dominant language
Rust
Stars
56.1k
Forks
1.7k
Avg merge
3d 10h
Merged PRs (30d)
22

Description

Description

See here for initial discussion on the Typst Forum. I'd like to enable line numbering inside e.g. a place environment, that continues the same numbering as the rest of the text.

Use Case

As an example, here is part of a template for a 2-column paper, with a floating title/abstract section.

#place(
    top + center,
    scope: "parent",
    float: true,
)[
    #text(size: 15pt, weight: "bold", title)

    = Abstract
    #box(width: 90%)[#par(justify: true)[#abstract]]
]

Where simply adding #set par.line(numbering: "1") before the title doesn’t work.

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 with the place environment example and the par.line(numbering: "1") entry point, then review the linked Typst Forum discussion for the intended behavior. Done means line numbering works inside a floating place and continues from the surrounding text.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.