Skip to content

Commit

Permalink
add flake.nix and make docs more explicit
Browse files Browse the repository at this point in the history
  • Loading branch information
slashformotion committed Jun 9, 2024
1 parent 3972206 commit 94e836b
Show file tree
Hide file tree
Showing 5 changed files with 101 additions and 3 deletions.
Binary file modified docs/main.pdf
Binary file not shown.
10 changes: 8 additions & 2 deletions docs/main.typ
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,13 @@
#let entries = __normalize_entry_list(entry-list)
#let groups = entries.map(x => x.at("group")).dedup()

#align(center)[`glossarium@`#glossarium_version]
#align(center, heading([`glossarium@`#glossarium_version], level: 1, numbering: none))\

#text(fill: red.darken(10%), size: 11pt, font: "Iosevka Extrabold Extended")[
This document outline how to change the default behaviour of `glossarium` by
implementing "user functions". It is recommended to keep the default implementation and not to change the default behaviour of the package.

If you have a need that require to change the defaults, you are expected to be knowledgeable in writing complex typst code and to try to debug your issues first on you own. Be aware that helping regular users and fixing bugs will take priority over helping you debug your own implementation of `glossarium` internal functions.]

#outline(indent: 1em)

Expand Down Expand Up @@ -446,4 +452,4 @@ See the default style in @sssec:default-style.
entry-list,
show-all: true,
)
]
]
61 changes: 61 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 28 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
description = "dev stuff for glossarium";

inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};

outputs = {
self,
nixpkgs,
flake-utils,
}:
flake-utils.lib.eachDefaultSystem
(
system: let
pkgs = nixpkgs.legacyPackages.${system};
in {
devShell = pkgs.mkShell {
buildInputs = with pkgs; [
typst
just
zathura
];
};
}
);
}
5 changes: 4 additions & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,7 @@ fmt:

# benchmark using hyperfine
benchmark:
hyperfine --warmup 10 --prepare 'find examples/**/*.pdf -delete' --export-markdown {{benchmark_file}} {{benchmark_commands}}
hyperfine --warmup 10 --prepare 'find examples/**/*.pdf -delete' --export-markdown {{benchmark_file}} {{benchmark_commands}}

docs:
typst compile docs/main.typ --root .

0 comments on commit 94e836b

Please sign in to comment.