Non-codeblock pseudocode writing

What I’m trying to do

Hi all, trying to type up some Numerical Linear Algebra course materials and would like to write some basic pseudo-code. I’ve been using the LaTeX suite plugin for a long time and have a plethora of snippets and shortcuts that I use and would like to use when writing said pseudocode.

Things I have tried

I’ve been trying to just use the $math$ inline LaTeX rendering with indents, but obviously the indents disappear when I go into reading mode. I know there exists a pseudocode plugin for obsidian but this would mean I can’t use my snippets and have to use latex commands to write things like “if” or bold things (which I know isn’t that hard nor is it time-consuming, I just would like to find a way not to do this). Thoughts? Suggestions?

The easiest method I can think of are code blocks. AFAIK Obsidian uses prism.js for syntax highlighting. It supports 200+ languages. One of them might be close to how you wrote your snippets.

 ~~~basic
 IF foo
 THEN 
    bar
 ELSE 
    foobar
 END
 ~~~