blob: 605e79dc9289b7d8efee782fbacbd2dc9a58809f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
use super::compile::*;
use super::{Distribution, DistributionKind};
use futures_boxed::boxed;
#[derive(Debug, Default)]
pub struct Tectonic;
impl Distribution for Tectonic {
fn kind(&self) -> DistributionKind {
DistributionKind::Tectonic
}
fn supports_format(&self, format: Format) -> bool {
match format {
Format::Latex | Format::Pdflatex | Format::Xelatex => true,
Format::Lualatex => false,
}
}
fn output_kind(&self, _format: Format) -> OutputKind {
OutputKind::Pdf
}
#[boxed]
async fn compile<'a>(
&'a self,
params: CompileParams<'a>,
) -> Result<CompileResult, CompileError> {
let args = [params.file_name];
compile("tectonic", &args, params).await
}
}
|