Aesthete Help

Glypher

An equation editor / CAS frontend to SymPy

Glypher allows users to formulate basic symbolic algebra problems in a natural, visually clear manner and aims to provide the full functionality of SymPy interactively illustrated in pretty Linux Libertine fonts.

To provide an efficient and powerful equation editor, the initial learning curve is necessarily a bit steep, but after a few examples it will all become familiar!

Glypher is inspired by, and aims to maintain some usage compatibility with, the excellent scientific editor TeXmacs.

Usage

Conceptually, Glypher represents equations as a combination of Entities, grouped in Phrases, and then into PhraseGroups. An Entity might be the letter c or the vinculum of a fraction, a Phrase, the token cos and a PhraseGroup, the combination of function name, bracketed Phrase and variable, cos(x). This hierarchy allows consistent and predictable rendering of Glypher equations into SymPy objects. Entities representing a unicode symbol are called Symbols. Note that this terminology contrasts with SymPy - a SymPy symbol is generated by a combination of one or more Glypher Symbols in a Phrase, allowing words to be used as SymPy symbols.

One defining characteristic of Glypher is its insistence on handling bracketing internally. Brackets are implied, as each phrase will be treated distinctly. If two adjacent characters share a phrase, they should always have a green underline. Where brackets are required for clarity of reading, they are usually automatically inserted (and removed) by Glypher. For example, a*a^2 will be appear, rather than (a)*((a)^2).

The cursor will allow you to attach to Symbols and Phrases. If you insert a PhraseGroup, such as an integral or binary expression, the active sites that it expects you to fill in, called TargetPhrases, will be highlighted with grey borders, shaded where they have not yet been filled-in by the user. To help you see the (major) PhraseGroup your cursor is located in, an orange bar appears along the top.

To delete a PhraseGroup, you may need to empty some or all of the TargetPhrases first.

Primarily for simplifying SymPy objects, Glypher performs a series of automatic simplifications, such as reducing nested (associative) binary expressions into a single n-ary expression, or cancelling double negatives in a summation.

Commands

To get Glypher to do anything useful, you need to write a command. Commands are split by spaces, normally forming a natural language sentence. For instance, Do followed by a space and an expression is equivalent to calling SymPy's obj.doit() on the equation's SymPy object. Unlike most n-ary expressions, you can usually press the spacebar from deep in a set of nested PhraseGroups and Glypher will assume you want to add a term to the top space-separated expression.

Set A=EXP assign the expression on the right to every future occurance of A
Unset A cancel the above
Sub A=EXP1 into EXP2 substitute A=EXP1 into EXP2
Do A call S.doit() where S is A's SymPy object
Expand EXP1 call S.expand() where S is A's SymPy object
Expand EXP1 about x=0 do a Taylor expansion to order 4 of EXP1 (can add, e.g., ‘to order 5')
Evaluate EXP1 call S.evalf() with optional subsitutions
Evaluate EXP1 at x=0,y=1
Plot EXP1 calls sympy's plot function
Source EXP1 creates a new Source for subsequent plotting in the Plot tab

To execute a command, simply press Return. The statement and response will be added to the list below and can be accessed subsequently through a reference of the form [s4] or [r4], respectively.

Symbols & Alternatives

Many characters have one or more alternatives that can be accessed using Tab (or Shift+Tab, or by holding down Super, usu. Windows key, and pressing Up or Down) when attached to the Symbol. These are, in general, compatible with TeXmacs. All basic Greek characters are obtainable from the Latin characters.

Some phrases may have alternatives, such as a product for a summation. This is indicated by a small, green triangle in the upper-left corner of the relevant Phrase. When attached, the keys above will let you move between the possibilities.

Pasting

Ctrl+Y will let you automatically sympify and render the clipboard text into Glypher.

Keyboard shortcuts

Alt-F insert a fraction
Alt-i insert an integral
Alt-d insert a derivative
^ add superscript; use Ctrl+Super+Right to swap power/index
_ add subscript; use Ctrl+Super+Right to swap derivative/index
Ctrl+( turn preceding word into a function
Alt-c insert a summation
Alt-[ insert a reference to a previous statement or response