Kramdown latex usepackage algorithm pseudocode

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.

Here is the link to the repo of my github page.
And here is the post with the rendering issues.

I don’t think that is going to work, the package you are trying to load is not a jekyll plugin (?) so I would not expect it to do anything.

I would google jekyll algorithm2e and see if you can find anyone that has done what you want - though I did that and did not see much.

It is possible someone has made a plugin to do what you want.

The other links you have look like they are not using jekyll - not sure what is generating their site, might be worth asking.

Jekyll is using kramdown, but you don’t exactly have direct access to it as jekyll is inbetween you and kramdown - at least as I understand it.

Thanks for looking at this issue.

As you suggested I googled already and could not find any helpful information on using latex packages with jekyll.

Your correct, the other links use pandoc and kramdown directly.

I also don’t know if this forum is the right place to ask this kind of question as it is kind of a feature request, I guess. I will post my question on github too.

you are probably in plugin territory - I don’t see this being a core thing jekyll would support, but can’t hurt to ask (I’m just a user)!