It would be great if Gingko supports the following JS to support something like algorithms package in LaTex.
Generally, polishing details like getting the formatting to be just as you expect, should be passed to a dedicated program. I see Gingko as a “drafting” tool, to help you go from zero to something mostly complete and organized. For the final touches, export and take care of them elsewhere.
If you still want to add pseudocode support to your trees, you can give it a try. You can always upload the code & css somewhere accessible, and include it in any card of your tree. Gingko accepts HTML, including
<script> tags, so it should work.
If I understand correctly, you’ll have to also include the KaTeX files: