typst
A new markup-based typesetting system that is powerful and easy to learn.
Science Score: 54.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
6 of 341 committers (1.8%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.0%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
A new markup-based typesetting system that is powerful and easy to learn.
Basic Info
- Host: GitHub
- Owner: typst
- License: apache-2.0
- Language: Rust
- Default Branch: main
- Homepage: https://typst.app
- Size: 128 MB
Statistics
- Stars: 45,234
- Watchers: 119
- Forks: 1,209
- Open Issues: 955
- Releases: 22
Topics
Metadata Files
README.md
Typst is a new markup-based typesetting system that is designed to be as powerful as LaTeX while being much easier to learn and use. Typst has:
- Built-in markup for the most common formatting tasks
- Flexible functions for everything else
- A tightly integrated scripting system
- Math typesetting, bibliography management, and more
- Fast compile times thanks to incremental compilation
- Friendly error messages in case something goes wrong
This repository contains the Typst compiler and its CLI, which is everything you need to compile Typst documents locally. For the best writing experience, consider signing up to our collaborative online editor for free.
Example
A gentle introduction to Typst is available in our documentation. However, if you want to see the power of Typst encapsulated in one image, here it is:
Let's dissect what's going on:
We use set rules to configure element properties like the size of pages or the numbering of headings. By setting the page height to
auto, it scales to fit the content. Set rules accommodate the most common configurations. If you need full control, you can also use show rules to completely redefine the appearance of an element.We insert a heading with the
= Headingsyntax. One equals sign creates a top level heading, two create a subheading and so on. Typst has more lightweight markup like this, see the syntax reference for a full list.Mathematical equations are enclosed in dollar signs. By adding extra spaces around the contents of an equation, we can put it into a separate block. Multi-letter identifiers are interpreted as Typst definitions and functions unless put into quotes. This way, we don't need backslashes for things like
floorandsqrt. Andphi.altapplies thealtmodifier to thephito select a particular symbol variant.Now, we get to some scripting. To input code into a Typst document, we can write a hash followed by an expression. We define two variables and a recursive function to compute the n-th fibonacci number. Then, we display the results in a center-aligned table. The table function takes its cells row-by-row. Therefore, we first pass the formulas
$F_1$to$F_8$and then the computed fibonacci numbers. We apply the spreading operator (..) to both because they are arrays and we want to pass the arrays' items as individual arguments.
Text version of the code example.
```typst #set page(width: 10cm, height: auto) #set heading(numbering: "1.") = Fibonacci sequence The Fibonacci sequence is defined through the recurrence relation $F_n = F_(n-1) + F_(n-2)$. It can also be expressed in _closed form:_ $ F_n = round(1 / sqrt(5) phi.alt^n), quad phi.alt = (1 + sqrt(5)) / 2 $ #let count = 8 #let nums = range(1, count + 1) #let fib(n) = ( if n <= 2 { 1 } else { fib(n - 1) + fib(n - 2) } ) The first #count numbers of the sequence are: #align(center, table( columns: count, ..nums.map(n => $F_#n$), ..nums.map(n => str(fib(n))), )) ```Installation
Typst's CLI is available from different sources:
You can get sources and pre-built binaries for the latest release of Typst from the releases page. Download the archive for your platform and place it in a directory that is in your
PATH. To stay up to date with future releases, you can simply runtypst update.You can install Typst through different package managers. Note that the versions in the package managers might lag behind the latest release.
- Linux:
- View Typst on Repology
- View Typst's Snap
- macOS:
brew install typst - Windows:
winget install --id Typst.Typst
- Linux:
If you have a Rust toolchain installed, you can install
- the latest released Typst version with
cargo install --locked typst-cli - a development version with
cargo install --git https://github.com/typst/typst --locked typst-cli
- the latest released Typst version with
Nix users can
- use the
typstpackage withnix-shell -p typst - build and run a development version with
nix run github:typst/typst -- --version.
- use the
Docker users can run a prebuilt image with
docker run ghcr.io/typst/typst:latest --help.
Usage
Once you have installed Typst, you can use it like this: ```sh
Creates file.pdf in working directory.
typst compile file.typ
Creates PDF file at the desired path.
typst compile path/to/source.typ path/to/output.pdf ```
You can also watch source files and automatically recompile on changes. This is faster than compiling from scratch each time because Typst has incremental compilation. ```sh
Watches source files and recompiles on changes.
typst watch file.typ ```
Typst further allows you to add custom font paths for your project and list all of the fonts it discovered: ```sh
Adds additional directories to search for fonts.
typst compile --font-path path/to/fonts file.typ
Lists all of the discovered fonts in the system and the given directory.
typst fonts --font-path path/to/fonts
Or via environment variable (Linux syntax).
TYPSTFONTPATHS=path/to/fonts typst fonts ```
For other CLI subcommands and options, see below: ```sh
Prints available subcommands and options.
typst help
Prints detailed usage of a subcommand.
typst help watch ```
If you prefer an integrated IDE-like experience with autocompletion and instant preview, you can also check out our free web app. Alternatively, there is a community-created language server called Tinymist which is integrated into various editor extensions.
Community
The main places where the community gathers are our Forum and our Discord server. The Forum is a great place to ask questions, help others, and share cool things you created with Typst. The Discord server is more suitable for quicker questions, discussions about contributing, or just to chat. We'd be happy to see you there!
Typst Universe is where the community shares templates and packages. If you want to share your own creations, you can submit them to our package repository.
If you had a bad experience in our community, please reach out to us.
Contributing
We love to see contributions from the community. If you experience bugs, feel free to open an issue. If you would like to implement a new feature or bug fix, please follow the steps outlined in the contribution guide.
To build Typst yourself, first ensure that you have the latest stable Rust installed. Then, clone this repository and build the CLI with the following commands:
sh
git clone https://github.com/typst/typst
cd typst
cargo build --release
The optimized binary will be stored in target/release/.
Another good way to contribute is by sharing packages with the community.
Pronunciation and Spelling
IPA: /tapst/. "Ty" like in Typesetting and "pst" like in Hipster. When writing about Typst, capitalize its name as a proper noun, with a capital "T".
Design Principles
All of Typst has been designed with three key goals in mind: Power, simplicity, and performance. We think it's time for a system that matches the power of LaTeX, is easy to learn and use, all while being fast enough to realize instant preview. To achieve these goals, we follow three core design principles:
Simplicity through Consistency: If you know how to do one thing in Typst, you should be able to transfer that knowledge to other things. If there are multiple ways to do the same thing, one of them should be at a different level of abstraction than the other. E.g. it's okay that
= Introductionand#heading[Introduction]do the same thing because the former is just syntax sugar for the latter.Power through Composability: There are two ways to make something flexible: Have a knob for everything or have a few knobs that you can combine in many ways. Typst is designed with the second way in mind. We provide systems that you can compose in ways we've never even thought of. TeX is also in the second category, but it's a bit low-level and therefore people use LaTeX instead. But there, we don't really have that much composability. Instead, there's a package for everything (
\usepackage{knob}).Performance through Incrementality: All Typst language features must accommodate for incremental compilation. Luckily we have
comemo, a system for incremental compilation which does most of the hard work in the background.
Acknowledgements
We'd like to thank everyone who is supporting Typst's development, be it via GitHub sponsors or elsewhere. In particular, special thanks[^1] go to:
- Posit for financing a full-time compiler engineer
- NLnet for supporting work on Typst via multiple grants
through the NGI Zero Core fund:
- Work on HTML export
- Work on PDF accessibility
- Science & Startups for having financed Typst development from January through June 2023 via the Berlin Startup Scholarship
- Zerodha for their generous one-time sponsorship
[^1]: This list only includes contributions for our open-source work that exceed or are expected to exceed 10K.
Owner
- Name: Typst
- Login: typst
- Kind: organization
- Email: hello@typst.app
- Location: Berlin
- Website: https://typst.app
- Repositories: 10
- Profile: https://github.com/typst
Compose papers faster: Focus on your text and let Typst take care of layout and formatting.
Citation (CITATION.cff)
cff-version: 1.2.0
title: Typst
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- given-names: Laurenz
family-names: Mädje
email: laurenz.maedje@typst.app
- given-names: Martin
family-names: Haug
email: martin.haug@typst.app
- name: The Typst Project Developers
references:
- title: A Programmable Markup Language for Typesetting
authors:
- family-names: Mädje
given-names: Laurenz
year: 2022
type: thesis
thesis-type: Master's thesis
url: https://laurmaedje.github.io/programmable-markup-language-for-typesetting.pdf
institution:
name: Technische Universität Berlin
- title: Fast typesetting with incremental compilation
authors:
- family-names: Haug
given-names: Martin
year: 2022
type: thesis
thesis-type: Master's thesis
doi: 10.13140/RG.2.2.15606.88642
url: https://doi.org/10.13140/RG.2.2.15606.88642
institution:
name: Technische Universität Berlin
repository-code: 'https://github.com/typst/typst'
url: 'https://typst.app/'
keywords:
- typesetting
- markup language
license: Apache-2.0
Committers
Last synced: 9 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Laurenz | l****e@g****m | 2,155 |
| Martin Haug | m****g@l****e | 184 |
| Leedehai | 1****i | 86 |
| Malo | 5****1 | 76 |
| Sébastien d'Herbais de Thun | s****s@g****m | 71 |
| PgBiel | 9****l | 64 |
| frozolotl | 4****l | 51 |
| bluebear94 | u****i@p****m | 48 |
| Max | me@m****e | 40 |
| Ian Wrzesinski | w****n@u****u | 39 |
| Eric Biedert | g****b@e****e | 34 |
| Yip Coekjan | 6****n | 29 |
| Andrew Voynov | 3****5 | 29 |
| Laurenz Stampfl | 4****V | 19 |
| Alex Saveau | s****e@g****m | 18 |
| tingerrr | me@t****v | 17 |
| Peng Guanwen | p****w@o****m | 16 |
| Wenzhuo Liu | m****t@o****g | 15 |
| Myriad-Dreamin | 3****n | 15 |
| damaxwell | d****l@a****u | 15 |
| dependabot[bot] | 4****] | 13 |
| Marmare314 | 4****4 | 12 |
| figsoda | f****a@p****e | 12 |
| LU Jialin | l****y@g****m | 11 |
| Matt Fellenz | m****t@f****z | 11 |
| sitandr | 6****r | 10 |
| Ana Gelez | a****a@g****z | 10 |
| HarmoGlace | 2****e | 10 |
| Marek Barvíř | b****m@g****m | 10 |
| Tobias Schmitz | t****1@g****m | 9 |
| and 311 more... | ||
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 2,811
- Total pull requests: 2,511
- Average time to close issues: 3 months
- Average time to close pull requests: 10 days
- Total issue authors: 1,348
- Total pull request authors: 352
- Average comments per issue: 2.96
- Average comments per pull request: 2.72
- Merged pull requests: 1,638
- Bot issues: 0
- Bot pull requests: 25
Past Year
- Issues: 1,079
- Pull requests: 1,216
- Average time to close issues: 6 days
- Average time to close pull requests: 9 days
- Issue authors: 605
- Pull request authors: 166
- Average comments per issue: 1.23
- Average comments per pull request: 2.19
- Merged pull requests: 801
- Bot issues: 0
- Bot pull requests: 8
Top Authors
Issue Authors
- Andrew15-5 (138)
- MDLC01 (74)
- Enivex (63)
- EpicEricEE (47)
- PgBiel (37)
- laurmaedje (33)
- tingerrr (31)
- reknih (26)
- emilyyyylime (25)
- Beiri22 (20)
- Mc-Zen (20)
- SUPERCILEX (19)
- Leedehai (17)
- LaurenzV (16)
- user202729 (16)
Pull Request Authors
- laurmaedje (501)
- MDLC01 (154)
- Leedehai (123)
- mkorje (95)
- PgBiel (93)
- bluebear94 (87)
- Andrew15-5 (83)
- frozolotl (74)
- Dherse (65)
- EpicEricEE (47)
- wrzian (46)
- Coekjan (46)
- Myriad-Dreamin (29)
- tingerrr (26)
- dependabot[bot] (25)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- Swatinem/rust-cache v2 composite
- actions/checkout v3 composite
- dtolnay/rust-toolchain stable composite
- actions/checkout v3 composite
- docker/build-push-action v4.0.0 composite
- docker/login-action v2.1.0 composite
- docker/metadata-action v4.3.0 composite
- docker/setup-buildx-action v2.5.0 composite
- actions/checkout v3 composite
- actions/upload-release-asset v1.0.2 composite
- dtolnay/rust-toolchain stable composite
- 223 dependencies
- alpine latest build
- rust alpine build
- @types/node ^12.11.7 development
- @types/vscode ^1.53.0 development