I want to write pseudocode in TeXShop, with my own commands. The only commands I need to have are save, repeat, return, and if/elif/else. Can someone please help me with that? I was trying to figure it out by using the algorithmicx package to define the new commands, but I kept getting errors. (I don't actually care which package I use as long as it outputs the correct code.)
Here's the pseudocode I want it to display:
save count = 0
save i = 0
repeat len(L)
if compare(e, L[i]) == 0
count += i
i += 1
return count
minted,listings,algorithm,algorithmic,algorithm2e,algorithmicx,program, https://ctan.org/pkg/algorithms, see https://ctan.org/topic/pseudocode. (Disclaimer: I commented this in a hurry so there is a non-zero chance that I missed something or that I made a mistake :)) – Dr. Manuel Kuehner Jun 29 '21 at 23:31