minor changes to manual for universe publication

This commit is contained in:
Louis Heredero 2024-12-23 18:03:54 +01:00
parent 942cb214c1
commit 16e41ea259
Signed by: HEL
GPG Key ID: 8D83DE470F8544E7
2 changed files with 42 additions and 5 deletions

Binary file not shown.

View File

@ -1,7 +1,5 @@
#import "@preview/tidy:0.4.0"
#import "src/lib.typ"
#import "gallery/readme_banner.typ" as banner
#set document(
@ -19,6 +17,25 @@
}
}
)
#set heading(numbering: (..num) => if num.pos().len() < 4 {
numbering("1.1", ..num)
})
#let code-block(code) = {
let txt = code.text
txt = txt.replace("$version", str(lib.version))
return box(
raw(
txt,
lang: code.lang,
block: true
),
fill: luma(95%),
inset: 1em,
radius: 0.5em,
stroke: luma(80%) + 0.5pt
)
}
#align(center)[
#v(1cm)
@ -52,13 +69,33 @@
inset: 1em,
outline(
indent: 1em,
target: heading.where(level: 2)
depth: 2
)
)
#pagebreak(weak: true)
= Introduction
This package provides several common hashing algorithms and other related functions. All functions are directly available in the package's namespace (i.e. no need to import sub-modules).
To use it, you can simply import the package as a whole:\
#pad(left: 1em, code-block(```typ
#import "@preview/jumble:$version"
...
#jumble.md5(msg)
```))
or import specific functions (or all):\
#pad(left: 1em, code-block(```typ
#import "@preview/jumble:$version": md5
...
#md5(msg)
```))
#pagebreak(weak: true)
= Reference
#let mod = tidy.parse-module.with(
scope: (jumble: lib),
preamble: "#import jumble: *;"
@ -66,7 +103,7 @@
#let sha-doc = mod(
read("src/sha.typ"),
name: "sha"
name: "SHA"
)
#tidy.show-module(sha-doc)
@ -74,7 +111,7 @@
#let md-doc = mod(
read("src/md.typ"),
name: "md"
name: "MD"
)
#tidy.show-module(md-doc)