Skip to content

Commit

Permalink
try this
Browse files Browse the repository at this point in the history
  • Loading branch information
null committed Dec 13, 2023
1 parent b4a16f6 commit c3813d7
Show file tree
Hide file tree
Showing 18 changed files with 1,725 additions and 330 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
cache: npm
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm run build
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/npm-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ jobs:
node-version: ${{ matrix.node-version }}
cache: npm
- run: npm ci
- run: npm test
- run: npm test
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ typst-*.tar.xz
typst-*.zip
bin/typst

# Ignore Typst PDF outputs
test/*.pdf

#region https://github.com/github/gitignore/blob/main/Node.gitignore
# Logs
logs
Expand Down
69 changes: 41 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,15 @@ consider signing up to our [collaborative online editor][app] for free. It is
currently in public beta.

## Example

A [gentle introduction][tutorial] to Typst is available in our documentation.
However, if you want to see the power of Typst encapsulated in one image, here
it is:

<p align="center">
<img alt="Example" width="900" src="https://user-images.githubusercontent.com/17899797/228031796-ced0e452-fcee-4ae9-92da-b9287764ff25.png"/>
</p>


Let's dissect what's going on:

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

```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))),
))
```
```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))),
))
```

</details>

## Installation

Typst's CLI is available from different sources:

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

- 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][repology]
- macOS: `brew install typst`
- Windows: `winget install --id Typst.Typst`
Expand All @@ -130,7 +134,9 @@ Typst's CLI is available from different sources:
`docker run -it ghcr.io/typst/typst:latest`.

## Usage

Once you have installed Typst, you can use it like this:

```sh
# Creates `file.pdf` in working directory.
typst compile file.typ
Expand All @@ -142,13 +148,15 @@ 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
Expand All @@ -161,6 +169,7 @@ TYPST_FONT_PATHS=path/to/fonts typst fonts
```

For other CLI subcommands and options, see below:

```sh
# Prints available subcommands and options.
typst help
Expand All @@ -174,6 +183,7 @@ preview, you can also check out the [Typst web app][app], which is currently in
public beta.

## Community

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

## Contributing

We would 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][contributing].
Expand All @@ -207,10 +218,12 @@ Another good way to contribute is by [sharing packages][packages] with the
community.

## Pronunciation and Spelling

IPA: /taɪpst/. "Ty" like in **Ty**pesetting and "pst" like in Hi**pst**er. 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
Expand Down
26 changes: 0 additions & 26 deletions main.js

This file was deleted.

Loading

0 comments on commit c3813d7

Please sign in to comment.