-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
18 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,12 +25,14 @@ Currently needed: | |
|
||
If you think you can do some large work, please DM me in Discord (@sitandr) or mail ([email protected]) to avoid duplication. | ||
|
||
Also please DM me if I'm forgetting about your PR. I have bad memory. | ||
|
||
## Rules | ||
|
||
1. Many snippets are taken from Discord, Github or other places. Without using them that book would much, much more harder to write. However, getting a consent for every snippet will be a total disaster. | ||
So, as a general rule, if the snippet is a non-trivial one (one that combines typst function in a smart way), there should be a credit to original author (of course, the credit will be removed if author objects). | ||
So, as a general rule, if the snippet is a non-trivial one (one that combines typst functions in a smart way), there should be a credit to original author (of course, the credit will be removed if author objects). | ||
2. In "Typst by Example" section the concepts that are not told yet should be avoided if possible. Although it is okay to use them if they are really intuitive and without them the demonstration would be too dull. | ||
3. "Typst Snippets" and "Typstonomicon" should not include staff that is already present in official packages. Instead, there should be a link to a package. However it is allowed to use packages as a tool in snippets, if the package using is "secondary" there or the idea of using that package for that task is not obvious. | ||
3. "Typst Snippets" and "Typstonomicon" should not include staff that is already present in official packages. Instead, there should be a link to a package. However, it is allowed to use packages as a tool in snippets, if the package using is "secondary" there or the idea of using that package for that task is not obvious. | ||
4. Giant queries and hack things should go to "Typstonomicon", not "Typst snippets", even if they are super-useful. "Typst snippets" should contain code as clean as possible. | ||
|
||
## Cleaning cached Typst files | ||
|
@@ -39,4 +41,17 @@ If you think you can do some large work, please DM me in Discord (@sitandr) or m | |
git clean -d -X -i | ||
``` | ||
|
||
Make sure to avoid deleting something useful. | ||
Make sure to avoid deleting something useful. | ||
|
||
## Compiling | ||
|
||
To compile the book, you need `typst` cli installed, `mdbook` and my highlighting & rendering preprocessor `mdbook-typst-highlight`. Assuming `typst` is already installed, installation using cargo: | ||
|
||
```bash | ||
cargo install mdbook | ||
cargo install --git https://github.com/sitandr/mdbook-typst-highlight | ||
``` | ||
|
||
Alternatively you can install them precompiled from `mdbook` and `mdbook-typst-highlight` releases. In the end you should have to have the latest versions of them all in your PATH. | ||
|
||
After everything installed, `mdbook build` will build the book. You can also use `mdbook watch` for continuous rebuilding, and `--open` option to open the book in your browser. For more details on building, see `mdbook` documentation. |