Skip to content

LiaTemplates/Algebrite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Algebrite - Template

                     --{{0}}--

Template for the Algebrite JavaScript Computer-Algebra-System (CAS) https://algebrite.org to be used in LiaScript to make Markdown code-blocks executable.

Try it on LiaScript:

https://liascript.github.io/course/?https://raw.githubusercontent.com/liaTemplates/algebrite/master/README.md

See the project on Github:

https://github.com/liaTemplates/algebrite

                     --{{1}}--

Like with other LiaScript templates, there are three ways to integrate Algebrite, but the easiest way is to copy the defintion from Sec. Implementation.

                       {{1}}
  1. Load the latest macros via (this might cause breaking changes)

    import: https://raw.githubusercontent.com/liaTemplates/algebrite/master/README.md

    or the current version 0.2.1 via:

    import: https://raw.githubusercontent.com/LiaTemplates/algebrite/0.2.1/README.md

  2. Copy the definitions into your Project

  3. Clone this repository on GitHub

More Information

Algebrite is...

  • lightweight: made to be simple to comprehend and extend, it only depends on BigInteger.js by Peter Olson.
  • self-contained: doesn't need connection to servers or another "backend" CAS
  • a library: beyond use as an interactive tool, Algebrite can be embedded in your applications and extended with custom functions.
  • free: MIT-Licenced

Function reference: http://algebrite.org/docs/latest-stable/reference.html

@Algebrite.eval

These examples are taken from the website http://algebrite.org double-click onto the listing to edit it.

(3 * x - 5x)^3 * (x + x)

60!

@Algebrite.eval

The following example might take a few seconds ...

f=sin(t)^4-2*cos(t/2)^3*sin(t)

f=circexp(f)

defint(f,t,0,2*pi)

@Algebrite.eval

Implementation

                     --{{0}}--

Compared to other macros, using Algebrite is actually quite simple. The two lines below are sufficient, the first one

script: https://cdn.rawgit.com/davidedc/Algebrite/master/dist/algebrite.bundle-for-browser.js

@Algebrite.eval: <script> algebrite.run(`@input`) </script>
                     --{{1}}--

If you want to minimize loading effort in your LiaScript project, you can also copy this code and paste it into your main comment header, see the code in the raw file of this document.

{{1}} https://raw.githubusercontent.com/liaTemplates/algebrite/master/README.md