Wandmalfarbe / pandoc-latex-template

A pandoc LaTeX template to convert markdown files to PDF or LaTeX.
BSD 3-Clause "New" or "Revised" License
5.96k stars 951 forks source link

boxes-with-pandoc-latex-environment-and-awesomebox question #346

Open hrylandvest opened 12 months ago

hrylandvest commented 12 months ago

Apologies for asking such a basic question, I'm still in learning mode with pandoc/latex.

In the example section, to in order to utilize boxes-with-pandoc-latex-environment-and-awesomebox, I assume that the following are the steps to utilize this feature:

  1. Install pandoc-latex-environment $ pip install pandoc-latex-environment
  2. Add\usepackage{awesomebox} to the eisvogel.tex template file. Where should this go exactly in the file?
  3. Reconfigure the callout syntax in my obsidian.md file to the syntax shown:
::: note
Lorem ipsum dolor ...
:::
  1. Run the pandoc command to convert replacing "document" and path to template with my values pandoc "document.md" -o "document.pdf" --from markdown --template "../../eisvogel.tex" --filter pandoc-latex-environment --listings

The above steps produce only the text and no callout syntax in the pdf. I'm obviously doing something wrong here. Would someone be so kind as to point me in the right direction?

ndmalc commented 7 months ago

I also had some difficulties to make it work as the documentation is very sparse on this one.

I think you did everything right except at the step 2. where based on the example here, you should add the following in the YAML metadata block of your markdown file.

header-includes:
- |
  ` ``{=latex}
  \usepackage{awesomebox}
  ` ``
pandoc-latex-environment:
  noteblock: [note]
  tipblock: [tip]
  warningblock: [warning]
  cautionblock: [caution]
  importantblock: [important]

Note: in the code block above, I did not found how to properly escape the ` characters so I added a space within the three ` that needs to be removed when copying