scaffolding in place for properties.pdf

This commit is contained in:
Quinn Dougherty 2022-04-12 17:22:11 -04:00
parent 1092550c89
commit ecfd8deece
3 changed files with 49 additions and 0 deletions

View File

@ -19,3 +19,4 @@ yarn-error.log
dist
*.coverage
_coverage
result

View File

@ -0,0 +1,15 @@
# Properties
Using `nix`. Where `o` is `open` on OSX and `xdg-open` on linux,
```sh
nix-build
o result/properties.pdf
```
Without `nix`, you can install `pandoc` yourself and run
```sh
pandoc --from markdown --to latex --out properties.pdf --pdf-engine xelatex properties.md
```
## _Details_
The `properties.pdf` document is _normative and aspirational_. It does not document tests as they exist in the codebase, but somewhat represents how we think squiggle ought to be tested.

View File

@ -0,0 +1,33 @@
{ chan ? "a7ecde854aee5c4c7cd6177f54a99d2c1ff28a31" # 21.11
, pkgs ? import (builtins.fetchTarball { url = "https://github.com/NixOS/nixpkgs/archive/${chan}.tar.gz"; }) {}
}:
# Style sheets https://github.com/citation-style-language/styles/
with pkgs;
let deps = [
# (texlive.combine
# { inherit (texlive)
# scheme-small thmtools datetime xpatch fmtcount;
# }
# )
haskellPackages.pandoc
];
in
stdenv.mkDerivation {
name = "render_squiggle_properties";
src = ./.;
buildInputs = deps;
buildPhase = ''
echo rendering...
pandoc \
--from markdown \
--to latex \
--out properties.pdf \
--pdf-engine xelatex \
properties.md \
echo rendered.
'';
installPhase = ''
mkdir -p $out
cp properties.pdf $out/properties.pdf
'';
}