Open chisui opened 6 years ago
I ran into this same issue. If you need to just push out a PDF that has backticks in the code block, you can change the font family that is used. Change line 513 using sourcecodepro
to inconsolata
which is a close enough substitute.
https://github.com/Wandmalfarbe/pandoc-latex-template/blob/master/eisvogel.tex#L513
Couple of lines around the edit:
%
% Source Sans Pro as the default font family
% Source Code Pro for monospace text
%
% 'default' option sets the default
% font family to Source Sans Pro, not \sfdefault.
%
$if(mainfont)$
$else$
\usepackage[default]{sourcesanspro}
\usepackage{inconsolata}
$endif$
As an alternative solution, you can use xelatex
:
pandoc test.md -o test.pdf --template eisvogel --listings --pdf-engine xelatex
If a codeblock contains Backticks, they are not displayed and pandoc outputs the following warning
The issue can be reproduced with this example:
Compile with
pandoc test.md -o test.pdf --template eisvogel --listings