{"id":1945,"date":"2012-11-08T10:41:38","date_gmt":"2012-11-08T18:41:38","guid":{"rendered":"https:\/\/www.phoenixtechpubs.com\/blog\/?p=1945"},"modified":"2012-11-12T09:37:56","modified_gmt":"2012-11-12T17:37:56","slug":"editing-equations-in-oxygen-xml-editor","status":"publish","type":"post","link":"https:\/\/www.phoenixtechpubs.com\/blog\/index.php\/2012\/11\/editing-equations-in-oxygen-xml-editor\/","title":{"rendered":"Editing Equations in Oxygen XML Editor"},"content":{"rendered":"<p>Editing equations in Oxygen XML Editor version 14.0 was more difficult than we expected. After trying several of the leading MathML editors, we found a versatile, easy-to-use, inexpensive solution.<\/p>\n<p><span style=\"text-decoration: underline;\">Oxygen XML Fragment Editor<\/span><\/p>\n<p><span style=\"color: #333333;\">The Help Pages of <a href=\"http:\/\/www.oxygenxml.com\/\">Oxygen XML Editor<\/a> version 14.0 have this to say about its support for equations:<\/span><\/p>\n<p><span style=\"color: #333333;\">\u201c\u2026 includes a built-in editor for <dfn>MathML<\/dfn> notations. To start the <dfn>MathML<\/dfn> editor either double click a <dfn>MathML<\/dfn> notation or select the Edit Equation action from its contextual menu. In the <dfn>MathML<\/dfn> editor you are able to edit the mathematical symbols of a <dfn>MathML<\/dfn> notation.\u201d<\/span><\/p>\n<p><span style=\"color: #333333;\">Either action opens the XML Fragment Editor window. A few problems with using this tool will surprise the user:<\/span><\/p>\n<ol>\n<li><span style=\"color: #333333;\">WYSIWYG tools for entering new equations are not available.<\/span><\/li>\n<\/ol>\n<p><span style=\"color: #333333;\">MathML is not intended to be written or edited directly; an important reason all XML editors include a wysiwyg editing mode for MathML. This mode in Oxygen is called <em>Authoring<\/em> and is selected using the <strong>Author<\/strong> tab. While in <em>Authoring<\/em> mode, an equation is inserted by selecting <strong>Dita<\/strong>-&gt;<strong>Insert<\/strong>-&gt; <strong>Insert<\/strong> <strong>Equation<\/strong> from the contextual menu. This action opens the <strong>XML Fragment Editor<\/strong> window with the Pythagorean equation as its default. The MathML code that implements this equation is displayed directly below the equation (see the example below). Note that there are no controls or menus in the window for rewriting the equation.<\/span><\/p>\n<p><span style=\"color: #333333;\"><a href=\"https:\/\/www.phoenixtechpubs.com\/blog\/wp-content\/uploads\/2012\/10\/XML-fragment-editor-1.jpg\"><span style=\"color: #333333;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1952\" title=\"XML fragment editor 1\" src=\"https:\/\/www.phoenixtechpubs.com\/blog\/wp-content\/uploads\/2012\/10\/XML-fragment-editor-1.jpg\" alt=\"\" width=\"622\" height=\"627\" srcset=\"https:\/\/www.phoenixtechpubs.com\/blog\/wp-content\/uploads\/2012\/10\/XML-fragment-editor-1.jpg 622w, https:\/\/www.phoenixtechpubs.com\/blog\/wp-content\/uploads\/2012\/10\/XML-fragment-editor-1-150x150.jpg 150w, https:\/\/www.phoenixtechpubs.com\/blog\/wp-content\/uploads\/2012\/10\/XML-fragment-editor-1-297x300.jpg 297w\" sizes=\"auto, (max-width: 622px) 100vw, 622px\" \/><\/span><\/a><\/span><\/p>\n<p><span style=\"color: #333333;\">2. It is difficult, if not impractical, to edit equations using its wysiwyg feature.<\/span><\/p>\n<p><span style=\"color: #333333;\">The red box enclosing the equation is the only hint of possible wysiwyg editing capability. You can point-and-click on a component of this equation so the red box surrounds it and then make a simple change in code below it. For example, you can select each \u201csquared\u201d term and change it to \u201ccubed\u201d. Or you can change the \u201c+\u201d to \u201c-&#8220;. But you cannot insert complex operators.<\/span><\/p>\n<p><span style=\"color: #333333;\">3. Although the bottom half of the window allows editing an equation via its MathML code, the code quickly becomes intractable as expressions become more complex.<\/span><\/p>\n<p><span style=\"color: #333333;\">The MathML displayed in the <strong>XML Fragment Editor<\/strong> window is the same non-wysiwyg view as would be seen if you had selected the <strong>Text<\/strong> tab. The user could, in theory, enter a new equation by making changes to the default equation in <em>Text<\/em> mode. But, as has been said, MathML is not intended to be written or edited directly. The complexity of the code just for the default equation makes this apparent. Also, you can also see the difficulty of locating components to make even simple edits in an existing complex equation that someone else has entered into the document, as shown\u00a0 in the screen capture below.<\/span><\/p>\n<p><span style=\"color: #333333;\"><a href=\"https:\/\/www.phoenixtechpubs.com\/blog\/wp-content\/uploads\/2012\/10\/XML-fragment-editor-2.jpg\"><span style=\"color: #333333;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1958\" title=\"XML fragment editor 2\" src=\"https:\/\/www.phoenixtechpubs.com\/blog\/wp-content\/uploads\/2012\/10\/XML-fragment-editor-2.jpg\" alt=\"\" width=\"602\" height=\"900\" srcset=\"https:\/\/www.phoenixtechpubs.com\/blog\/wp-content\/uploads\/2012\/10\/XML-fragment-editor-2.jpg 602w, https:\/\/www.phoenixtechpubs.com\/blog\/wp-content\/uploads\/2012\/10\/XML-fragment-editor-2-200x300.jpg 200w\" sizes=\"auto, (max-width: 602px) 100vw, 602px\" \/><\/span><\/a><\/span><\/p>\n<p><span style=\"color: #333333;\">Because we found the Oxygen XML Fragment Editor impractical for editing MathML, we researched other MathML editing options.<\/span><\/p>\n<p><span style=\"text-decoration: underline; color: #333333;\">MathFlow<\/span><\/p>\n<p><span style=\"color: #333333;\">The makers of Oxygen XML Editor recommend the <a href=\"http:\/\/www.dessci.com\/en\/products\/mathflow\/\"><em>MathFlow<\/em><\/a> plugin from Design Science for a fully functional MathML authoring tool.\u00a0 The interface is easy to use and familiar to anyone who has entered equations in MSWord. However, the MathFlow plugin was incompatible with our client&#8217;s specialized build routine to output pdf and html failed, making the tool unusable for us.<\/span><\/p>\n<p><span style=\"text-decoration: underline; color: #333333;\">Web Equation<br \/>\n<\/span><\/p>\n<p><span style=\"color: #333333;\">At the <em>Web Equation<\/em> web-site (<a href=\"http:\/\/webdemo.visionobjects.com\/equation.html?locale=default\">http:\/\/webdemo.visionobjects.com\/equation.html?locale=default<\/a>), an equation can be moused onto a grid, like drawing onto legal pad (see below). A print-quality image of the equation is rendered below the grid, to confirm the moused input. The MathML code is displayed by clicking on the <strong>MathML<\/strong> tab. This code can then be copied from the web-site and pasted directly into the XML document while in <em>Text<\/em> mode. Or it can be pasted into the document while in <em>Authoring<\/em> mode via the <strong>XML Fragment Editor<\/strong> window. However, with either method, our XML schema requires \u201cm:\u201d prefixes that are missing from the code supplied by <em>Web Equation<\/em>. For example, &lt;mrow&gt; and &lt;\/mrow&gt; tags should be &lt;m:mrow&gt; and &lt;\/m:mrow&gt;. To solve this problem as efficiently as possible, we copied the code into Notepad, used Notepad\u2019s Find\/Replace function to replace all instances of &lt;m and &lt;\/m with &lt;m:m and &lt;\/m:m, then copied-pasted this result into the XML document.<\/span><\/p>\n<p><span style=\"color: #333333;\"><a href=\"https:\/\/www.phoenixtechpubs.com\/blog\/wp-content\/uploads\/2012\/10\/We-Equation.jpg\"><span style=\"color: #333333;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1961\" title=\"We Equation\" src=\"https:\/\/www.phoenixtechpubs.com\/blog\/wp-content\/uploads\/2012\/10\/We-Equation.jpg\" alt=\"\" width=\"646\" height=\"365\" srcset=\"https:\/\/www.phoenixtechpubs.com\/blog\/wp-content\/uploads\/2012\/10\/We-Equation.jpg 646w, https:\/\/www.phoenixtechpubs.com\/blog\/wp-content\/uploads\/2012\/10\/We-Equation-300x169.jpg 300w\" sizes=\"auto, (max-width: 646px) 100vw, 646px\" \/><\/span><\/a><\/span><\/p>\n<p><span style=\"color: #333333;\">We found<em> Web<\/em><em> Equation<\/em> to be of limited use, not just because of the extra step needed to add element prefixes, but also because many attempts were needed before the rendered equation was correct.<\/span><\/p>\n<p><span style=\"text-decoration: underline; color: #333333;\">Mathematics StackExchange<\/span><\/p>\n<p><span style=\"color: #333333;\"><a href=\"http:\/\/math.stackexchange.com\/\"><em>Mathematics StackExchange<\/em><\/a> is a mathematics question and answer website (http:\/\/math.stackexchange.com\/search?q=serial+summation). We searched and found summation equations similar to what we wanted. The MathML code for any equation at that website can be displayed by right-clicking the equation. Then the code is entered into the XML document using the same steps as described for <em>Web Equation<\/em>. Of course, because it is unlikely that any of the equations available at <em>Mathematics StackExchange<\/em> will be an exact match to what is needed, editing is generally required, which is a non-trivial effort using either Notepad or the Oxygen editor.<\/span><\/p>\n<p><span style=\"color: #333333;\"><a href=\"https:\/\/www.phoenixtechpubs.com\/blog\/wp-content\/uploads\/2012\/10\/MathJax.jpg\"><span style=\"color: #333333;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1963\" title=\"MathJax\" src=\"https:\/\/www.phoenixtechpubs.com\/blog\/wp-content\/uploads\/2012\/10\/MathJax.jpg\" alt=\"\" width=\"484\" height=\"412\" srcset=\"https:\/\/www.phoenixtechpubs.com\/blog\/wp-content\/uploads\/2012\/10\/MathJax.jpg 484w, https:\/\/www.phoenixtechpubs.com\/blog\/wp-content\/uploads\/2012\/10\/MathJax-300x255.jpg 300w\" sizes=\"auto, (max-width: 484px) 100vw, 484px\" \/><\/span><\/a><\/span><\/p>\n<p><span style=\"text-decoration: underline; color: #333333;\">MathType<\/span><\/p>\n<p><span><a href=\"http:\/\/www.dessci.com\/en\/products\/mathtype\/\"><em style=\"color: #333333;\">MathType<\/em><\/a>, also from Design Science, has the same user-friendly interface as <em>MathFlow<\/em> and its MathML coding includes compatible namespace prefixes. The user enters the equation using a complete set of mathematic operators and templates displayed at the top of the <strong>MathType<\/strong> window, then only has to copy the equation rendered in the window and paste directly into the XML document. Our build routine worked perfectly. We chose <em>MathType<\/em>\u00a0 as our primary MathML editor because it provides all the functionality we need and, because it is not a plugin, doesn&#8217;t break the Oxygen editor.<br \/>\n<\/span><\/p>\n<p><span style=\"color: #333333;\"><a href=\"https:\/\/www.phoenixtechpubs.com\/blog\/wp-content\/uploads\/2012\/10\/MathType.jpg\"><span style=\"color: #333333;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1965\" title=\"MathType\" src=\"https:\/\/www.phoenixtechpubs.com\/blog\/wp-content\/uploads\/2012\/10\/MathType.jpg\" alt=\"\" width=\"399\" height=\"273\" srcset=\"https:\/\/www.phoenixtechpubs.com\/blog\/wp-content\/uploads\/2012\/10\/MathType.jpg 399w, https:\/\/www.phoenixtechpubs.com\/blog\/wp-content\/uploads\/2012\/10\/MathType-300x205.jpg 300w\" sizes=\"auto, (max-width: 399px) 100vw, 399px\" \/><\/span><\/a><\/span><\/p>\n<address>\u00a0<\/address>\n<address>\u00a0<\/address>\n<address><span style=\"color: #333333;\">Grandy is a senior technical writer at Phoenix Technical Publications. Phoenix Tech Pubs has provided complete technical writing and documentation services in Oakland and the San Francisco Bay Area for over 25 years.<\/span><\/address>\n<p><span style=\"color: #000000;\">\u00a0<\/span><\/p>\n<p><span style=\"color: #000000;\">\u00a0<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Editing equations in Oxygen XML Editor version 14.0 was more difficult than we expected. After trying several of the leading MathML editors, we found a versatile, easy-to-use, inexpensive solution. Oxygen XML Fragment Editor The Help Pages of Oxygen XML Editor version 14.0 have this to say about its support for equations: \u201c\u2026 includes a built-in &hellip; <a href=\"https:\/\/www.phoenixtechpubs.com\/blog\/index.php\/2012\/11\/editing-equations-in-oxygen-xml-editor\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Editing Equations in Oxygen XML Editor<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":8,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[67,159],"tags":[156,189,190,191,155,192],"class_list":["post-1945","post","type-post","status-publish","format-standard","hentry","category-grandys-blogs","category-technical-writing-and-documentation","tag-dita","tag-mathml","tag-oxygen","tag-oxygen-xml-editor","tag-xml","tag-xml-editor"],"_links":{"self":[{"href":"https:\/\/www.phoenixtechpubs.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1945","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.phoenixtechpubs.com\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.phoenixtechpubs.com\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.phoenixtechpubs.com\/blog\/index.php\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/www.phoenixtechpubs.com\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=1945"}],"version-history":[{"count":38,"href":"https:\/\/www.phoenixtechpubs.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1945\/revisions"}],"predecessor-version":[{"id":2028,"href":"https:\/\/www.phoenixtechpubs.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1945\/revisions\/2028"}],"wp:attachment":[{"href":"https:\/\/www.phoenixtechpubs.com\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=1945"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.phoenixtechpubs.com\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=1945"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.phoenixtechpubs.com\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=1945"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}