scaffolding in place for properties.pdf
This commit is contained in:
		
							parent
							
								
									1092550c89
								
							
						
					
					
						commit
						ecfd8deece
					
				
							
								
								
									
										1
									
								
								packages/squiggle-lang/.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								packages/squiggle-lang/.gitignore
									
									
									
									
										vendored
									
									
								
							| 
						 | 
				
			
			@ -19,3 +19,4 @@ yarn-error.log
 | 
			
		|||
dist
 | 
			
		||||
*.coverage
 | 
			
		||||
_coverage
 | 
			
		||||
result
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										15
									
								
								packages/squiggle-lang/__tests__/docs/README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								packages/squiggle-lang/__tests__/docs/README.md
									
									
									
									
									
										Normal 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. 
 | 
			
		||||
							
								
								
									
										33
									
								
								packages/squiggle-lang/__tests__/docs/default.nix
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								packages/squiggle-lang/__tests__/docs/default.nix
									
									
									
									
									
										Normal 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
 | 
			
		||||
      '';
 | 
			
		||||
  }
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user