Ket (software)
{{multiple issues|
{{how-to|date=May 2015}}
{{overly detailed|date=May 2015}}
{{more citations needed|date=May 2025}}
}}
{{Infobox software
| name = Ket
| screenshot = Image:Ket trig example.png
| operating_system = Cross-platform (multi-platform)
| latest release version = 0.5.05
| latest release date = {{start date|2015|3|22}}
| programming language = Java
| genre = Computer algebra system
| license = GPL v2
| website = [http://sourceforge.net/projects/ket/ sourceforge.net/projects/ket]
}}
Ket is an open source algebra editor. It is distinct from editors like Mathematica and Maple and from typesetting systems like LaTeX in that its focus is primarily on interactivity, providing various features to allow for easy manipulation of algebraic equations, with the goal of providing a convenience comparable to text editors or handwriting.{{Cite web |title=What is Ket |url=https://ket.sourceforge.net/overview.html |archive-url=https://web.archive.org/web/20250421195139/https://ket.sourceforge.net/overview.html |archive-date=21 April 2025 |access-date=21 April 2025 |website=Ket.sourceforge.net}}
Overview
Ket breaks the process of equation editing into a series of small edits performed either with the keyboard or with mouse gestures.
Commands exist to delete, reorganize and combine existing expressions as well as to add new symbols or expressions. Equations often contain a great deal of repetition which can make it faster to reuse existing expressions than re-write them. Commands provide instantaneous updates enabling the user to view an equation in conventional mathematical notation while interacting with it as a series of small fragments.
Representations
File:A representation of an equation as a tree data structure.png
Ket maintains three distinct representations of an equation. First, equations are displayed to the user and may be exported in images in conventional mathematical notation. Second, internally it is more efficient to represent the equation as a Tree structure which standardizes direction commands. Third, when writing equation fragments or saving them to file, a custom markdown language is used which merges markdown, LaTeX and plain text mathematical notations as applicable.
Conventional mathematical notation is represented by a series of boxes within boxes each containing letters and lines to denote what function, operation, variable or value they represent. After each edit, equations are converted to this form and rendered.
However, edit commands represent the equation differently and keyboard direction commands reflect this. Analogous to a filesystem hierarchy of files and folders within folders, each equation is represented as a Tree structure. Each equation in Ket is a tree of operations and functions (tree branches) and variables and values (tree leaves).
The file format consists of its own, non-standard markdown language. Also, when editing, any equation fragments are typed in plain text and converted to the tree. The equation is represented in memory and converted to a tree map in order to display it to the user. The file format is plain text which is converted to and from a tree when files are loaded and saved.
Interaction
Various forms of interaction are possible. These include reorganizing the tree structure and performing simple algebraic operations. Mouse drags allow the user to change the order of arguments to a function. They can also add and remove fragments of an expression into another equation including substituting for a variable. While a plain text representation of pages of equations can quickly become unwieldy, working with small fragments of plain text are a quick way to replace, identify or update an existing selection. If good writing is rewriting then good algebra is reorganizing existing expressions.
Editing
The quickest form of editing is by mouse gestures to substitute one equation into another. Additionally, either through the right click menu or right-dragging in the menu items direction, arguments may be deleted, copied or added.
Ket is a modal editor which means that it changes how it displays information and how the user interacts with it depending on the mode it's in. By default, keyboard commands perform specific selection or transformation commands such as to delete the current selection, 'x'. Some commands must be followed with a direction, for example paste, 'p'. Other commands require a block of text such as to replace the selection with an equation fragment, 'r'. Editing lines of text The editor displays a list of lines of either text, equations, images or plots. In order to edit text,
All editing takes place relative to the current selection so a variety of commands to change the selection are provided. In order to move around, it is possible to use arrow keys, however it is quicker to keep your hands in the touch typing position so various keys signify directions. In addition to moving up, 'k', and down, 'j', between equations, it is possible to move in and out of each equation. That is, to select different parts of the tree. 'h' and 'l' select the previous and next expression while 'i' and 'o' select the left and right arguments of the tree. Lastly,
After pressing a command that requires an equation fragment, the program changes mode. Here a plain text representation of an equation fragment may be typed. This mode also allows Readline commands familiar to Bash and Emacs users.
This is then converted to an equation fragment by pressing
:
using
Commands such as replace require fragments of an equation to be represented in plain text.
Often a text fragment has already been typed and may be referred to. If the fragment exists in the current equation then use "\address" (a backslash followed by an address without quotes). Here successive digits of an address refer to the nth argument.
Similarly, existing equations may be referred to as "#1" for equation 1 etc. And an address within another equation referred to as "1#234" for the 2nd argument's 3rd argument's 4th argument within equation 1.
References
{{Reflist}}
External links
- [http://sourceforge.net/projects/ket/ Ket Sourceforge project page]