I am using a pandoc template to convert a markdown file to pdf via xelatex. I'd like to use the lettrine package to make the first letter of a paragraph big, but pandoc inserts the main markdown text using the $body$ variable. Is there a way to tell pandoc to render every first letter as a lettrine?
[Tex/LaTex] Is it possible to use the “lettrine” package with pandoc
lettrinepandoc
Best Answer
You can use the pandoc-lettrine filter. In your markdown document, simply mark the first character of a paragraph with square brackets, and include
\usepackage{lettrine}
in your metadata block. For example:Now invoke pandoc with a call to the filter:
Output is available in TeX, pdf, and html formats.