Skip to content

Instantly share code, notes, and snippets.

@JonasBernard
Last active May 2, 2022 17:35
Show Gist options
  • Save JonasBernard/ec912055fad3867a143f7cf15b2d2866 to your computer and use it in GitHub Desktop.
Save JonasBernard/ec912055fad3867a143f7cf15b2d2866 to your computer and use it in GitHub Desktop.
VS Code task to generate PDF files from Markdown using Pandoc and LaTeX.
{
"version": "2.0.0",
"tasks": [
{
"label": "Create PDF from current Markdown file (Pandoc)",
"type": "shell",
"command": "pandoc",
"args": [
"--from=markdown",
"--to=latex",
"-V",
"geometry:margin=2cm",
"-V",
"author: Jonas Bernard",
"-V",
"title: ${fileBasenameNoExtension}",
"-o",
"${relativeFileDirname}${pathSeparator}${fileBasenameNoExtension}.pdf",
"-t",
"latex",
"${file}",
],
"problemMatcher": []
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment