diff --git a/README.md b/README.md new file mode 100644 index 0000000..f411aba --- /dev/null +++ b/README.md @@ -0,0 +1,42 @@ +This is a simple template for creating custom envelopes. Every now and +then I need to create my own envelopes (e.g. when I am out of the +bought ones), so this should save me time re-inventing the shapes and cuts. + +# Usage + +1. Install asymptote +1. Tweak parameters at the top of `envelope.asy` +1. `asy envelope` +1. print `envelope.pdf` + +## Parameters explained + +- `pgw` and `pgh` are page width and height, respectively. If + `force_output_size` is true, these are used to output a document with + exact dimensions. +- `sqsz` is the length of the edge of the bounding square. At this + moment, we are always creating envelopes out of a square. (Setting + `sqsz = pgw` means that the square will span whole page width.) +- `envh` and `envw` are the size of the resulting envelope. `envfmt` is + the format, for reference and debugging. +- When `with_labels` is true, the output will contain debugging labels + like names of various used points. + +# Known bugs + +- Undefined behaviour when the envelope does not fit the rectangle (or + fits too tightly). +- Undefined behaviour when the sizes do not follow the ordering + invariants (the page must be in portrait orientation, the envelope in + landscape) +- Nobody checks the validity of the config. No safeguards whatsoever. + +# License + +CC0. This is too trivial to have any creative value. Attribution is +welcome though. + +# Bugs, suggestions, contibutions, patches, discussion, &c. + +Please mail me at +[envelope@pokemon.ledoian.cz](mailto:envelope@pokemon.ledoian.cz).