1.1. Pretty printing

1.1.1. Pretty printing in a terminal

Eq can be used just to create an <i>ASCII Art</i> representation of an equation. To do this, type the following command in a command line:

$ eq format "sqrt( 3 * 3 / 4! )"
    _____ 
   / 3.3  
  / ----- 
\/   4!

1.1.2. Pretty printing to a file

For your convenience, you also could store the result of the command line into a file. With great originality, doing this require using the -o switch.

$ eq format -o foo.txt "sqrt( 3 * 3 / 4! )"
$ cat foo.txt
    _____ 
   / 3.3  
  / ----- 
\/   4!

1.1.3. Pretty printing from a file

If you want to pretty print a formula stored in a file, if it’s the result of another program for example. You can use the -f switch.

$ echo '3 * 5 / 2' > foo.txt
$ eq format -f foo.txt
 3.5  
----- 
  2

And you can combine every switch in every way, store a file in a file whil reading from another.

Table Of Contents

Previous topic

1. Eq’s uses

Next topic

1.2. Calculator

This Page