Task ma-2: Create an OQMath notation for meter

This task describes the identification of an appropriate symbol and declaring its notations for input in QMath.

Prerequisite:

Task steps

  • we first need to find a symbol that satisfies our goals, a symbol that denotes meters for this we need to follow the (future) task identification-of-the-symbol which is not fully implemented, it’d be something such as

    • go in your web-browser, open the ActiveMath main menu, make sure you are logged-in as an author
    • open the search tool, enter the string id:metre (we search for items having an id containing the characters metre)
    • the first result should be a symbol with title metre (or an equivalent translated)
    • open this first result, get a little description, click the more link below
    • get the theory name, collection-name, and id-name
  • we now know that we wish to input OMS elements pointing to the symbol metre of the theory unitsmetric1_ of the collection openmath-cds (a rendering and more info can be seen in your ActiveMath, can be seen on the official demo or can be seen in the OpenMath website. Let us attach the input m when in QMath math-mode, to this symbol.

  • open, inside the oqmath directory, the file notations.qmath (this file is the center of all notations for QMath in the default collections)
  • add, at the very end of this file, the following line:

    Symbol: m SYMBOL "units_metric1:metre"

which will indicate to QMath that that letters m will be translated to<OMS cd="units_metric1" name="metre"/>. It also tells QMath that this symbol is not an operator to be applied somewhere.

  • let us type such into the item hello-world inside first.oqmath. Please open this file, find the item, then find, inside it, the closing-tag </CMP>
  • go to jEditOQMath, in the file first.oqmath
  • place the cursor just before the </CMP>
  • right before this insert the following lines:

    <br/>This is a metre: $m$

    <br/>This is two-and-a-half metres $2*m$ which is $2*x$ where $x$ is a meter.

  • save your file (press the pen or invoke C-S)

  • click the AntFarm tab on the left
  • select collection, ActiveMath Publishing build file
  • press the running man
  • wait till it says `BUILD SUCCESSFUL
  • go to your browser
  • open the book Complete Recbook
  • see your axiom there, find the last lines and see the two occurrences of m
  • please hover your mouse of the m, some occurrences show the right tooltip
  • please also note the fact that 2m shows without a dot whereas 2x does, this is an effect of the notations’ prototypes