An mdBook backend to output Typst markup, pdf, png, or svg

Overview

mdbook-typst

mdbook-typst is a backend for mdBook. The backend converts the book to Typst markup and can output any format Typst can (currently pdf, png, svg, and raw Typst markup).

Usage

First, install the Typst cli:

cargo install --git https://github.com/typst/typst

Next, install mdbook-typst (this project):

cargo install mdbook-typst

Finally, add an entry to your book.toml:

[output.typst]

By default mdbook-typst will output raw Typst markup to book/typst/book.typst.

Pdf and other formats

Pdf and other formats can be output instead of raw Typst markup. In your book.toml set the format value of the output config section:

[output.typst.output]
format = "pdf"

By default mdbook-typst will output to book/typst/book.[format].

Other configuration

mdbook-typst is fairly configurable. Check out the configuration code for a complete list of options.

If you want more control, consider creating your own formatter and/or preprocessing the book using the pullup project.

You might also like...
Replace an app's icon from a png with a single terminal script. Made with Rust

Replace macOS App Icon Replace an app's icon from a png with a single terminal CLI. Made with Rust

PNG manipulation library.
PNG manipulation library.

pngmanip A simple rust library for parsing and manipulating PNG images, primarily at the chunk level. The intended use case was for solving PNG based

A little program written in Rust that prints random PNG images to the terminal in text grabbed from an image repo.

Cermic A little program written in Rust that prints random PNG images to the terminal in text grabbed from an image repo. NOTE: As of right now, Cermi

png_defringe_rs is a port of Immorpher's PNG Defringe program written in Rust to achieve easier installation and faster performance.

png_defringe_rs png_defringe_rs is a port of Immorpher's PNG Defringe program written in Rust to achieve easier installation and faster performance. U

SAORI for UKAGAKA. Convert a image file to resized png file.

Resized Png GitHub repository これは何? デスクトップマスコット、「伺か」で使用できるSAORIの一種です。 機能としては、指定した画像ファイルを拡大または縮小し、pngとして出力します。 「伺か」「SAORI」等の用語については詳しく説明いたしませんのでご了承下さい。

Rust low-level minimalist APNG writer and PNG reader with just a few dependencies with all possible formats coverage (including HDR).

project Wiki https://github.com/js29a/micro_png/wiki at glance use micro_png::*; fn main() { // load an image let image = read_png("tmp/test.

Turns lines of text into SVG files.

Sentences 2 svg Does what it says on the tin. This takes in a file with some sentences and outputs numbered svgs. There are 3 arguments to keep in min

ufo2nft is a CLI Rust tool to automate creating on-chain SVG NFTs from UFO font sources

ufo2nft is a CLI Rust program created by Eli Heuer at the 2022 Seattle Solana Hacker House event. It uses Norad to create on-chain SVG images from UFO font sources, and prepares them for minting as Solana NFTs. For Ethereum NFTs the program can just export the SVGs and Ethereum NFTs can be built manually.

Captcha based on SVG.

BioSvg Captcha based on SVG. Original idea SVG绘制原理与验证码 Usage cargo add biosvg let (answer, svg) = BiosvgBuilder::new() .length(4) .difficulty(

Comments
  • Tracking issue: Make the rust book perfect

    Tracking issue: Make the rust book perfect

    The Rust book is a good litmus test. With the latest master, the following is generated:

    book.pdf

    Issues:

    • [ ] Codeblock fence name items like rust,ignore are only parsed as ignore. This is likely a pulldown_cmark issue.
    • [ ] Inter-doc links are not translated.
    • [ ] Filename in code examples is just sort of hanging in space.
    • [ ] Images are not included.
    • [ ] Notes and warnings and not displayed special.
    opened by LegNeato 0
Releases(v0.1.1)
  • v0.1.1(Dec 1, 2023)

    Bug Fixes

    • Support strong and emphasis embedded in other items.

    Commit Statistics

    • 2 commits contributed to the release.
    • 1 commit was understood as conventional.
    • 0 issues like '(#ID)' were seen in commit messages

    Commit Details

    view details
    • Uncategorized
      • Support strong and emphasis embedded in other items. (d32b0b1)
      • Fix description grammar. (523a016)
    Source code(tar.gz)
    Source code(zip)
  • v0.1.0(Dec 1, 2023)

    Bug Fixes

    • Fix cargo-smart-release.

    Commit Statistics

    • 7 commits contributed to the release over the course of 1 calendar day.
    • 1 commit was understood as conventional.
    • 0 issues like '(#ID)' were seen in commit messages

    Commit Details

    view details
    • Uncategorized
      • Add description. (8db6a2d)
      • Release mdbook-typst v0.1.0 (d0d2d42)
      • Fix cargo-smart-release. (98227ce)
      • Add CHANGELOG. (8bc1a4c)
      • Exit and output stdout/stderr when typst call fails. (7d5b02e)
      • Update to new pullup (5bed32e)
      • Initial commit. (ea33313)
    Source code(tar.gz)
    Source code(zip)
Owner
Christian Legnitto
Ex-@robinhood, ex-@facebook, ex-@mozilla, ex-@apple. Engineering leader who pretends he can still code and does it as much as possible.
Christian Legnitto
PlandUML and Drawio diagrams in doc comments as PNG or SVG images.

rsdoc This crate provides a procedural macro that transform PlandUML and Drawio diagrams in doc comments as PNG or SVG images. The diagrams in doc com

null 4 Feb 20, 2023
SVG to PDF file conversion based on "svg2pdf" and "resvg" Rust projects

pysvg2pdf Blazingly Fast ™️ SVG to PDF file conversion for Python. This project is based on Rust's svg2pdf and resvg projects. The project uses pyo3 a

SuffleWaffle 4 Mar 28, 2024
BadDown is a simplistic and bad markup language inspired by Markdown.

BadDown BadDown is a simplistic and bad markup language inspired by Markdown. Features Simplicity: BadDown keeps it simple, with minimal syntax to cre

Moinhausen 3 Feb 5, 2024
mdBook is a utility to create modern online books from Markdown files.

Create book from markdown files. Like Gitbook but implemented in Rust

The Rust Programming Language 11.6k Jan 4, 2023
Translation support for mdbook. The plugins here give you a structured way to maintain a translated book.

Gettext Translation Support for mdbook The plugins here makes it easy to translate documentation written in mdbook into multiple languages. Support fo

Google 19 Apr 5, 2023
run Typst in JavaScriptWorld.

Typst.ts Typst.ts allows you to independently run the Typst compiler and exporter (renderer) in your browser. You can: locally run the compilation via

null 9 Apr 18, 2023
Shell Escape for Typst typesetting system. Linux Only.

Shell Escape for Typst This is a simple shell escape for Typst. It allows you to run shell commands directly from Typst compiler. That said, it does n

Nikolay Stepanov 4 Jun 7, 2023
Packages for Typst.

Typst Packages An experimental package repository for Typst. A searchable list of all packages that were submitted here is available in the official d

Typst 91 Jul 4, 2023
LaTeX support for Typst, powered by Rust and WASM.

MiTeX LaTeX support for Typst, powered by Rust and WASM. MiTeX processes LaTeX code into an abstract syntax tree (AST). Then it transforms the AST int

null 58 Jan 1, 2024
A tool to compare how Typst documents would look using different fonts or font variants.

typst-font-compare A tool to compare how Typst documents would look using different fonts or font variants. Installation cargo install --path . Usage

null 3 Feb 15, 2024