feat(presets): add pdflatex preset
Adds a direct pdflatex preset for users who want single-pass compilation without latexmk orchestration. Uses -file-line-error for parseable diagnostics and reuses the existing parse_latexmk error parser since both emit the same file:line: message format.
This commit is contained in:
parent
75b855438a
commit
8ebe2ed80b
3 changed files with 72 additions and 0 deletions
|
|
@ -137,6 +137,22 @@ M.latex = {
|
|||
open = true,
|
||||
}
|
||||
|
||||
---@type preview.ProviderConfig
|
||||
M.pdflatex = {
|
||||
ft = 'tex',
|
||||
cmd = { 'pdflatex' },
|
||||
args = function(ctx)
|
||||
return { '-interaction=nonstopmode', '-file-line-error', '-synctex=1', 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