Skip to content

Commit

Permalink
Bump to 0.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
jneug committed Jul 31, 2023
1 parent eff27a8 commit 2c12da8
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Mantys (v0.0.2)
# Mantys (v0.0.3)

> **MAN**uals for **TY**p**S**t
Expand All @@ -8,18 +8,18 @@ Template for documenting [typst](https://github.com/typst/typst) packages and te

Mantys supports **Typst 0.6.0** and newer.

Download the [latest version](https://github.com/jneug/typst-mantys/releases/tag/v0.0.2) and unpack it into the [system dependent local package repository](https://github.com/typst/packages#local-packages).
Download the [latest version](https://github.com/jneug/typst-mantys/releases/tag/v0.0.3) and unpack it into the [system dependent local package repository](https://github.com/typst/packages#local-packages).

In your local repository type:
```shell
wget https://github.com/jneug/typst-mantys/archive/refs/tags/v0.0.2.tar.gz
mkdir mantys-0.0.2
tar -xzf v0.0.2.tar.gz -C mantys-0.0.2
wget https://github.com/jneug/typst-mantys/archive/refs/tags/v0.0.3.tar.gz
mkdir mantys-0.0.3
tar -xzf v0.0.3.tar.gz -C mantys-0.0.3
```

Now import the package at the beginning of your manual document:
```js
#import "@local/mantys:0.0.2": *
#import "@local/mantys:0.0.3": *
```

To use **Mantys** as a local module for one project only, download the package and unpack into a folder inside your project (e.g. `/mantys`). Then import `mantys/mantys.typ`:
Expand All @@ -43,7 +43,7 @@ The only one currently waiting for approval is [jneug/typst-tools4typst](jneug/t
A basic template for a manual could look like this:

```js
#import "@local/mantys:0.0.2": *
#import "@local/mantys:0.0.3": *

#show: mantys.with(
name: "your-package-name",
Expand Down
Binary file modified manual.pdf
Binary file not shown.
16 changes: 8 additions & 8 deletions manual.typ
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
info: [A Typst template to create consistens and readable manuals for packages and templates.],
authors: ((name: "Jonas Neugebauer", email:"github@neugebauer.cc"),),
url: "https://github.com/jneug/typst-mantys",
version: "0.0.2",
version: "0.0.3",
date: datetime.today(),
abstract: [
#package[Mantys] is a Typst template to help package and template authors to write manuals. It provides functionality for consistent formatting of commands, variables, options and source code examples. The template automatically creates a table of contents and a commanc index for easy reference and navigation.
Expand Down Expand Up @@ -82,13 +82,13 @@ Currently the package needs to be installed into the local package repository.
Either download the current release from GitHub#footnote[#link("https://github.com/jneug/typst-typopts/releases/latest")] and unpack the archive into your system dependent local repository folder#footnote(link("https://github.com/typst/packages#local-packages")) or clone it directly:

#codesnippet[```shell-unix-generic
git clone https://github.com/jneug/typst-mantys.git mantys-0.0.2
git clone https://github.com/jneug/typst-mantys.git mantys-0.0.3
```]

After installing the package just import it inside your `typ` file:

#codesnippet[```typ
#import "@local/mantys:0.0.2": *
#import "@local/mantys:0.0.3": *
```]

=== Loading as a module
Expand Down Expand Up @@ -131,7 +131,7 @@ After importing Mantys the template is initialized by applying a show rule with

```typc
example-imports: (
"@local/mantys:0.0.2": "*",
"@local/mantys:0.0.3": "*",
"@preview/tablex:0.0.1": "",
"@preview/cetz:0.0.1": "canvas"
)
Expand Down Expand Up @@ -275,7 +275,7 @@ Use any #emph[Typst] code here.
The result will be generated using #doc("foundations/eval") and thus is subject to its limitations. Each `eval` call is run in a local scope and does not have access to previously imported commands. To use your packages commands, you have to import it as a package:

#example(raw("#example[```
#import \"@local/mantys:0.0.2\": dtype
#import \"@local/mantys:0.0.3\": dtype
#dtype(false)
```]"))
Expand All @@ -284,7 +284,7 @@ The result will be generated using #doc("foundations/eval") and thus is subject
You can only import packages and not local files.
]

To automatically add imports to every example code, you can set the option #opt[example-imports] at the initial call to #cmd[mantys]. For example this manual was compiled with #arg(example-imports: ("@local/mantys:0.0.2": "*")). This imports the Mantys commands into all example code, without explicitly importing it in the code.
To automatically add imports to every example code, you can set the option #opt[example-imports] at the initial call to #cmd[mantys]. For example this manual was compiled with #arg(example-imports: ("@local/mantys:0.0.3": "*")). This imports the Mantys commands into all example code, without explicitly importing it in the code.

#example(raw("#example[```
#mty.value(false)
Expand All @@ -295,7 +295,7 @@ See #refrel(<cmd-example>) for how to use the #cmd-[example] command.
#ibox[
To use fenced code blocks in your example, add an extra backtick to the example code:

#example(imports:("@local/mantys:0.0.2": "example"), raw("#example[````
#example(imports:("@local/mantys:0.0.3": "example"), raw("#example[````
```rust
fn main() {
println!(\"Hello World!\");
Expand Down Expand Up @@ -493,7 +493,7 @@ The commands provide some helpful low-level functionality, that might be useful
```
]
#command("date", arg[d], ret: "content")[
#side-by-side(imports:("@local/mantys:0.0.2":"mty"))[
#side-by-side(imports:("@local/mantys:0.0.3":"mty"))[
```
- #mty.date("2023-07-15")
- #mty.date(datetime(year:2023, month:7, day:15))
Expand Down
2 changes: 1 addition & 1 deletion tbump.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
github_url = "https://github.com/jneug/typst-mantys/"

[version]
current = "0.0.2"
current = "0.0.3"

# Example of a semver regexp.
# Make sure this matches current_version before
Expand Down
2 changes: 1 addition & 1 deletion typst.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "mantys"
version = "0.0.2"
version = "0.0.3"
entrypoint = "mantys.typ"
authors = ["J. Neugebauer"]
license = "MIT"
Expand Down

0 comments on commit 2c12da8

Please sign in to comment.