Hi,

I am using kramdown and I am able to get latex formulas displayed correctly. Now I would like to add an algorithm using the latex package algorithm2e. This answer on the tex.stackexchange shows that it works with markdown and pandoc.

I added the package in a post on my jekyll site using minimal mistakes theme in the preamble and copied the example from stackexchange but the algorithm does not get rendered as expected.

How can I add extra latex packages using kramdown?

The answer of an issue in kramdown states to use a custom latex template. However, I have no idea how to use a new template.