mirror of
https://github.com/ytliu74/obsidian-pseudocode.git
synced 2026-07-22 07:40:25 +00:00
doc: Update README
This commit is contained in:
parent
fdb8218805
commit
995fa7d6de
2 changed files with 30 additions and 28 deletions
58
README.md
58
README.md
|
|
@ -1,12 +1,13 @@
|
||||||
# Obsidian-Pseudocode
|
# Obsidian-Pseudocode
|
||||||
- [Features](#features)
|
- [Obsidian-Pseudocode](#obsidian-pseudocode)
|
||||||
- [Future Features](#future-features)
|
- [Features](#features)
|
||||||
- [Usage](#usage)
|
- [Future Features](#future-features)
|
||||||
- [Installation](#installation)
|
- [Usage](#usage)
|
||||||
- [Install from the Community Plugins in Obsidian.](#install-from-the-community-plugins-in-obsidian)
|
- [Installation](#installation)
|
||||||
- [Use BRAT](#use-brat)
|
- [Install from the Community Plugins in Obsidian.](#install-from-the-community-plugins-in-obsidian)
|
||||||
- [Manual install](#manual-install)
|
- [Use BRAT](#use-brat)
|
||||||
- [Credits](#credits)
|
- [Manual install](#manual-install)
|
||||||
|
- [Credits](#credits)
|
||||||
|
|
||||||
This is a plugin for [Obsidian](https://obsidian.md/) that allows you to render LaTeX-style pseudocode inside a code block. The plugin is based on [pseudocode.js](https://github.com/SaswatPadhi/pseudocode.js), a JavaScript library that typesets pseudocode beautifully to HTML.
|
This is a plugin for [Obsidian](https://obsidian.md/) that allows you to render LaTeX-style pseudocode inside a code block. The plugin is based on [pseudocode.js](https://github.com/SaswatPadhi/pseudocode.js), a JavaScript library that typesets pseudocode beautifully to HTML.
|
||||||
|
|
||||||
|
|
@ -18,6 +19,7 @@ This is a plugin for [Obsidian](https://obsidian.md/) that allows you to render
|
||||||
|
|
||||||
### Future Features
|
### Future Features
|
||||||
|
|
||||||
|
- [ ] Generate a LaTeX file that can be compiled, including any required additional macros.
|
||||||
- [ ] Syntax highlighting.
|
- [ ] Syntax highlighting.
|
||||||
- [x] Auto-completion inside `pseudo` code block. (Release 1.1.0)
|
- [x] Auto-completion inside `pseudo` code block. (Release 1.1.0)
|
||||||
|
|
||||||
|
|
@ -34,25 +36,25 @@ Here is an example:
|
||||||
\begin{algorithm}
|
\begin{algorithm}
|
||||||
\caption{Quicksort}
|
\caption{Quicksort}
|
||||||
\begin{algorithmic}
|
\begin{algorithmic}
|
||||||
\PROCEDURE{Quicksort}{$A, p, r$}
|
\Procedure{Quicksort}{$A, p, r$}
|
||||||
\IF{$p < r$}
|
\If{$p < r$}
|
||||||
\STATE $q = $ \CALL{Partition}{$A, p, r$}
|
\State $q \gets $ \Call{Partition}{$A, p, r$}
|
||||||
\STATE \CALL{Quicksort}{$A, p, q - 1$}
|
\State \Call{Quicksort}{$A, p, q - 1$}
|
||||||
\STATE \CALL{Quicksort}{$A, q + 1, r$}
|
\State \Call{Quicksort}{$A, q + 1, r$}
|
||||||
\ENDIF
|
\EndIf
|
||||||
\ENDPROCEDURE
|
\EndProcedure
|
||||||
\PROCEDURE{Partition}{$A, p, r$}
|
\Procedure{Partition}{$A, p, r$}
|
||||||
\STATE $x = A[r]$
|
\State $x \gets A[r]$
|
||||||
\STATE $i = p - 1$
|
\State $i \gets p - 1$
|
||||||
\FOR{$j = p$ \TO $r - 1$}
|
\For{$j \gets p$ \To $r - 1$}
|
||||||
\IF{$A[j] < x$}
|
\If{$A[j] < x$}
|
||||||
\STATE $i = i + 1$
|
\State $i \gets i + 1$
|
||||||
\STATE exchange
|
\State exchange
|
||||||
$A[i]$ with $A[j]$
|
$A[i]$ with $A[j]$
|
||||||
\ENDIF
|
\EndIf
|
||||||
\STATE exchange $A[i]$ with $A[r]$
|
\State exchange $A[i]$ with $A[r]$
|
||||||
\ENDFOR
|
\EndFor
|
||||||
\ENDPROCEDURE
|
\EndProcedure
|
||||||
\end{algorithmic}
|
\end{algorithmic}
|
||||||
\end{algorithm}
|
\end{algorithm}
|
||||||
```
|
```
|
||||||
|
|
@ -60,7 +62,9 @@ Here is an example:
|
||||||
|
|
||||||
This will be rendered as:
|
This will be rendered as:
|
||||||
|
|
||||||
|
<div align="center">
|
||||||
<img src="assets/example.png" alt="example" width="70%">
|
<img src="assets/example.png" alt="example" width="70%">
|
||||||
|
</div>
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
|
|
@ -85,8 +89,6 @@ This will be rendered as:
|
||||||
|
|
||||||
<!-- ## Known Issues -->
|
<!-- ## Known Issues -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Credits
|
## Credits
|
||||||
|
|
||||||
This plugin is based on [pseudocode.js](https://github.com/SaswatPadhi/pseudocode.js), a JavaScript library that typesets pseudocode beautifully to HTML. Many thanks to the pseudocode.js team for their great work!
|
This plugin is based on [pseudocode.js](https://github.com/SaswatPadhi/pseudocode.js), a JavaScript library that typesets pseudocode beautifully to HTML. Many thanks to the pseudocode.js team for their great work!
|
||||||
|
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 83 KiB After Width: | Height: | Size: 105 KiB |
Loading…
Reference in a new issue