LaTeX Algorithms
approvedby SamZhang02
Facilitate writing algorithm blocks in LaTeX.
LaTeX Algorithms for Obsidian
A simple plugin for writing Algorithms and pseudocodes in Obsidian.
About
Obsidian is a great notetaking tool, I often find myself opening Obsidian instead of compiling a new .tex document for documents that I do not need to submit, simply due to how easy it is to use. However, Obsidian uses MathJax for its LaTeX functionality, which does not allow for package imports, such as algpseudocode.
I wrote this plugin so that I can easily take notes for my Algorithm and proof-based classes in Obsidian as well.
Usage
This plugin reads previous user inputs and converts them into standard LaTeX algorithm format upon detecting keywords, such as \If, \For, etc.
A great addition to this plugin could be Quick LaTeX for Obsidian and/or VIM keybindings. With these tools, you can achieve quite a fast workflow.
The functionalities of this plugin currently include:
- Fast indentation with
Shift+Tab. - Algorithm titles and subtitles.
- Conditionals (If/ElseIf/Else, Switch cases).
- For/While loops.
- Proof keywords.
Currently supported keywords
| Titles and Subtitles | Conditionals | Loops | Proofs |
|---|---|---|---|
| \Algorithm | \If | \For | \Theorem |
| \Input | \Elseif | \EndFor | \Lemma |
| \Output | \Else | \While | \Corollary |
| \Ensure | \Endif | \EndWhile | \Definition |
| \Return | \Switch | \Break | \Remark |
| \State | \Case | \Continue | \Proof |
| \Default | \QED |
Credits
The development of this plugin used the API wrapper from Obsidian.
The idea of this plugin was heavily inspired by Quick LaTeX for Obsidian. (In fact, one of the functions in my code is taken straight from them, simply due to how great it is)
For plugin developers
Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.