Skip to content

Instantly share code, notes, and snippets.

@mebiusbox
Created October 3, 2024 10:17
Show Gist options
  • Save mebiusbox/4e9fbf611e400fc6d72f2082326a504a to your computer and use it in GitHub Desktop.
Save mebiusbox/4e9fbf611e400fc6d72f2082326a504a to your computer and use it in GitHub Desktop.
lualatex
[config]
skip_core_tasks = true
[tasks.latex]
command = "lualatex"
args = [
"--cmdx",
"-file-line-error",
"-synctex=1",
"-interaction=nonstopmode",
"-halt-on-error",
"--fmt=lualatex.fmt",
"${FILE}"
]
[tasks.latex-clean]
command = "latexmk"
args = [
"-c", "-C",
"${FILE}"
]
[tasks.latex-crop]
command = "pdfcrop"
args = [
"--margins",
"10 5",
"${PDF_FILE}",
"${PDF_FILE}"
]
[tasks.latex-png]
command = "pdftocairo"
args = [
"-png",
"-r", "300",
"-singlefile",
"${PDF_FILE}"
]
[tasks.default]
alias = "build"
[tasks.preview]
env = { "FILE" = "preview.tex", "PDF_FILE" = "preview.pdf" }
run_task = { name = ["latex", "latex-crop", "latex-png"] }
[tasks.build]
extend = "latex"
env = { "FILE" = "main.tex" }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment