oli-obk / rust-pandoc

Apache License 2.0
50 stars 29 forks source link

make LatexEngine's value an enum with the commonly know latex types #2

Open oli-obk opened 8 years ago

oli-obk commented 8 years ago

currently to enable e.g. xetex one needs to call

pandoc.add_option(pandoc::PandocOption::LatexEngine("xelatex".into()));

adding strings is not pretty. To still allow arbitrary engines the enum can have a Custom variant.

Pandoc's docs have pdflatex|lualatex|xelatex as the choices. so:

enum LatexEngine {
    PdfLatex,
    LuaLatex,
    XeLatex,
    Custom(PathBuf),
}

or maybe leave off the Latex postfix

oli-obk commented 5 years ago

Note: it's PdfEngine now