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:
Barrett Ruth 2026-03-04 13:53:01 -05:00
parent 8ebe2ed80b
commit 3a3a0783e8
Signed by: barrett
GPG key ID: A6C96C9349D2FC81
3 changed files with 68 additions and 0 deletions

View file

@ -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',