typst / typst/typst

Allow specifying output directory (not filename)

Open
#7,993 1 comment 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Description

I'd like a command line switch to set the output directory, and have the filename be the same that would normally be generated automatically (so x.typ becomes x.pdf).

Use Case

Currently I have to type the filename twice if I want to output to a different directory. This is annoying and error prone. If I'm working with multiple .typ files, I have to remember to keep changing both filenames when I'm compiling a different file. Writing a script or a Makefile to handle this for me (which I might want to do to set other options like a font directory) is more annoying than it should be, because I have to manually parse the input filename to remove the extension and add .pdf from within the script.

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 tracing the command-line handling for output paths and the existing automatic filename generation. Add an output-directory option that preserves that generated filename, then verify that compiling one or more .typ inputs places the resulting PDFs in the requested directory without requiring a filename.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
62/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.