Equation Editor

One of the most important objectives for the development of Cassiopeia was to provide a text processing solution with a highly integrated equation editor with the following properties:
  • keystroke based editing of equations (highly efficient)
  • nice presentation on screen for on-screen thinking
  • LaTeX export for publishing in book printing quality
  • MathML content markup based internal representation
  • built-in 2D graph module for immediate plotting of functions
  • built-in symbolic algebra system for equation simplification
The built-in equation editor allows users to enter equations very rapidly by making use of wisely chosen and easy to remember shortcuts (a palette is provided for looking up less frequently used parts and symbols). Equations can be duplicated with a double-click and intuitively edited using cursor keys, backspace, and copy and paste.

Beautifully rendered equations (WYSIWYM) invite scientists and engineers to use Cassiopeia not only as a word processor for preparing stunning publications but also as a think tank tool in the creative process.

LaTeX export is an absolute must for a scientific wordprocessing solution. However, LaTeX is a typesetting language developed for the printing industry to improve the quality of printed publications. It was never meant to be directly used by authors in the content creation phase. Scientists should be able to concentrate on scientific problems instead of spending valuable time on tinkering around with typesetting tags. That's why Cassiopeia hides the LaTeX generation and compilation process as much as possible. Cassiopeia users can influence the LaTeX generation process - e.g. by providing an alternative preamble or inserting pure LaTeX code into the document - but they usually don't have to. Cassiopeia generates stunning output with its default settings and predefined LaTeX preambles.

LaTeX is a description language with focus on presentation. That's fine if the only goal of the authoring process is to get a PDF in book printing quality. However, if functions are to be plotted, if equations are to be processed by a symbolic algebra system another internal representation is needed that precisely describes the mathematical meaning of an equation. That's what MathML content markup was developed for (see W3C Recommendation from October 21st 2003) and why Cassiopeia uses this standard to internally represent formulas.

There are a bunch of graph applications available on the market that can be used to generate a plot for a given function. The exported image files can then easily be imported into any textprocessing system. This might be a viable approach for simple functions but is not practicle for more complex ones with lots of terms and coefficients. Uninterrupted scientific thinking means to simply shift-doubleclick on an entered or automatically derived function in the textprocessing system and get a plot immediately inserted into the text stream.

A palette allowing to easily lookup key strokes or directly insert parts and symbols into the document by double-clicking on a palette entry can be opened with Command-Shift-P. Note, double-clicking on an entry of the palette has an effect in formula mode (Command-y) only.

While it is possible to create equations by exclusive use of the double-click on a palette entry method we recommend to use the palette mainly as a key stroke lookup tool and memorize the key sequences of at least frequently used parts and symbols. This boosts the document writing efficiency significantly and with some training allows to enter and manipulate equations very rapidly.

Natural editing of equations

Open any Cassiopeia document press Enter once or twice to place the cursor on a new line and then press Command-y to create a new equation.
An empty equation is represented by a small gray rectangle. Note that the equation is horizontally centered automatically. Do not insert tabs or spaces in front of or behind an equation. Cassiopeia takes care of the alignment automatically. The blinking black cursor is gone indicating that we are in formula mode now. Type "y" and "=".
Cassiopeia automatically takes care of spacing within equations as well so don't enter spaces or tabs here either. Note the small red cursor. It moves while you type and indicates the current insertion point within the equation. The equation editor is MathML content markup based. This means that Cassiopeia tries to make sense of what you type. The two characters we have typed make no sense so far. Cassiopeia recognizes the equal sign as a binary operator requiring a left and a right operand. We have a left operand but the right operand is not yet specified.

Enter two more charaters: "3", "x". Hit <Return> or Esc to leave formula mode.

Note the autospacing to the left and right of the equal operator. Also note the autospacing between the 3 and the x. Never try to alter this behaviour by inserting spaces and or TABs. LaTeX will take care of presentation issues following its own set of rules anyway when it comes to printing. This allows us to concentrate on content alone.

Now press the left cursor key until the cursor is located directly behind the equation. Then press the left cursor key once again.

This gets us back into formula mode. We have entered the equation from the right. Press the cursor down key and use the left and right cursor keys to navigate through the equation. Place the insertion marker between the equal sign and the 3
and type "5" "x" "+".
Press Enter to leave formula mode. Equations can be entered from left or right using the cursor keys as described above. You can alternatively singleclick with the mouse on any location within an equation to enter formula mode and place the red insertion marker. Click between the equal sign and the 5.
Now hold down the shift key and press the right cursor key twice. The elements within the equation can be selected like characters in normal text mode.

Press Command-x to cut out the 5x. Then press the cursor left key twice to move to the left of the equation sign, enter - and then press Command-v to paste.
Press the cursor right key to navigate to the other side of the equation and remove the superfluous + with Backspace. Then press <Return> to leave formula mode.

Duplicating and simplifying equations

Place the cursor on an empty line and press Command-y to create a new equation. Then reenter the equation from the last section by typing naturally.
Now double-click on this new equation. An exact copy is inserted in the next line.
Delete this copy and double-click on the equation again, this time while pressing down the Alt-Key.
Cassiopeia understands the mathematical meaning of our equation and simplifies automatically. Create another equation by pressing Command-y and in formula mode type z, =, Ctrl-f, 2, Ctrl-g p, <Cursor-up>, <Cursor-right>, 3 <Return>.
Now hold down the Command and the Alt Key while double-clicking on this equation.
Cassiopeia calculates the actual number.

Introducing the equation inspector

We introduce the equation inspector now and make more use of the integrated symbolic algebra system. Create a new equation with Command-y and type: U, (, t, ), =, U, Ctrl-l 0, <Cursor-up>, <Cursor-right>, s, i, n, Ctrl-g, w, t <Return>.
Command-Shift-Doubleclick on this equation to open the formula inspector.

Click on Numbered. The inspector closes automatically and the equation is suffixed with a number.
Command-Shift-Doubleclick on the equation again and click on Boxed. Nothing seems to happen. Press Command-p to generate LaTeX for the document to verify that boxing an equation has an effect in the LaTeX (PDF) output.

Reopen the equation inspector, remove the numbering and instead enter a caption.

Regenerate LaTeX for the document.

Reopen the equation inspector with a Command-Shift-Doubleclick on the equation and deactiva the box again. Then click on Differentiate. Cassiopeia automatically generates the first derivative of the function.
Doubleclick on the last equation, click into the copy and perform the following modifications.

Plotting functions

We want to plot the functions entered in the preceeding section now. Choose SDM - FunctionGraph2D from the menu to insert a function graph. The graph inspector is raised.

Now simply drag the voltage and current functions onto the white textview above the Label, Draw, Factor, Value tableview.

Modify the draw range from 0 to 5 Pi and click on Fine.

Now open Tools - Colors and drag different colors onto the two functions in the Label, Draw, Factor, Value tableview.

A more detailed discussion about the plotting engine can be found in 2D Graphs.

Substituting via drag and drop

We press Command-y and then type Q, (, t, ), =, Q, Ctrl-l 0, <Cursor-up>, <Cursor-right>, e, Ctrl-h, ... to enter the following equation.

Comman-Shift-Doubleclick on this equation to open the inspector and click on Differentiate to calcualte the first (and second) derivative as already demonstrated in an earlier section.

Create another equation. Make use of Ctrl-f to get the fractions.

Now simply drag the function and its two derivatives onto the differential equation.

Alt-Doubleclick on this equation to get rid of superfluous parentheses

and manually simplify the first term.

Vectors and Matrices

Press Command-y to create a new equation and then type F, Ctrl-a v, = m, a, Ctrl-a v.

Create another equation and type r Ctrl-a v, = Ctrl-v 3 <Return> to create the following construct.

Click into the first cell and enter some content. Fill the other cells as well.

A 3x4 matrix can be entered with the parameter stroke Ctrl-x 3,4 <Return>.

Please note the UseArrowForVetors entry on the Environment pane of the Cassiopeia prefences panel.

Specify YES for the value if you prefer vectors to be drawn with a little arrow on top of the identifier instead of using a bold font (common in many European countries).

A quick reference of symbols and parts can be found in Equation Editor Quick Reference and is also available via the palette (Command-Shift-P).
Advanced Science          Terms and Conditions          © Smartsoft GmbH 2015