README
pseudocode.js
pseudocode.js is a JavaScript library that typesets pseudocode beautifully to HTML.
- Intuitive grammar: Pseudocode.js 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 pseudocode.js is (almost) identical with the pretty algorithms printed on publications that are typeset by LaTeX.
- Math formula support: Inserting math formulas in pseudocode.js is as easy
as LaTeX. Just enclose math expression in
$...$
or\(...\)
.
It supports all modern browsers, including Chrome, Safari, Firefox, Edge, and IE 9 - IE 11.
Visit the project website for a demo.
Usage
Quick Start
pseudocode.js can render math formulas using either KaTeX, or MathJax.
Step 1A · For KaTeX users
Include the following in the <head>
of your page:
<script src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.js"
integrity="sha256-F/Xda58SPdcUCr+xhSGz9MA2zQBPb0ASEYKohl8UCHc=" crossorigin="anonymous">
</script>
Step 1B · For MathJax 2.x users
Include the following in the <head>
of your page:
<script src='https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS_CHTML'>
</script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {
inlineMath: [['