#latex #markdown

pandoc

a library API that wraps calls to the pandoc 2.x executable

26 releases

0.8.11 Nov 19, 2023
0.8.10 Sep 13, 2022
0.8.9 Mar 10, 2022
0.8.8 Nov 19, 2021
0.1.0 Jul 9, 2015

#139 in Text processing

Download history 279/week @ 2023-11-06 292/week @ 2023-11-13 343/week @ 2023-11-20 499/week @ 2023-11-27 385/week @ 2023-12-04 264/week @ 2023-12-11 327/week @ 2023-12-18 333/week @ 2023-12-25 278/week @ 2024-01-01 320/week @ 2024-01-08 498/week @ 2024-01-15 540/week @ 2024-01-22 510/week @ 2024-01-29 449/week @ 2024-02-05 541/week @ 2024-02-12 1030/week @ 2024-02-19

2,593 downloads per month
Used in 8 crates (6 directly)

MIT/Apache

51KB
975 lines

Build Status

Instructions

  1. Install pandoc

  2. add the pandoc crate to your Cargo.toml

    [dependencies]
    pandoc = "0.8"
    
  3. 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();
    

PDF-output

Windows specific

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.

Common Issues

file not found errors

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.

Dependencies

~435KB