Math Editing Within Jane

The objective is to permit programming using Math expressions, therefore a simple-to-use math equation editor must be designed and built.

The reason we want Math equations in programming is so we can read the logic.  This editor is not to save minutes of editing time,
but rather man-years of effort in software development time.

The Jane system will have an editor for the creation of scripts. It will be a standard text editor with one major exception, it will permit
the editing of complex math expressions. These expressions are then evaluated and executed by the compiler.
This editor will be the basis of all editing done by all Jane supported forms, prompts and scripts.

These Math Arrow Keys will supplement the standard four arrow keys of Up/Down/Left/Right.
A re-purpose of the Keypad will work until the keyboard can be manufactured, using the 7,8,9, 4,6, 1,2,3 keys.

The design of the editor is to permit moving into six positional regions from the current cursor position, and to move left and right within these six regions.

The standard arrow keys move to the next base character. If the cursor is in a positional region then the cursor moves back
into the base region at the next character. The standard arrow keys act as if the positional regions do not exist.

Each of these regions then have 6 positional regions of their own, and so on, and so on,....
This means you can have sub-scripts of sub-scripts of sub-scripts,...

Expression Regions: are determined by the current cursor position or by the current selected characters.

In the first case, of no selection, the region is determined by the previous or next character depending on the operator being performed:

  • if the character is a quantifier then the region is found by finding the matching starting quantifier
    parentheses ( ),  braces { } ,  brackets [ ],  absolute | |, others
  • if the character is not a quantifier, then the expression region is the previous single character

This might add quantifiers where not needed but you will see that for division, square root, and other grouping the markers can sometimes be removed by their replacement.

An expression is defined as the expression region and all of its subordinate regions:

Operators of an Expression

  • Division (keypad /)  this will divide the expression with another expression
    this then defines another expression which is enclosed in parentheses
    The parentheses are there for visual reference during editing. They might become
    unnecessary, but for now they seem required.

** the sub-regions of A and B are not shown. Operators (+ - *) might not require sub-regions, TBD  (to be determined)

Once the editor is written, the cursor position will be structured to better fit expected results.

  • Square Root (keypad *)

24 Greek Character:


Α α, Β β, Γ γ, Δ δ, Ε ε, Ζ ζ, Η η, Θ θ, Ι ι, Κ κ, Λ λ, Μ μ, Ν ν,
Ξ ξ, Ο ο, Π π, Ρ ρ, Σ σ/ς, Τ τ, Υ υ, Φ φ, Χ χ, Ψ ψ, and Ω ω.


Mapped to keyboard <ALT> A - X

Over and Under regions:  

For building of compound characters, such as an overline, underline, or others.
This is to reduce the size of our fonts, and permit the user far greater flexibility in expression building and variable naming conventions.
The over / under characters become qualifiers to the character, and therefore provide unique naming conventions and searchable expressions.

Customizable Fonts:

Due to the limitations of Unicode and to our font technology, a simplified font library will be designed to permit character creation.

This will allow a user to quickly create characters that can supplement the programming of math equations and will be permanently attached to the document.


box = character{ polygon{0:0,0:20,20:20,20:0,0:0},  polygon{0:20,5:25,25:25,20:20,0:20},  polygon{20:0,20:20,25:25,25:5,20:0} };

star = character{ polygon{5:0,4:2,2:2,2:4,0:5,2:6,2:8,4:8,5:10,6:8,8:8,8:6,10:5,8:4,8:2,6:2,5:0}}

using multiple a key stroke entry of /box/ and /star/ to display as above
The editor may support a popup selection prompt... Maybe use Keypad "0" (ins) to activate the popup. TBD (to be determined).
The editor may support keyboard remapping and macros. TBD

The examples here are simple, any character or diagram can be created.

(toggle between the tag or the character display using a button in the editor)

I will not be using Unicode or ASCII character encoding. I will be creating a character set specific for programming Math equations and for
better search, universal display, and for more functionality.
Since fonts will no longer be in a proprietary format, they are just editable text,
any language character set can be easily created using any text editor. The design of characters will be based on purpose not influenced by past conventions.
Since I will be writing the editor, the character display, and the printing, I can start over.

Single Character Math Expressions Multiply:

Much of our math expressions use single character representations. The Jane compiler can perform name resolution at this level.
I will tag the function as "math" to ensure proper algebraic evaluation.

math function test()


DX = 4 sq yards
A = 56 feet;
B = 247 inches;
C = AB + DX;
D = 27 sq feet;
E = C(D + 1);




E  = 528.2962962962962 sq yards

Extended Character Qualifiers:

Since an editor is being designed and built, then I might as well do it right. I will extend the characteristics of the "character".

Currently we only have one characteristic defined: is it upper or lower case this was done due to the font library design built in 1960.
Adding these characteristics will permit full control of the display. This will also permit greater search queries (search by color, bold, case, ...)

These are the characteristics that will be added to each character:

  1. Upper Cased*
  2. Stroke Color
  3. Fill Color
  4. Background Color
  5. Bold
  6. Italic
  7. Size
  8. Strikethrough
  9. Highlight
  10. Slant
  11. Border
  12. Nationality
  13. Spacing
  14. Font **

The underline and overline characteristics are being done within OVER and UNDER sub-regions.  When editing within any of these regions
the keyboard can be mapped to the commonly used overhead character set  ( ˇ ˉ ˋ ̋  )*** or underline character set (ˌˍˎ˯˰˱˲˳) ***
After looking this over we only need one set of characters to handle both the upper and lower regions, I will just position them accordingly.
The design to the character characteristics will be optimized for space and for hardware implementation and functionality.

* Case is only defined for A-Z and Greek characters.

** System Fonts (truetype, type-1,...) are not expected to be used at this time, only one programming font will be available.
    I need much more information than is available in the current font technology.

*** a set of keyboard stickers will be made to include the over / under character sets as a visual aid for editing

Extended Math / Science Characters:

The basic character set will be extended to include some of the basic math and scientific characters

√ ∩ ∑ ∆ ∂ ↄ ≈ ∞ ≠ ≤ ≥ ∫ ∠ ∓ ∇ ∗ ╳ ∬ ∭ ∿ ∡ ∢ ∱ ∲ ∴ ← → ↑ ↓  ↕ ÷

⬤ ☉ ⦶ ⦷ ⊛ ♆ ⊛ 🜍 ♁ ♂

More quantity characters will be added besides the existing ones (...), {...}, [...], <... >, |...|

├ ... ┤,  ↱...↰  ...

Extended Currency Symbols:

The basic character set will include units of currency

$ ֏ ؋ ৳ ৲ ૱ ௹ ି ៛ 元 円 圆 圓 ﷼ ₠ ₡ ₢ ₣ ₤ ₥ ₦ ₧ ₨ ₩ ₪ ₫ ₭ ₮ ₯ ₰ ₱ ₲ ₳ ₴ ₵ ₶ ₷ ₸ ₹ ₺ ₻ ₼ ₽ ₾ ₿

Here are 49 documented currency symbols

Currency conversion is part of the Jane system. The frequency and security of unit conversion is user defined.
Snicker-Net is best (here is a 5 1/4" floppy of this hour's rates), or tied to a secure service, or using a public access service for ball park decision inquires.


Extended Soft Control Characters:

The need to program control characters is a large part of any application.
I will be including a set of text editable control characters that will be interrupted by the compiler into their related hard control character numeric representation. 
This will eliminate the need for escape sequences in our text constants.

  1. Line Feed
  2. Form Feed
  3. Tab
  4. Carriage Control
  5. Start of Text
  6. End of Text
  7. Section Separator
  8. Record Separator
  9. Field Separator

A = "Hello World";

Redesign of some of the Characters:

The character zero and O, I and L, and some of the English and Greek characters look the same.
I will redesign every character so they can always be properly identified.


Font Size Limitation Removed:

The size of a character is often limited to 1 to 2 inches (72 to 144 points), I will remove this limitation.
Math expressions often cross multiple logical lines and will require quantity brackets that will exceed
the maximum size supported by most editors.

Voice Commands:

A small set of voice commands might be helpful.

Subordinate Region Control Characters:

  1. Start sub-regions
  2. Upper Left
  3. Upper Right
  4. Bottom Left
  5. Bottom Right
  6. Over
  7. Under
  8. End sub-regions
C = 3(A + B)2xi    internally looks like    C = 3(A + B)2xi
  • All six sub-regions always follow the character that they apply to, for quantities, it always follows the terminator.
  • There is no specific order to the sub-regions
  • Characters in a sub-region can also have their own sub-regions to any depth
  • Quantity characters ( ) { } [ ]  define that the sub-region expressions will be applied to their content
  • Summation, integral, nth root will precede the character or quantified characters
  • Division denominator will follow the DIVIDE character ()

Keyboard Driver:

To handle all keyboard keys for the purpose of editor, it will be required to ensure absolute control of the keyboard input.

The pseudo (not really a devise driver) keyboard driver will be mapped through the compiler. The keyboard hardware
contains specific codes for each of its keys, however these codes are OEM specific.  Therefore I shall identified them as labeled.

We will need to specify the keyboard style to provide compatibility.

This is a 104 keys keyboard (my editor needs to accept images)
With the image there are no mistakes. An attached label area will always be available to program the meaning of the image. = 104 keys keyboard

caps lock
alt left
keypad enter

I do this so you can look at the keyboard, not documentation, to make adjustments.

The hardware manufacture will provide the key codes to the system, the system will then provide them to Jane,
Jane will then remap them for you, for you to map functionality to the compiler and to the editor.

The main purpose is to remap character sets to the keyboard. The remapping will be
accomplished using ctrl, shift, alt or other multiple key setup combinations.

Some of the remapping character set disciplines are:

  • Nationality Alphabet, Number Sets (English, Russian, Chinese,...)
  • Math Operator Symbols
  • Greek Characters
  • Currency Symbols
  • Chemistry Symbols
  • Geometry Symbols
  • Set Theory Symbols
  • Weather Symbols
  • Statistics Symbols
  • Soft Control Characters
  • Hard Control Character
  • Astronomical Symbols
  • Philosophy Logic Symbols
  • Boolean Logic Symbols
  • Flow Chart Symbols
  • Document Editing Symbols
  • Music Symbols
  • Dance Symbols
  • Process Control Symbols
  • Thermal Physics Symbols
  • Mechanics Symbols
  • Botanical Symbols
  • Electricity and Magnetism Symbols
  • Space and Time Symbols
  • First grade teaching aid symbols...
  • ...

I expect some on-screen popup menus to help, until memorized and/or use of keyboard stickers.
I may color code (on-demand) each discipline for easy user validation. (i.e. Black background
for Space and Time Symbols, Blue background for Chemistry Symbols, etc)

These keys assignments can be added permanently to the document.
These assignments then tell the compiler the specific use of each character in context.

Jane Character Libraries will be segregated by category (i.e. Language, Math, Dance, Set Theory)
not by font style. Each library then could contain multiple font styles. (i.e. Arial, Courier, Times Roman,...).
Most of our symbology characters do not need to be repeated across font styles, this will drastically reduce
the work in font creation, in display logic, in compatibility issues, and in being able to find them. This means
we can have one set of Math symbols and thousands of alphabet font styles.

The Alphabet and Numbers are separated into sub-sections within the Nationality Character Library:

  • Nationality (Library Name: English, Spanish, Russian, Chinese,...)
    • Character Style (Arial, Times Roman, ...)
      • Numbers
      • Alphabet
        • Upper Case characters
        • Lower Case characters
      • Keyboard characters  (!@#$%^&*()_+-=`{}[]<>,./?)\
      • Classified Groups (not required, if not found use defaults)
        • Music
        • Math
        • Currency Symbols
        • Accent Marks
        • Soft Control characters
        • Hard Control characters
        • ...
  • Classified Character Groups (Library Name: Music, Math, Currency, Accent Marks...)
    • Character Style (Arial, Times Roman, ...)

Keyboard Compiled Logic:

Each keyboard key can now be assigned logic plus their specific attributes and capabilities.
These will be attached to the document so they are portable and become instructions to the editor
and to the compiler.

Editor.keyboards += keyboard{Math{background-color=green, setup=alt-M,
				ctrl-P{π, value=3.1415926 radian degrees}

Diagrams ( Unified Modeling Language - UML) in programming:

Possibly using the same keyboard arrow logic of the math equations. I hate being forced to jump between the keyboard and the mouse.
It would be nice to have the options to stay on the keyboard. Also it would be nice to have the diagram automatically arranged.

Numbering schemes work great. Draw the cartoon, tag each unit, then type in the instructions for each tag. The less work
required on the graphic representation the better.

	A = diagram{ placement{ A => B; 
				B => C, D, E, F;
				D => A;
				AB => G (west)}}

Of course we get into the traveling salesmen problem, but the mouse is still available. We also have the option
of doing this in 3D.  The cartoon (diagram) does not have to accurately depict the network, drill down is also available.

Some thoughts:

  • Child Placement by Quadrant (N, S, E, W, SE, SW, NE, NW)
  • Row and Column Reference Locations (AB => G (row A, west))
  • Known Structures (B trees, Black Red trees, AVL Trees, Genealogy, Hierarchical,...)
  • Known Organizational Shapes (Boxed, Circular, Oval, Grid,...)
  • Combination of sub-diagrams

Margin and Tab Rulers:

Text editing of column aligned tabular data will be done with a "Ruler"


Any number of rulers can be inserted at any point in the document. They permit editing of text in columns by tabbing to the next tab position on the ruler.
The left and right margins are also indicated. Each ruler controls the placement of the text that follows until another ruler is encountered.

Image Editor:

Images may be placed in the document and edited. All images have no loss of resolution.

The types of Images:

  1. Programming ICONS (bitmap / vector)
  2. Helpful Pictures within the document (bitmap / vector)
  3. Characters (vector)

Data Entry Grids:

  1. Printable
  2. Screen digitizing snap grids
  3. Character Specific
  4. 3D

Form Editor:

A dialog forms and popup menu editor.  Most of programming logic is based on the 4 popup dialogs provided by HTML (prompt, confirm, select file, upload image).

With a combination of the diagram placement logic, and value editor / display representation, many of the required data entry forms can be constructed and included in the document.