There is a book about snekdown[^SD_BOOK] and a github repo[^SD_GITHUB].
```
Snekdown is available in [the AUR](https://aur.archlinux.org/packages/snekdown).
Entries can also be defined in a separate toml file with the following data layout:
```toml
# snekdown.toml
[BIB_KEY]
key = "value"
### Cargo
[SD_BOOK]
type = "book"
author = "Snek"
title = "Snekdown Book"
date = "20.08.2020"
publisher = "Snek"
You need a working rust installation, for example by using [rustup](http://rustup.rs).
[SD_GITHUB]
type = "website"
url = "https://github.com/trivernis/snekdown"
```sh
cargo install snekdown
```
The valid types for entries and required fields can be found on in the [bibliographix README](https://github.com/Trivernis/bibliographix#bibliography-types-and-fields).
Bibliography entries are not rendered. To render a list of used bibliography insert the
`bib` placeholder at the place you want it to be rendered.
## Glossary
Glossary entries are to be defined in a `glossary.toml` file or any other toml file
that is imported as type `glossary`.
The definition of glossary entries has to follow the following structure
```toml
[SHORT]
long = "Long Form"
description = "The description of the entry"
With pdf rendering
# Example
[HTML]
long = "Hypertext Markup Language"
description = "The markup language of the web"
```sh
cargo install snekdown --features pdf
```
Those glossary entries can be referenced in the snekdown file as follows:
```md
~HTML is widely used for websites.
The format ~HTML is not considered a programming language by some definitions.
~~HTML
```
## Usage
The first occurence of the glossary entry (`~HTML`) always uses the long form.
The second will always be the short form. The long form can be enforced by using two
(`~~HTML`) tildes.
The glossary list can be inserted with the `[[GLS]]` placeholder.
Use `snekdown help` and `snekdown <subcommand> --help` for more information.
## Math
### Rendering
Snekdown allows the embedding of [AsciiMath](http://asciimath.org/):
The AsciiMath parser is provided in the [asciimath-rs](https://github.com/Trivernis/asciimath-rs) crate
`snekdown render <input> <output>`
```
inline math $$ a^2 + b^2 = c^2 $$
### Watching
Block Math
$$$
A = [[1, 2],[3,4]]
$$$
```
`snekdown watch <input> <output>`
The expression get's converted into MathML which is then converted by MathJax when loaded in
the browser.
## Smart Arrows
## Editors
Snekdown automatically renders the sequences `-->`, `==>`, `<--`, `<==`, `<-->`, `<==>` as
their respective unicode arrows (similar to [markdown-it-smartarrows](https://github.com/adam-p/markdown-it-smartarrows)).
This behavior can be turned off by setting the config parameter `smart-arrows` to `false`
(the config needs to be imported before the arrows are used for that to work).
I've created a [VisualStudio Code extension](https://marketplace.visualstudio.com/items?itemName=trivernis.snekdown) for Snekdown.
This extension provides a preview of snekdown files, exports and other commands similar to the
cli. The source code can be found [here](https://github.com/Trivernis/snekdown-vscode-extension).
## Roadmap
The end goal is to have a markup language with features similar to LaTeX.
### Short Term
- [x] Checkboxes
- [x] Emojis (\:emoji:)
- [x] Colors
@ -471,9 +96,19 @@ The end goal is to have a markup language with features similar to LaTeX.
- [x] Chromium based pdf rendering
- [x] Custom Stylesheets
- [x] Smart arrows
- [ ] Custom Elements via templates (50%)
- [ ] Cross References
- [ ] Figures
- [ ] EPUB Rendering
- [ ] Text sizes
- [ ] Title pages
### Long Term
- Rewrite of the whole parsing process
- Custom Elements via templates
## License
This project is licensed under GPL 3.0. See LICENSE for more information.