Skip to content

Commit c3813d7

Browse files
author
null
committed
try this
1 parent b4a16f6 commit c3813d7

File tree

18 files changed

+1725
-330
lines changed

18 files changed

+1725
-330
lines changed

.github/workflows/npm-publish.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
cache: npm
1616
registry-url: https://registry.npmjs.org/
1717
- run: npm ci
18+
- run: npm run build
1819
- run: npm publish
1920
env:
20-
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
21+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/npm-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ jobs:
3636
node-version: ${{ matrix.node-version }}
3737
cache: npm
3838
- run: npm ci
39-
- run: npm test
39+
- run: npm test

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ typst-*.tar.xz
33
typst-*.zip
44
bin/typst
55

6+
# Ignore Typst PDF outputs
7+
test/*.pdf
8+
69
#region https://github.com/github/gitignore/blob/main/Node.gitignore
710
# Logs
811
logs

README.md

Lines changed: 41 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,15 @@ consider signing up to our [collaborative online editor][app] for free. It is
3636
currently in public beta.
3737

3838
## Example
39+
3940
A [gentle introduction][tutorial] to Typst is available in our documentation.
4041
However, if you want to see the power of Typst encapsulated in one image, here
4142
it is:
43+
4244
<p align="center">
4345
<img alt="Example" width="900" src="https://user-images.githubusercontent.com/17899797/228031796-ced0e452-fcee-4ae9-92da-b9287764ff25.png"/>
4446
</p>
4547

46-
4748
Let's dissect what's going on:
4849

4950
- We use _set rules_ to configure element properties like the size of pages or
@@ -75,36 +76,38 @@ Let's dissect what's going on:
7576
<details>
7677
<summary>Text version of the code example.</summary>
7778

78-
```typst
79-
#set page(width: 10cm, height: auto)
80-
#set heading(numbering: "1.")
81-
82-
= Fibonacci sequence
83-
The Fibonacci sequence is defined through the
84-
recurrence relation $F_n = F_(n-1) + F_(n-2)$.
85-
It can also be expressed in _closed form:_
86-
87-
$ F_n = round(1 / sqrt(5) phi.alt^n), quad
88-
phi.alt = (1 + sqrt(5)) / 2 $
89-
90-
#let count = 8
91-
#let nums = range(1, count + 1)
92-
#let fib(n) = (
93-
if n <= 2 { 1 }
94-
else { fib(n - 1) + fib(n - 2) }
95-
)
96-
97-
The first #count numbers of the sequence are:
98-
99-
#align(center, table(
100-
columns: count,
101-
..nums.map(n => $F_#n$),
102-
..nums.map(n => str(fib(n))),
103-
))
104-
```
79+
```typst
80+
#set page(width: 10cm, height: auto)
81+
#set heading(numbering: "1.")
82+
83+
= Fibonacci sequence
84+
The Fibonacci sequence is defined through the
85+
recurrence relation $F_n = F_(n-1) + F_(n-2)$.
86+
It can also be expressed in _closed form:_
87+
88+
$ F_n = round(1 / sqrt(5) phi.alt^n), quad
89+
phi.alt = (1 + sqrt(5)) / 2 $
90+
91+
#let count = 8
92+
#let nums = range(1, count + 1)
93+
#let fib(n) = (
94+
if n <= 2 { 1 }
95+
else { fib(n - 1) + fib(n - 2) }
96+
)
97+
98+
The first #count numbers of the sequence are:
99+
100+
#align(center, table(
101+
columns: count,
102+
..nums.map(n => $F_#n$),
103+
..nums.map(n => str(fib(n))),
104+
))
105+
```
106+
105107
</details>
106108

107109
## Installation
110+
108111
Typst's CLI is available from different sources:
109112

110113
- You can get sources and pre-built binaries for the latest release of Typst
@@ -114,6 +117,7 @@ Typst's CLI is available from different sources:
114117

115118
- You can install Typst through different package managers. Note that the
116119
versions in the package managers might lag behind the latest release.
120+
117121
- Linux: View [Typst on Repology][repology]
118122
- macOS: `brew install typst`
119123
- Windows: `winget install --id Typst.Typst`
@@ -130,7 +134,9 @@ Typst's CLI is available from different sources:
130134
`docker run -it ghcr.io/typst/typst:latest`.
131135

132136
## Usage
137+
133138
Once you have installed Typst, you can use it like this:
139+
134140
```sh
135141
# Creates `file.pdf` in working directory.
136142
typst compile file.typ
@@ -142,13 +148,15 @@ typst compile path/to/source.typ path/to/output.pdf
142148
You can also watch source files and automatically recompile on changes. This is
143149
faster than compiling from scratch each time because Typst has incremental
144150
compilation.
151+
145152
```sh
146153
# Watches source files and recompiles on changes.
147154
typst watch file.typ
148155
```
149156

150157
Typst further allows you to add custom font paths for your project and list all
151158
of the fonts it discovered:
159+
152160
```sh
153161
# Adds additional directories to search for fonts.
154162
typst compile --font-path path/to/fonts file.typ
@@ -161,6 +169,7 @@ TYPST_FONT_PATHS=path/to/fonts typst fonts
161169
```
162170

163171
For other CLI subcommands and options, see below:
172+
164173
```sh
165174
# Prints available subcommands and options.
166175
typst help
@@ -174,6 +183,7 @@ preview, you can also check out the [Typst web app][app], which is currently in
174183
public beta.
175184

176185
## Community
186+
177187
The main place where the community gathers is our [Discord server][discord].
178188
Feel free to join there to ask questions, help out others, share cool things
179189
you created with Typst, or just to chat.
@@ -187,6 +197,7 @@ the community:
187197
If you had a bad experience in our community, please [reach out to us][contact].
188198

189199
## Contributing
200+
190201
We would love to see contributions from the community. If you experience bugs,
191202
feel free to open an issue. If you would like to implement a new feature or bug
192203
fix, please follow the steps outlined in the [contribution guide][contributing].
@@ -207,10 +218,12 @@ Another good way to contribute is by [sharing packages][packages] with the
207218
community.
208219

209220
## Pronunciation and Spelling
221+
210222
IPA: /taɪpst/. "Ty" like in **Ty**pesetting and "pst" like in Hi**pst**er. When
211223
writing about Typst, capitalize its name as a proper noun, with a capital "T".
212224

213225
## Design Principles
226+
214227
All of Typst has been designed with three key goals in mind: Power,
215228
simplicity, and performance. We think it's time for a system that matches the
216229
power of LaTeX, is easy to learn and use, all while being fast enough to realize

main.js

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)