Crates.io | pandoc |
lib.rs | pandoc |
version | 0.8.11 |
source | src |
created_at | 2015-07-09 11:48:34.524329 |
updated_at | 2023-11-19 13:36:52.242102 |
description | a library API that wraps calls to the pandoc 2.x executable |
homepage | |
repository | https://github.com/oli-obk/rust-pandoc |
max_upload_size | |
id | 2571 |
size | 65,413 |
add the pandoc crate to your Cargo.toml
[dependencies]
pandoc = "0.8"
create a pandoc builder and execute it
let mut pandoc = pandoc::new();
pandoc.add_input("hello_world.md");
pandoc.set_output(OutputKind::File("hello_world.pdf".to_string()));
pandoc.execute().unwrap();
install miktex or texlive, if your installation paths differ from the default use the add_latex_path_hint
function to add them to the pandoc builder.
use add_pandoc_path_hint
to add the actual path to pandoc search path. Under windows it can often
be found in %LOCALAPPDATA%\Pandoc\
, but that path is searched automatically by this crate.