Skip to content

Quoteme/prettymath

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PrettyMath

Print formulas the pretty way inside your terminal.

Installation

Arch Linux

The program is available in the AUR as prettymath-git

$ yay -S prettymath-git

Other operating systems

  1. install the dependencies
  2. run prettymath.py

Dependencies

  • python
  • python-sympy

Usage

  • -h prints help
  • -u and --use_unicode change output to unicode
  • ... all following strings are treated as expressions

Examples

$ ./prettymath.py "a*b+x"
a*b + x
$ ./prettymath.py "a*b+x" "Integral(x**2,x)"
	a*b + x
  /
 |
 |  2
 | x  dx
 |
/
./prettymath.py "Limit(1/x, x, 0)"
	 1
 lim -
x->0+x
./prettymath.py -u "Limit(1/x, x, 0)"
	 1
 lim ─
x─→0⁺x
./prettymath.py "Sum(k**-2, (k, 1, n))"
  n
____
\   `
 \    1
  \   --
  /    2
 /    k
/___,
k = 1
./prettymath.py -u "Sum(k**-2, (k, 1, n))"
  n
 ____
 ╲
  ╲   1
   ╲  ──
   ╱   2
  ╱   k
 ╱
 ‾‾‾‾
k = 1

About

Write prettified mathematical formulas to stdout using the magic of python and sympy

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages