Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobjpeters committed Oct 30, 2023
1 parent eeb93bc commit 742eaf8
Showing 1 changed file with 47 additions and 12 deletions.
59 changes: 47 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,32 +17,67 @@

# Typstry.jl

## Introduction
A package to access the Typst command-line interface.

A package to access the `Typst` command-line interface.
See also their [website](https://typst.app/),
[documentation](https://typst.app/docs/),
and [repository](https://github.com/typst/typst).

## Showcase
## Features

- Macros to construct Typst strings and commands
- Functions to construct and render documents

### Planned

- Convert Julia values to Typst strings
- Explore rendering
- Unicode in the REPL?
- Other environments?

## Installation

```julia
julia> using Pkg: add

julia> add(url = "https://github.com/jakobjpeters/Typstry.jl")

julia> using Typstry
```

julia> file_name = "example.typ"

julia> write(file_name, "Typst is cool")
## Showcase

julia> compile(file_name)
```
julia> document = typst"""
#set page(width: 10cm, height: auto)
#set heading(numbering: "1.")
## Planned features
= Fibonacci sequence
The Fibonacci sequence is defined through the recurrance relation
$F_n = F_(n-1) + F_(n-2)$. It can also be expressed in _closed form:_
- Convert Julia values to Typst strings
- Explore rendering
- Unicode in the REPL?
- Other environments?
$ 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))),
))
""";
julia> render(document);
```

![Showcase document](./assets/showcase.png)

## Related Projects

Expand Down

0 comments on commit 742eaf8

Please sign in to comment.