Skip to content

Commit

Permalink
Fix documentation build
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobjpeters committed Oct 30, 2023
1 parent d22081e commit eeb93bc
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 19 deletions.
1 change: 0 additions & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ makedocs(
"Home" => "index.md",
"Manual" => "manual.md"
],
strict = true
)

deploydocs(
Expand Down
Binary file added docs/src/assets/showcase.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
59 changes: 48 additions & 11 deletions docs/src/index.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,67 @@

# Typstry.jl

A package to access the `Typst` command-line interface.
A package to access the Typst command-line interface.

## Showcase
See also their [website](https://typst.app/),
[documentation](https://typst.app/docs/),
and [repository](https://github.com/typst/typst).

## 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
14 changes: 7 additions & 7 deletions docs/src/manual.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@

# Manual

## Typst Command-Line Interface
## Interface

```@docs
@typst_str
@typst_cmd
typst
compile
watch
fonts
help
render
```

## Utility
## Internals

```@docs
@typst_str
Typstry.interpolate
Typstry.typst_cmd
```

0 comments on commit eeb93bc

Please sign in to comment.