| Crates.io | tiefdownconverter |
| lib.rs | tiefdownconverter |
| version | 0.9.1 |
| created_at | 2025-03-13 16:58:55.579725+00 |
| updated_at | 2025-09-23 04:07:40.920205+00 |
| description | A CLI tool to manage and convert Markdown-based projects. |
| homepage | https://tiefseetauchner.github.io/TiefDownConverter/ |
| repository | https://github.com/Tiefseetauchner/tiefdownconverter |
| max_upload_size | |
| id | 1591185 |
| size | 360,596 |
TiefDownConverter is a command-line tool designed to streamline the conversion of structured projects into various output formats, such as PDF, EPUB, and Typst-based documents. While it was originally built for Markdown, it can now combine any file type. The tool acts as a wrapper around Pandoc and XeTeX, enabling users to set up a project once and reproducibly generate multiple formats with a single command.
tiefdownconverter_core is the core library for tiefdownconverter - while it is seperated, it is recommended to use the command line tool.
Documentation is available in docs/docs.pdf or docs/docs_tex.pdf
These are generated using tiefdownconverter as well, thus the two files. It's essentially a demo.
manifest.toml.Download the latest release from GitHub Releases and extract the binary.
To build TiefDown Converter manually, ensure you have Rust installed, then run:
cargo build --release
This will create an executable in the target/release/ directory.
TiefDown requires the following external dependencies:
sudo apt install pandoc texlive-xetex typst
winget install MiKTeX.winget install pandoc.winget install typst.mkdir my-project
cd my-project
tiefdownconverter init -t lix_novel_a4.tex # Or any preset template you may have in mind. For no initial templates, use -n
This creates a new TiefDown project with the lix_novel_a4.tex template.
tiefdownconverter convert
This command converts the current project using the specified template.
tiefdownconverter convert -t lix_novel_book.tex
Lua filters can be added to a template using the tiefdownconverter project update-template command:
tiefdownconverter project update-template <TEMPLATE> --add-filters path/to/filter.lua
To remove a filter:
tiefdownconverter project update-template <TEMPLATE> --remove-filters path/to/filter.lua
Filters are stored in the project manifest and used during the conversion process.
A typical TiefDown project consists of:
project/
├── manifest.toml
├── Markdown/
│ ├── Chapter 0_ Authors notes.md
│ ├── Chapter 1.md
│ ├── ...
├── template/
│ ├── lix_novel_a4.tex
│ ├── lix_novel_book.tex
│ ├── custom_template.typ
│ ├── template_epub/
manifest.toml Examplemarkdown_dir = "My Story Folder"
version = 1
[[templates]]
filters = ["luafilters/chapter_filter.lua"]
name = "lix_novel_a4.tex"
output = "a4_main.pdf"
template_type = "Tex"
[[templates]]
filters = ["luafilters/chapter_filter.lua"]
name = "lix_novel_book.tex"
output = "8x5in_main.pdf"
template_type = "Tex"
Users are encouraged to create their own templates. TiefDown allows adding templates via:
tiefdownconverter project add-template my_template.tex
Use -h for more options.
Templates must include:
\input{./output.tex}
to correctly insert the converted content.
Users can define and apply custom Lua filters by placing them in the project directory and updating the manifest as described above.
Example filter to modify headers:
function Header(elem)
if elem.level == 1 then
return pandoc.RawBlock("latex", "\\h{" .. pandoc.utils.stringify(elem.content) .. "}")
end
if elem.level == 2 then
return pandoc.RawBlock("latex", "\\hh{" .. pandoc.utils.stringify(elem.content) .. "}")
end
end
Contributions are welcome via pull requests on GitHub. Please be kind.
Report issues on the GitHub Issues page.
You can also join my Discord Server
This project is licensed under MIT. See LICENSE for details.
If you appreciate this project, consider supporting it by contributing or donating.
Mascot (Fibschiiiiiiiiiiiii) by Finn <3

