-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit f41b56f
Showing
19 changed files
with
9,613 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
**/.cache/ | ||
**/dist/ | ||
**/node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"env": { | ||
"browser": true, | ||
"es2021": true | ||
}, | ||
"extends": [ | ||
"google", | ||
"eslint:recommended" | ||
], | ||
"parserOptions": { | ||
"ecmaVersion": 12, | ||
"sourceType": "module" | ||
}, | ||
"rules": {}, | ||
"globals": { | ||
"Docsify": "readonly", | ||
"$docsify": "readonly", | ||
"pseudocode": "readonly" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
**/.cache/ | ||
**/node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2020 Hunter Hwang | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Docsify Pseudocode | ||
|
||
## What it is | ||
|
||
**docsify-pseudocode** is a plugin based on [pseudocode.js](https://github.com/SaswatPadhi/pseudocode.js) to render pseudocode in docsify. Using it, you can easily write pseudocode like Latex's algorithm packages in the markdown document. | ||
|
||
## Features | ||
|
||
All features come from pseudocode.js. | ||
|
||
- **Intuitive grammar:** docsify-pseudocode takes a LaTeX-style input that supports the algorithmic constructs from LaTeX's algorithm packages. With or without LaTeX experience, a user should find the grammar fairly intuitive. | ||
- **Print quality:** The HTML output produced by docsify-pseudocode is (almost) identical with the pretty algorithms printed on publications that are typeset by LaTeX. | ||
- **Math formula support:** Inserting math formulas in docsify-pseudocode is as easy as LaTeX. Just enclose math expression in `$...$` or `\(...\)`. | ||
- **Multiple backends:** docsify-pseudocode supports [KaTex](https://github.com/KaTeX/KaTeX) and [MathJax](https://github.com/mathjax/MathJax) to render math formulas. | ||
|
||
## Support | ||
|
||
- Create a [GitHub issue](https://github.com/h-hg/docsify-pseudocode/issues) for bug reports, feature requests, or questions | ||
- Add a ⭐️ [star on GitHub](https://github.com/h-hg/docsify-pseudocode) to support the plugin! | ||
|
||
## License | ||
|
||
This project is licensed under the terms of the [MIT](https://github.com/h-hg/docsify-pseudocode/blob/master/LICENSE) license. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
- [Installation](installation.md) | ||
- [Usage](usage.md) | ||
- [Change Logs](changelogs.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Change logs | ||
|
||
## v0.1.0 (2020-01-01) | ||
|
||
- Render pseudocode by [pseudocode.js](https://github.com/SaswatPadhi/pseudocode.js) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
% This quicksort algorithm is extracted from Chapter 7, Introduction to Algorithms (3rd edition) | ||
\begin{algorithm} | ||
\caption{Quicksort} | ||
\begin{algorithmic} | ||
\PROCEDURE{Quicksort}{$A, p, r$} | ||
\IF{$p < r$} | ||
\STATE $q = $ \CALL{Partition}{$A, p, r$} | ||
\STATE \CALL{Quicksort}{$A, p, q - 1$} | ||
\STATE \CALL{Quicksort}{$A, q + 1, r$} | ||
\ENDIF | ||
\ENDPROCEDURE | ||
\PROCEDURE{Partition}{$A, p, r$} | ||
\STATE $x = A[r]$ | ||
\STATE $i = p - 1$ | ||
\FOR{$j = p$ \TO $r - 1$} | ||
\IF{$A[j] < x$} | ||
\STATE $i = i + 1$ | ||
\STATE exchange | ||
$A[i]$ with $A[j]$ | ||
\ENDIF | ||
\STATE exchange $A[i]$ with $A[r]$ | ||
\ENDFOR | ||
\ENDPROCEDURE | ||
\end{algorithmic} | ||
\end{algorithm} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Docsify Pseudocode</title> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> | ||
<meta name="description" content="Description"> | ||
<meta name="viewport" | ||
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> | ||
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify-darklight-theme@latest/dist/style.min.css" /> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/pseudocode@latest/build/pseudocode.min.css"> | ||
</head> | ||
|
||
<body> | ||
<div id="app"></div> | ||
<script> | ||
window.$docsify = { | ||
name: 'Docsify Pseudocode', | ||
repo: 'https://github.com/h-hg/docsify-pseudocode', | ||
loadSidebar: true, | ||
copyCode: { | ||
buttonText: { | ||
'/': 'Copy to clipboard', | ||
'/zh-cn/': '点击复制' | ||
}, | ||
errorText: { | ||
'/': 'Error', | ||
'/zh-cn/': '错误' | ||
}, | ||
successText: { | ||
'/': 'Copied', | ||
'/zh-cn/': '复制' | ||
} | ||
}, | ||
search: { | ||
paths: 'auto', | ||
noData: { | ||
'/': 'No results!', | ||
'/zh-cn/': '没有结果!' | ||
}, | ||
placeholder: { | ||
'/': 'Search', | ||
'/zh-cn/': '搜索' | ||
} | ||
}, | ||
tabs: { | ||
persist: true, | ||
sync: true, | ||
theme: 'classic', | ||
tabComments: true, | ||
tabHeadings: false | ||
}, | ||
pseudocode: { | ||
indentSize: '1.2em', | ||
commentDelimiter: '//', | ||
lineNumber: false, | ||
lineNumberPunc: ':', | ||
noEnd: false, | ||
titlePrefix: 'Algorithm' | ||
}, | ||
} | ||
</script> | ||
<script src="//cdn.jsdelivr.net/npm/docsify/lib/docsify.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/components/prism-javascript.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/components/prism-markup.min.js"></script> | ||
<script src="//cdn.jsdelivr.net/npm/docsify/lib/plugins/search.min.js"></script> | ||
<script src="//cdn.jsdelivr.net/npm/docsify-copy-code"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/docsify-tabs"></script> | ||
<script src="//cdn.jsdelivr.net/npm/docsify-darklight-theme@latest/dist/index.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/katex@latest/dist/katex.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/pseudocode@latest/build/pseudocode.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/gh/h-hg/docsify-pseudocode/dist/docsify-pseudocode.min.js"></script> | ||
</body> | ||
|
||
</html> |
Oops, something went wrong.