feat(presets): add tectonic preset
Adds a tectonic preset for the modern Rust-based LaTeX engine, which auto-downloads packages and requires no TeX installation. Reuses parse_latexmk since tectonic emits the same file:line: message diagnostic format.
This commit is contained in:
parent
8ebe2ed80b
commit
3a3a0783e8
3 changed files with 68 additions and 0 deletions
|
|
@ -153,6 +153,22 @@ M.pdflatex = {
|
|||
open = true,
|
||||
}
|
||||
|
||||
---@type preview.ProviderConfig
|
||||
M.tectonic = {
|
||||
ft = 'tex',
|
||||
cmd = { 'tectonic' },
|
||||
args = function(ctx)
|
||||
return { ctx.file }
|
||||
end,
|
||||
output = function(ctx)
|
||||
return (ctx.file:gsub('%.tex$', '.pdf'))
|
||||
end,
|
||||
error_parser = function(output)
|
||||
return parse_latexmk(output)
|
||||
end,
|
||||
open = true,
|
||||
}
|
||||
|
||||
---@type preview.ProviderConfig
|
||||
M.markdown = {
|
||||
ft = 'markdown',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue