chdemko / pandoc-latex-environment

Pandoc filter for adding LaTeX environement on specific div
https://pandoc-latex-environment.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
33 stars 9 forks source link

Use in combination with pandoc-crossref #12

Closed normenmueller closed 3 years ago

normenmueller commented 3 years ago

If I enable both filters I get the following error:

Error producing PDF.
! Undefined control sequence.
<argument> \passthrough
                        {\lstinline !pandoc-latex-environments!}
l.142 ...h{\lstinline!pandoc-latex-environments!}}

After disabling pandoc-crossref the document compiles... but without any resolved references.

I use the following header:

header-includes:
- |
  ```{=latex}
  \usepackage{awesomebox}

  \usepackage{tcolorbox}

  \newtcolorbox{info-box}{colback=cyan!5!white,arc=0pt,outer arc=0pt,colframe=cyan!60!black}
  \newtcolorbox{warning-box}{colback=orange!5!white,arc=0pt,outer arc=0pt,colframe=orange!80!black}
  \newtcolorbox{error-box}{colback=red!5!white,arc=0pt,outer arc=0pt,colframe=red!75!black}
  ```
pandoc-latex-environment:
  noteblock: [note]
  tipblock: [tip]
  warningblock: [warning]
  cautionblock: [caution]
  importantblock: [important]

  tcolorbox: [box]
  info-box: [info]
  warning-box: [warning]
  error-box: [error]

Any hint what am I missing here?

Delanii commented 3 years ago

\passthrough command is custom command defined in LaTeX default template. It is not fro many package. As I have seen, mostly causes more harm then good, so am not using it in my own template. Any change that you are using custom template, that doesnt have this command defined? Also, as I blankly remember, pandoc-crossref uses header-includes var. Did you check for that?

normenmueller commented 3 years ago

Removed the

```{=latex} ...

block. Now it works.