One day, MyWord might be a python library for input and display of text, with features resembling a mixture of a word processor and a formula editor. In principle, it could also be a full word processor. It could even be the fastest and coolest word processor ever. But currently, it is a plug-in for the drawing program Sketch/Skencil .
A screenshot from an old version showing a bug with the selection.
A screenshot from the latest version comparing the display of sketch to the postscript output.
The usage differs a bit from the common word processor standard. Also, functionality is more important than user-friendliness at the moment. Hence the usage requires a bit of explanation.
There are two important concepts in MyWord: Containers and Boxes. The root for example is a container since it could contain the string 'a+b'. Actually 'a+b' is also a container, a string container. Generally, containers can contain other containers and glyphs, in one word: text elements. Boxes come into play when containers lay out their content material. In the root example, the root needs to know how much space to reserve for the term 'a+b'. This is communicated to the root container in the form of one or several boxes. For some elements, e.g. the layout container the user can manipulate box size or position.
The image below shows a root with the content boxes marked.
Input of characters, Tab and Return is as usual. Complex text elements as e.g. formulae elements are created using the input box. In fact, everything even ordinary characters can be input using the input box.
MyWord accepts the following shortcuts for input:
Keys for navigation:
Itemization is switched on and off from the context menu (right click). The level of indentation is determined by the number of tabs at the beginning of the paragraph. This is similar as for example in Abiword.
The indentation can be modified using the menu from the Parameter Window:
Indent length gives the width of the indentation per step. Hanging indentation can be reached using the "Auto Hang Indent" button. When selected, the broken lines are indented according to the begin of the paragraph as shown below.
If "Auto Hang Indent" is not selected, the indentation is determined by the settings of lmargin2. See ruler for an explanation.
Everything is a bullet! Any part of the text can be used as a
bullet as shown in the specially senseless example below.
Bullets are set via the clipboard. Copy your preferred bullet to
the clipboard and then make it a bullet by clicking the "From
Selection" button in the Parameter Window:
The ruler has four sliders for specifying margins: indentation of the first line (lmargin1, mark a), the following lines (lmargin2, mark b), the total width (mark c) and the right margin (mark d). Total width marker and right margin marker can be switched off. In the case that both are enabled, the smaller value is used for line breaking. When both are disabled, lines are not broken.
Left clicking the ruler bar creates tab stops, right clicking deletes them and center clicking changes the alignment.
The parameter window is an idea I like very much. It gives the user a feeling for the hierarchic structure of elements in the text. It allows to access all elements at the position of the cursor. In the example above, the frame is the outermost element. It contains (from left to right) the lines container, which itself contains the root container, which finally contains a string container. Actually, the string container is not shown since it does not have any parameters to adjust.
The Input Box is a container element which allows to execute commands. Currently this is the creation of text elements. For example, typing
followed by a space will create an embedded frame. Most text element can be created this way. The namespace concept should be familiar to python users. In the example, "Container" is the namespace and "Frame" is the name of the element in that namespace. There are more namespaces, for example "Glyphs.Symbol" contains characters of the font symbol.
Since this would mean a lot to typing, the Input Box has built in command completion. Pressing the Tab key once completes the input, pressing tab twice pops up a window of possible completions.
The Frame is a very versatile tool.
Even if the table and the matrix element are not implementation thus
far, it is possible to fake them using frames as shown below.
Frames can be aligned at the , at the , at the or .
Frames can also have fill and border.
The content of a position container can be shifted vertically and horizontally freely. This can be used to fine tune of character separations, to produce initials or even to stack text elements on top of each other.
Stretch Container shrink or stretch the white space between their content elements. This can be used to emulate ligatures as .
With the 0.6 version of Sketch/Skencil texts can look rather ugly. This is not the fault of MyWord or Sketch, but probably of the X-server. Of cause, this only affects the screen representation and not the printout. Below are a couple of examples with the corresponding ghostview screenshot.
Note that the font metrics are wrong: the product symbol is not typeset exactly in the box. Also in the ghostview screenshot (right image) this is slightly wrong. Interestingly, the font metrics for the conventional Pi are correct.