question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Pandoc template support

See original GitHub issue

Requested by @EleanorKonik on the Discord’s #creative channel

Basically, you can write template files for most output formats which use a templating language to include bits of the input document. Using the Pandoc CLI the command will have a --template=file.tex if you’ve got a template called file.tex in the working directory or ~/.pandoc/templates.

My idea for the UX is to have a setting where you list files anywhere in your vault that you’d like to be templates (or specify a template directory?). Then, when you export, if there are any custom templates for that export type you should be prompted for the template you want, including the default one.

Related links:

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:17 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
gpl34commented, Sep 16, 2021

What about having a template: in the YAML front matter. For example, saying:

---
template: local.latex
---

would be the same as --template=local.latex. That would allow to choose a different template per note. No need therefore to change the settings or to ask the user to choose a template each time one exports a note.

0reactions
Ellpeckcommented, Oct 18, 2022

@Ellpeck Do you have spaces in your absolute path to the template, that you wouldn’t have in your path to other metadata CLI options ?

As I said, the only time I tested this, I used a web URL (which is supported by the --template pandoc option, and also worked when i added it to the “additional arguments” section of the plugin settings), so no, no spaces!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pandoc User's Guide
The package does not support multi-byte encoding for source code. To handle UTF-8 you would need to use a custom template. This issue...
Read more >
GitHub - kjhealy/pandoc-templates
A collection of support files for use with Pandoc, and specifically for helping to turn pandoc markdown files into nice HTML, LaTeX, and...
Read more >
17.3 Custom Pandoc templates | R Markdown - Bookdown
17.3 Custom Pandoc templates. An R Markdown is first compiled to Markdown through knitr, and then converted to an output document (e.g., PDF,...
Read more >
Pandoc Templates - Fractaled Mind
A collection of support files for use with Pandoc, and specifically for helping to turn pandoc markdown files into nice HTML, LaTeX, PDF,...
Read more >
Academic Pandoc template - GitHub Pages
Write beautiful academic texts with the distraction-free Pandoc Markdown and typademic. ... make help to get a list of all available commands ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found