Sometimes I have to put text on a path

Friday, July 8, 2011

All about "How to post mathematics?" mathML, LaTeX, MathJax with Chrome/Firefox and Best online/offline rich text editors (webmail, word processor); Comparison of off-line on-line HTML/text editors and browsers.

outline:
1-----free and multi-platform HTML editors
2-----Rich text/html editors inside blogger, Gmail, Knol, wordpress.com, webmail...
3-----Web-based word processor
4---- Two commercial applications & free equation editors
5-----Browsers and MATHML viewers
6-----Free javascript library for math on web pages: JavaScript display engine for mathematics that works in all browsers.
 

7-----Some interesting links 


8-----Inserting Characters (unicode, Math Font Styles)



How to post mathematics or web applications with mathematica and matlab, see :
http://ex-ample.blogspot.com/2011/06/web20-services-mathematica-and-matlab.html

How to post mathematics in wikipedia or in MediaWiki? , see:
http://ex-ample.blogspot.com/2011/07/mediawiki-api.html
An "ex-ample" : the online  NIST Digital Library of Mathematical Functions {Abramowitz and Stegun’s (1964) Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables}.
http://ex-ample.blogspot.com/2011/07/best-ex-ample-nist-digital-library-of.html

read this article (@1999, updated 2002) :
Approaches to WWW Mathematics Documents
http://hutchinson.belmont.ma.us/tth/webmath.html
------------------
preface:
ex-ample1 (mathML3): http://ex-ample.blogspot.com/2011/07/mathml3-sample.html
(this example comes from https://eyeasme.com/Joe/MathML/HTML5_MathML_browser_test.html
but this URL does not work with Chrome 14+STIX font+MathJax but works with firefox; MathML code without return must be included in HTML code of a post).

ex-ample2 (mathML2): http://www.w3.org/Math/testsuite/mml2-testsuite/TortureTests/Complexity/complex1.xml

ex-ample3: this blog (left sidebar and matML latex labels):
http://ex-ample.blogspot.com/2011/07/symbols-tex-1.html

Math ML(Mathematical Markup Language)  is an XML language designed to present complex equations:
http://en.wikipedia.org/wiki/MathML
http://www.w3.org/Math/
http://www.personal.psu.edu/ejp10/blogs/tlt/tutorials/mathml.html

Wikipedia uses LaTeX (and limited MathML).
 MS Office 2007 and OpenOffice.org (via OpenOffice.org Math: http://en.wikipedia.org/wiki/OpenOffice.org_Math), as well as mathematical software products such as Mathematica supports MathML.
Knol use LaTeX:
http://knol.google.com/k/stef42-ex-ample-blogger-com/mathematics-and-web-html5-latex-mathml/2fdyfc9mft4ir/1?hd=ns# 

MathML 3.0 was officially released as a W3C Recommendation (@Oct 2010). It is backward compatible with MathML 2.
MathML deals not only with the presentation but also the meaning of formula components (the latter part of MathML is known as “Content MathML”). Because the meaning of the equation is preserved separate from the presentation, how the content is communicated can be left up to the user.
If you work in science you probably know LaTeX. LaTeX is gorgeous; enabling scientific authoring in an unrivaled way. Nevertheless, LaTeX is somewhat outdated. It doesn't support the clear separation between content and style that modern standards imply. Editing complex equations can become a tedious job. An alternative might be the combination of DocBook with MathML.
DocBook is an XML language (http://en.wikipedia.org/wiki/DocBook). It's a semantic markup language for technical documentation (http://www.docbook.org/tdg/). It was originally intended for writing technical documents related to computer hardware and software but it can be used for any other sort of documentation.
As a semantic language, a DocBook document does not describe what their contents "look like," but rather the meaning of those contents. For example, rather than explaining how the abstract for an article might be visually formatted, DocBook simply says that a particular section is an abstract. It is up to an external processing tool or application to decide where on a page the abstract should go and what it should look like. And, indeed, to decide whether or not it should be included in the final output at all. It provides a vast number of semantic element tags. They are divided into three broad categories: structural, block-level, and inline. Because DocBook is an XML format, conforming to a well-defined schema, documents can be validated and processed using any tool or programming language which includes XML support.
The current version is DocBook, 5.0.DocBook 4.x documents are not compatible with DocBook 5, but they can be converted into DocBook 5 documents through the use of an XSLT stylesheet.
Source: http://sourceforge.net/projects/docbook/
A group of XSLT stylesheets for transforming DocBook into various viewable formats: http://en.wikipedia.org/wiki/DocBook_XSL

This post is focused on "how to publish mathematics" not on "document languages", beyond of the scope. And then we focused on these languages : 
  • "your screen image": browser rendering engine and javascript rendering engine (in this blog the javascript library MathJax), 
  • HTML, HTML5, CSS... (quality of the code source of the page)
  • MathML (quality of the code source of the page), 
  • laTeX (quality of the code source of the page).
------------------------------------------------------------------------------------
MathML is too verbose to edit using a text editor then we need a MathML editor.

Comparison of HTML editor (stand alone); 
http://en.wikipedia.org/wiki/List_of_HTML_editors
List of math editors:
http://www.w3.org/Math/Software/mathml_software_cat_editors.html

Comparison of open source and commercial WYSIWYG web-based editors (by replacing a textarea or by adding their own editable block): 
http://geniisoft.com/showcase.nsf/WebEditors). 



Some packages and Mathematics environments (also some corrections of bad rendering):
If your document requires only a few simple mathematical formulas,  LaTeX has most of the tools that you will need. If you are writing a scientific document that contains numerous complicated formulas, the amsmath package introduces several new commands that are more powerful and flexible than the ones provided by LaTeX. The mathtools package fixes some amsmath quirks and adds some useful settings, symbols, and environments to amsmath.




1---------free and multi-platform text/HTML editors:

GNU TeXmacs (http://en.wikipedia.org/wiki/TeXmacs) is a WYSIWYG editor (http://www.texmacs.org/) with extensive support for mathematics. Converters exist for presentation MathML in both directions. TeXmacs can be used to write mathematical articles that are exported to XHTML with embedded MathML. TeXmacs uses TeX fonts. New presentation styles can be written by the user and new features can be added to the editor using the Scheme extension language.
Documents can be saved in TeXmacs, Xml or Scheme format and printed as Postscript or Pdf files. Converters exist for TeX/LaTeX and Html/Mathml. GNU TeXmacs is hosted by the Centre de Ressources Informatiques de Haute Savoie, Archamps, France.
http://www.texmacs.org/tmweb/download/download.en.html
Try Qt-TeXmacs, experimental Qt port of TeXmacs with an easy to install diskimage (.dmg; 17MB):
ftp://ftp.texmacs.org/pub/TeXmacs/macosx/qt/TeXmacs.dmg


 TeXShop (only MAC): http://www.texshop.org
Very good desktop application.
You can copy the Source Code: http://pages.uoregon.edu/koch/texshop/texshopsource_1.43.zip


There is even a free iPhone application by Ken Lee for TeX users:
http://itunes.apple.com/app/latex-help/id307772257?mt=8


Amaya : http://www.w3.org/Amaya/
W3C's Editor and Browser (also INRIA: http://web-dev.inrialpes.fr/29689422/0/fiche___pagelibre/&RH=1143806285375)
Amaya browser displays Presentation MathML, and lets a Web page author edit equations directly. The software gives multiple views of a document so that its internal structure can be displayed as well as a WSYSIWYG interface.
It is very easy to insert math formula and symbols and SVG.
support (@july 2011; mathML2)
download: http://www.w3.org/Amaya/User/BinDist.html
amaya-mac10.5-11.3.1.dmg = 21MB

Bluefish is a web design editor (and code C++... more than 20 programming languages) --but no viewer!
It supports many programming and markup languages also MathML.
It's focused towards the development of dynamic websites.
Server-side scripting:Yes.
Low-level user interface and bad interface with a local browser.
It fills the niche between the plain text editors and the full IDE:
http://bluefish.openoffice.nl/
http://bfwiki.tellefsen.net/index.php/Installing_Bluefish
Download .dmg file: http://www.bennewitz.com/bluefish/stable/binaries/macosx/
download Bluefish-2.0.3.dmg = 14MB

BlueGriffon is a free open source wysiwyg HTML/CSS/SVG editor.  It is based on Gecko 2.0, the rendering engine inside Firefox4.
MathML plug-in , commercial add-on(5$): http://www.bluegriffon.com/index.php?pages/MathML
Just entering ASCII or LaTeX-style prose. No need to learn MathML, you only need to learn a much easier ASCII syntax (see ASCIIMathML web page: http://www1.chapman.edu/~jipsen/mathml/asciimath.html).
Server-side scripting:Yes.
http://www.bluegriffon.org/
Download .dmg file: bluegriffon1.1.1.dmg = 30MB.

Kompozer : direct link with firefox (but no mathML inside)
Server-side scripting:No.
http://www.kompozer.net/download.php
download kompozer-0.8b3.fr.mac-universal.dmg = 15MB.

Jedit: http://www.jedit.org/
jEdit is a programmer's text editor with hundreds (counting the time developing plugins) of person-years of development behind it. Source: http://sourceforge.net/projects/jedit/

Some of jEdit's features (http://www.jedit.org/index.php?page=features) include:

  • Written in Java, so it runs on Mac OS X, OS/2, Unix, VMS and Windows.
  • Built-in macro language; extensible plugin architecture. Dozens of macros and plugins available.
  • Plugins can be downloaded and installed from within jEdit using the "plugin manager" feature.
  • Auto indent, and syntax highlighting for more than 130 languages.
  • Supports a large number of character encodings including UTF8 and Unicode.
  • Folding for selectively hiding regions of text.
The LaTeXTools plugin includes a set of features to enable more efficient LaTeX editing. The features currently include a BibTeX citation insertion tool, a reference insertion tool, and a user configurable LaTeX document navigator.



2-------Rich text/html editors inside blogger, Gmail, Knol, wordpress.com, webmail...

  1. you can insert an equation (directly in LaTeX or with the list of "button one-click services" (in fact each button is a line of LaTeX) : e = \lim_{n\to\infty} \left(1+\frac{1}{n}\right)^n
  2. you can insert special characters. This interface (lists of ascii tables) allows a large choices but it will be better to use TeX (see a list of symbols with TeX:
    http://ex-ample.blogspot.com/2011/07/symbols-tex-1.html
    http://ex-ample.blogspot.com/2011/07/math-blackboard-capital-letters.html




The equation editor of Knol generates a line of LaTeX and uses the Google Chart API (http://code.google.com/apis/chart/image/docs/gallery/formulas.html) to render a mathematical formula in your knol post. 
At the end it renders a formula in a static image file (png). You can use this API without the Knol editor but to do this, you must understand the TeX language in order to specify your formula.

Then you MUST put the LaTeX code with the static image, for example:
e = \lim_{n\to\infty} \left(1+\frac{1}{n}\right)^n  
e = \lim_{n\to\infty} \left(1+\frac{1}{n}\right)^n

  1. Right click (mac: ctrl click) on this code.
  2. Copy to an editor 
  3. or copy to your blog/sites (with Mathjax; see above).


In fact it's not only a png image. You can use this trick: 
  1. right-click (mac: ctrl click) 
  2.  select "inspect element".
  3. between the imag tag and after src, you have this (an example of equation):
    alt="e = \lim_{n\to\infty} \left(1+\frac{1}{n}\right)^n" eeimg="1"
  4. You can copy the LaTeX code.
When you click an equation in knol, it uses this alt parameter to insert the equation in the equation editor.

Google documents integrate the knol equation editor (without the preview) and the knol insert character, but it's not interoperable!
Blogger and gmail don't integrate the knol equation editor...





Compare the knol editor and codecogs (you will see how the knol editor is bad):
Codecogs: the best online LaTeX equation editor.
http://www.codecogs.com/
try the editor: http://www.codecogs.com/latex/eqneditor.php

CodeCogs is an Open-Source library, with technical references and numerical components written in C/C++. It's an interactive library, with examples, online calculator and interactive graphs, covering Mathematics, Statistics, Science, Engineering and Finance...
  • Equations plugin for CK Editor (see below for CK editor)
  • Equations in Tiny MCE (see below for TinY MCE)
  • Twitter Integration
The CodeCogs Equation Editor is an online editor that facilitates the creation and formatting of LaTeX equations. The editor can be easily extended, adapted and embedded into websites. It is compatible with a range of WYSIWYG editors, supports multiple languages and works across all major internet browsers, including IE, FireFox, Safari and Chrome, most email programs, and web enabled portable devices.
The CodeCogs LaTeX Engine creates graphical equations for placement on Internets, Intranets, and most desktop applications. It adheres to the international LaTeX standard.
v3 - Jan 2011. Introduction of Variable Designs so editor can be customisted to needs. New Editor integration API, allowing the editor to be fully integrated into other HTML pages.

The full code is not free...
But its use is free:
  • the Editor toolbar can be rearrange to provide a bespoke layout and design to meet the varying needs of your users. You can choose from one of our preset Standard Designs or build you own Custom Design.
  • you can embed this editor (http://www.codecogs.com/latex/embedded.php) very easily: only 1 CSS and  2 Javascript calls in the Head section. 
  • just "show equations": without installing any additional code, you can put the latex code and IMG tag. http://www.codecogs.com/latex/htmlequations.php
  • try also the code editor C++ which is fully integrate with the equation editor...
This editor generates
  • an image (6 choices: gif, png, pdf, swf, emf and svg). SVG is better than the raster images: there are only 100dpi, whereas for printing you need about 300dpi.
  • the direct rendering (and a download link)
  • code (9choices)
    1. HTML (edit) : HTML code to embed this equation into a web page : just a line of HTML code; you can copy the LaTeX code between fn_jvn  and ". 
    2. HTML for this equation
    3. URL; The URL link to this equation.
    4. URL encoded for this equation
    5. LaTeX markup for this equation
    6. PRE (XML code with pre-tags) for this equation
    7. TiddlyWiki markup for this equation
    8. PHP Bulletin Board markup for this equation
    9. Wordpress.org markup for this equation
LyX (http://www.lyx.org/) is a document processor. It offers an offline equation editor. LyX can be used on Linux, Windows, and Mac computers. The equation mode can be started by selecting the equation mode using one button.


Document formats:
  • Access to all LaTeX functionality with capability to insert plain LaTeX code anywhere in a document.
  • Import and export to many formats (LaTeX, PDF, Postscript, DVI, ASCII, HTML, OpenDocument, RTF, MS Word, and others) thanks to configurable converters
  • Send a fax from within LyX
  • Source code viewer for instant LaTeX and DocBook view.
  • SGML-tools support (DocBook DTDs)
  • Literate programming support (Literate programming is the art of preparing programs for human readers)
  • Support for export of PDF bookmarks and header information.


3--------Web-based word processor
  •  Google Docs: How do i use MathML in equation Editor? You can't : only Google's own equation editor (see above the LaTeX knol editor) is supported, but that is limited : http://www.google.fr/support/forum/p/Google+Docs/thread?tid=6d770dce490fc87e&hl=en;
    Only LaTeX, try : http://code.google.com/p/latex-lab/
    Google LaTeX Lab is an open source implementation of a web based LaTeX editor for Google Docs. Integration with Google Docs is achieved via GData API. The application is developed using GWT and hosted on the Google AppEngine. A CLSI implementation provides the link to the LaTeX compiler.
    Go to the Project Site : http://docs.latexlab.org/
  • Open office:
    support mathML.
    The math library available in LibreOffice is very rich, you can even write complex matrices.
    http://www.openoffice.org/
    http://www.maherali.net/2011/05/blogger-mathematical-formulas.html
  • Zoho
    LaTeX Equation Editor feature in Zoho Writer that comes very handy for writing mathematical stuff. You can also export your Writer document in LaTeX format for further editing from your local drive.Zoho Writer comes with LaTeX based Equation Editor under 'Insert' menu, based on palette based limited graphic user interface. If not fluent in LaTeX, user can use some 3rd party Math Equation Editor software such as MathMagic (http://www.mathmagic.com/) or MathType (http://www.dessci.com/en/products/mathtype). MathMagic especially offers "Copy As Zoho equation" menu to allow user Paste the equation optimized in Zoho equation format. Zoho equation(LaTeX) can also be copy and pasted into MathMagic window to re-edit. 
4--------two powerful commercial applications (less than 50$) and some free equation editors.
a comparison of formula editor: http://en.wikipedia.org/wiki/Formula_editor


--mathtype:
http://en.wikipedia.org/wiki/Mathtype
http://www.dessci.com/en/products/mathtype
MathType is a commercial powerful interactive equation editor for Windows and Macintosh that lets you create mathematical notation for word processing, web pages, desktop publishing, presentations, elearning, and for TeX, LaTeX, and MathML documents (interoperable with >400applications and web sites; google docs, mathematica; ). There are significant compatibility issues, however, with Adobe Acrobat; and generating PDF files from documents containing MathType elements is far from straightforward. Users may wish to refer to TechNote #69 for further information https://www.mathtype.com/en/support/mathtype/tsn/TSN69.htm.

http://www.dessci.com/en/products/MathType_Mac/
Works with Many Applications and Websites:
Apple iWork '09: MathType lets you add equations to documents, presentations, and spreadsheets in Pages, Numbers, and Keynote.
Microsoft Office 2008 and 2011: MathType lets you add equations to documents, presentations, and spreadsheets in Word, PowerPoint, and Excel.
Many Other Applications and Websites: MathType also works with over 500 applications and websites, including:
Yahoo Mail, Gmail, Hotmail, Mac Mail, Microsoft Outlook
Mathematica, Maple
InDesign, QuarkXpress
Blackboard, Moodle, WebAssign
Wikipedia, Wolfram Alpha
Google Docs
Evernote


--mathMagic:
http://www.mathmagic.com/
http://en.wikipedia.org/wiki/MathMagic
MathMagic supports MathML batch conversion from/to TeX, LaTeX, EPS, PDF, PNG, GIF, JPEG, BMP, Microsoft Word equation, and other formats.

-techexplorer
http://www.integretechpub.com/techexplorer/
It's a commercial cross-platform, cross-browser plug-in for delivering high volume or advanced mathematics over the web. Rich programming API for C++, Java, and JavaScript let you interact with Java applets, create animations, or build custom applications using techexplorer. Publish TeX and LaTeX Documents to the Web Without Conversion. MathQuery is a radically new method for analyzing and evaluating free-form student responses within computer-based assessment and tutorial systems for mathematics. 
--------------
--free equation editors:
http://www.dragmath.bham.ac.uk/
This is an open-source (sourceforge: http://sourceforge.net/projects/dragmath/) drag and drop equation editor written in Java.  It is a Java applet which can simply run within a web browser on most computers. Once an expression is created the user can convert it into a variety of different linear syntax for mathematics, including MathML, LaTeX, Maple, Maxima or any user defined style. It is possible for the user to create an .xml file containing a custom output format without requiring the applet to be recompiled.
Integrations with a VLE such as Moodle: Moodle is a free, open source course management system. If you are interested in using DragMath with Moodle, or a similar system such as LonCAPA, etc then please review the DragMath and Moodle page (http://www.dragmath.bham.ac.uk/moodle.html) or the more general Integration page before downloading (http://www.dragmath.bham.ac.uk/integrations.html).

DragMath makes use of the MathTran service to automatically convert expressions to images. More details of MathTran available at www.mathtran.org.
-----
http://www.mmlsoft.com/index.php?option=com_content&task=view&id=6&Itemid=7
Formulator Mathml Weaver
-----
The project Gemse has been started in the need for an editor for mathematical formulas that is fast and can be controlled by keyboard only. Gemse is implemented in JavaScript using DOM. It runs in the webbrowser Firefox (plug-in).
-----
http://mathcast.sourceforge.net/home.html
MathCast is a free and open source application. MathCast is an equation editor, an application that allows you to input mathematical equations. These equations can be used in written documents and webpages. The equations can be rendered graphically to the screen, to picture files, or to MathML - today's leading standard language for describing mathematics. MathCast is also an Equation List Manager, and is capable of organizing dozens of equations in a single list. This empowers you with the abilities to manage, modify, view, edit, and reedit all the mathematics of a project (be it a document, a webpage, or so on) all at the same session. A Laplace transform table created with MS Word.  https://docs.google.com/viewer?url=http%3A%2F%2Fmathcast.sourceforge.net%2Flaplace.doc
----
http://pierre.chachatelier.fr/latexit/latexit-downloads.php?lang=en
LaTeXiT: Mac and PC desktop program.

To simplify the writing of equations, LaTeXiT features syntax coloring, a dictionary, a smart error manager relying on log analysis of the underlying LaTeX engine. You can also create your own keyboard shortcuts, document templates… everything is made to help you customize your environment. LaTeXiT is open source ; the code is available for free.


5-----------Browsers and LaTeX/ MathML viewers:
Firefox 5.0 (@july 2010) with free stixFonts (Scientific and Technical Information Exchange (STIX) font project is the creation of a comprehensive set of fonts that serve the scientific and engineering communities: http://www.aip.org/stixfonts/http://sourceforge.net/projects/stixfonts/) has a very good support of mathML3.0 (better than amaya ;)!!!


All Gecko browsers (Firefox and Camino) support MathML natively.
If you want to display LaTeX math on web pages: http://alexeev.org/display-latex2.html


FireMath, a powerful MathML editor for Firefox:
https://addons.mozilla.org/en-US/firefox/addon/firemath/
http://mozillalinks.org/2009/09/firemath-a-powerful-mathml-editor-for-firefox/

Chrome does not support MathML. It will support MathML as soon as webkit does, chrome relies on webkit to handle this part of the rendering process (http://ex-ample.blogspot.com/2011/07/webkitrendering-engine-html5-webkit2.html).
Try the ex-ample (the start of this post) with dev channel chrome (14.0.803.0 dev; @july 2011): it is very bad!!!
a-1) How to use the Google Chart API to render a mathematical formula on your web page:
http://code.google.com/apis/chart/image/docs/gallery/formulas.html
With these API, you can render a formula in a static image file. To do this, you must understand the TeX language in order to specify your formula. Try the equation editor in knol (see above).
a-2) Try this chrome extension (uses these API) but just an image generator with the hidden LaTeX code of your equation in alt (see the HTML code; see the editor of knol (above))) https://chrome.google.com/webstore/detail/kkefjpibponajdjnckihpchmfjnaedhe
A blogspot which uses this google API : http://satomacoto.blogspot.com/



b) Simple chrome extension to inject CSS into a page in order to display MathML equations:
https://chrome.google.com/webstore/detail/elbbpgnifnallkilnkofjcgjeallfcfa
http://math.nist.gov/~BMiller/mathml-css/style/mathml.css
OK for the rendering of ex-ample2 (the math symbols are not properly aligned) not for the ex-ample1.



Internet Explorer 
Web pages with MathML embedded in them can be viewed as normal web pages with many browsers but visually impaired users can also have the same MathML read to them through the use of screen readers : using the commercial MathPlayer plugin for Internet Explorer http://www.dessci.com/en/products/mathplayer/.



6------i select 2 free javascript libraries for math on web pages (with JavaScript display engine for mathematics that works in all browsers).
-I) fmath
-II) MathJax


MathJax is a more mature project (without flash) but i think it is important to know these 2 possibilities.


-I) fmath (flash and javascript)
a)ex-ample (test the rendering in your browser): http://www.fmath.info/formula/ex1/complexPage.html
http://www.fmath.info/formula/ex1/simplePage.html
It works if you have the Adobe flash player plug-in in your browser.


See also the demo mathML-LaTeX-view equation online converter: http://www.fmath.info/formula/demo.jsp#main


b)Three URL:
http://www.fmath.info/
http://mathmlflash.blogspot.com/
http://code.google.com/p/mathmleditor/
MathML IDE: IDE (Integrated Development Environment) is an application that integrates all other modules. The application allows to work with mathematical functions (editing, viewing graphics, processing functions, ...) as well as working with MathML source (editing, save, help, ...): MathML Editor; MathML Graph;MathML Formula.


Code for "MathML on web pages":
http://code.google.com/p/mathmlonweb/
It's a project's Subversion repository (SVN).
The project is intended to provide a simple way to display mathematical equations in web pages, without pictures and without installing other components than Adobe's Flash Player.
The equations displayed are identical on all web web browsers (Internet Explorer, Mozilla Firefox, Google Chrome, Opera). The equations are inserted in the web pages in the form of MathML - an XML standard for transmitting, processing and displaying mathematical formulas. 
Also "view-onServer".
"MathML for Flash" is a group of open source projects which allows displaying, editing, viewing and processing functions and mathematical equations in web pages. The programming is done in Adobe Flash AS3.


For GWT (Google Web Toolkit)
http://www.fmath.info/plugins/GWT/formula/
the first widget for GWT  2.2.0. The widget allow you to display an equation or mathemetics formula in web applications using GWT. The widget expose methods to access/modify the mathml (and latex), color, font, size or backcolor.


In your browser:
This tools allow the rendering but also saving options. You can save just by a right click (or ctrl click mac user) in MathMl code or LaTeX code (see the snapshot below). You can also save as image if you capture a screen shot...


see the quality of the rendering in Chrome
(Chrome has an automatic flash plug-in).
Then the problem of rendering and online saving is solved!
Whew.
Now the problem is:
How to publish equations in your site?

2 ways:
i) write mathMl code (or LaTeX) and javascript code and embed flash... 
ii) use the fmath plug-in with an editor (see below):



-i--How to edit/display equations in your site? Javascript and embed flash on your site:
http://www.fmath.info/formula/download.jsp




-ii--online HTML editors with fmath plug-ins (http://www.fmath.info/editor/download.jsp):
(
old comparison: http://woork.blogspot.com/2009/02/best-rich-text-editors-ready-to-use-in.html)



-II) MathJax 
http://www.mathjax.org/community/mathjax-in-use/#web-apps

http://www.mathjax.org/docs/1.1/mathml.html, is a JavaScript library for inline rendering of mathematical formulas. It can be used to translate LaTeX into MathML for direct interpretation by the browser. See the rendering with your browser:
http://www.mathjax.org/demos/tex-samples/
http://www.mathjax.org/demos/mathml-samples/
http://www.mathjax.org/demos/copy-and-paste/

http://mathematics-diary.blogspot.com/2010/02/mathjax.html


The  open-source software project is sponsored by the American Mathematical Society...:
http://en.wikipedia.org/wiki/Mathjax
MathJax is used by GitHub and many sites.


In your browser:

This tools allow the rendering but also saving options. You can save just by a right click (or ctrl click mac user) in MathML code or LaTeX code (see the snapshot below). You can also save as image if you capture a screen shot...








Try these functions in this blog:
http://ex-ample.blogspot.com/2011/07/equation-copy-from-mathjax-latex-demo.html



Use in Web Platforms:
http://www.mathjax.org/demos/use-in-web-platforms/

It is very easy to use MathJax with most web platforms. Thanks to the MathJax CDN service, you do not have to install any files – just adding a code snippet to the HTML header is all that you need to do to set up MathJax. You can then include LaTeX and MathML in your posts and let MathJax display beautifully rendered equations to your readers.
Install:

http://www.mathjax.org/docs/1.1/start.html#mathjax-cdn

It is a common problem that developers face when trying to use a lot of (= more than the maximum number of allowed files) static files (js-librarys or other files):
http://appengine-cookbook.appspot.com/recipe/reducing-the-maximum-number-of-static-uploaded-files-using-zipfile-and-memcache-mathjax-uploaded-to-appengine/

If you use http://arxiv.org/ (an open access to around 700000 e-prints in Physics, Mathematics, Computer Science, Quantitative Biology, Quantitative Finance and Statistics) and if you want to display math on it
(this only work for a tiny amount of papers with $ symbols in the abstract), download this chrome extension:
https://chrome.google.com/webstore/detail/iamlipddanpcamngfnekhlejlijhjedg?ct=author

For GWT (Google Web Toolkit):
http://www.mathjax.org/community/mathjax-in-use/#web-apps
 http://cs.jsu.edu/wordpress/?p=55

Mathjax and blogger. Here i outline the steps needed to display MathML/LaTeX on blogger via MathJax.
  • Method with a hosting (i.e. GAE or yola...)
    • Step 1: Hosting This is by far the hardest step in the configuration of MathJax. MathJax relies on a server which provides all the resources MathJax needs. So you need a host which you can control. I looked around for a hosting service and picked a local hosting service.
    • Step 2: Installing MathJaxThere are various ways of installing MathJax depending on your host. For various reason I opted for a local installation.  Get a copy of the latest MathJax distribution of the download page of MathJax: http://www.mathjax.org/download/
      Place the distribution on the host and follow the installation instructions: http://www.mathjax.org/docs/1.1/installation.html#obtaining-mathjax-via-an-archive.Other options are described as well.
    • ---
    • Step 3: Add reference to your MathJax in blogger. In order to use MathJax in blogger you have to refer to the MathJax installation. Go to the design section of blogger and edit the html. In the head section of the html add the following section of code. And after , it works.

01.<html>
02.<head>
03....
04.<script src='http://[yourhost/your-installation/]MathJax.js' type='text/javascript'/>
05....
06.head>
07.<body>
08....
09.body>
10.html>
  • Method with the mathajax Content Distribution Network (CDN); making steps 1 and 2 unnecessary. 
    • Before you can use the CDN you will have to read the terms of service. After that use the alternate step 3 to reference Mathjax in blogger as outlined below and on the documentation page: http://www.mathjax.org/docs/1.1/start.html#mathjax-cdn
    • Step 3': Add reference to the CDN Mathjax in bloggerGo to the design section of blogger and edit the html. In the head section of the html add the following section of code.

<html>
02.<head>
03....
05....
06.head>
07.<body>
08....
09.body>
10.html>
http://themagicofscience.blogspot.com/2011/06/mathjax-gory-details.html

-----Server-side scripting with these flash plug-ins:
Server-side scripting is a web server technology in which a user's request is verified by running a script directly on the web server to generate dynamic web pages. It is usually used to provide interactive web sites that interface to databases or other data stores. This is different from client-side scripting where scripts are run by the viewing web browser, usually in JavaScript.

-----Mathjax and Google App Engine (GAE):
This is a tool to make it easy to embed LaTeX code in your webpages, even if the server-side software -- like your wiki or blog program -- doesn't support it:
http://mathcache.appspot.com/static/docs.html

Mathjax and appspot (google app engine):
http://joeisontheweb.appspot.com/

   The MathJax library is pretty fat (30.000 files) 
It is a common problem that GAE developers face when trying to use a lot of (= more than the maximum number of allowed files) static files (js-librarys or other files). One possibility to overcome this, is to use zipped archives and memcache. This solution works only for zipped archives which are not bigger than 10Mb (and MathJax is 16MB).
http://appengine-cookbook.appspot.com/recipe/reducing-the-maximum-number-of-static-uploaded-files-using-zipfile-and-memcache-mathjax-uploaded-to-appengine/
Solve the problem, this way: http://leona-nachhilfe.appspot.com/zipped/MathJax-v1.0.1a.zip/MathJax/test/sample.html




Some big problems of MathJax: MathJax has been focused on LaTeX. It added partial support for MathML 2.0 and MathML 3.0. In fact MathJax only supports presentation MathML.Compare chrome+styx fonts (v14 @july 2011) and firefox+styx fonts (v5 @july 2011) with this URL:
https://eyeasme.com/Joe/MathML/HTML5_MathML_browser_test.html
Chrome does not work!
If MathML3 is posted without return, Chrome 14 (with styx fonts and mathjax) gives a very good rendering:
http://ex-ample.blogspot.com/2011/07/mathml3-sample.html




--Other:

http://wme.lzu.edu.cn/mathedit/index.html
MathEdit is implemented in standard JavaScript and DOM. MathEdit runs within any standard Web browser that supports JavaScript and DOM. Import/Export MathML.
--MathEdit Content Version(Both in IE and Firefox browsers)
--MathEdit Presentation version(Only in Firefox browsers)
Mathematical Expression Translator Web Service (LaTeX 2 gif/png/pdf/ps/dvi)



7-----Some interesting links (in my opinion ;)


--http://mathtran.org/
MathTran uses TeX-notation for encoding mathematics. Most people use LaTeX, but for technical reasons MathTran uses a variant of the simpler plain TeX format.
The main difference between MathTran TeX and LaTeX is that MathTran doesn't use the LaTeX \begin{environment} and \end{environment} commands, and that it uses \hbox for text in a formula.

A small LaTeX converter:
http://point.pt/~guillaume/latex/latexiframe.html

--weblog clients
http://webstory.my/
Chrysanth WebStory is a desktop blog management software that helps you manage and back up multiple blogs, Twitter and web albums easily. Through WebStory, you may be able to remotely manage your blog posts, including publish new posts or pages, edit/ delete published posts or pages. Supported blog servers and blog services include BlogSpot.com, WordPress.com, TypePad.com, WordPress blog server, MovableType, Drupal, Nucleus and others.

--not free:
 BBEdit is the best HTML tools but not free (and not multi-platform):

--some web applications:
Mathematica provides a web page to convert typed mathematical expressions (select whether the tool should interpret the input as TraditionalForm, traditional mathematical notation, or as StandardForm, Mathematica syntax notation) to MathMLcode (just copy/paste the code):

Encalc is a free online calculator (and grapher) with support for variables and dimensional units (meters, inches, Amps, etc). It makes unit conversions and evaluating formulas simple by abstracting away the calculation part from your side to the computer's side. Encalc was made to simplify long, dimensionful calculations. You can also define variables in order to vary the parameters independently of the expression. Finally, Encalc supports advanced mathematical calculations, such as solving systems of equations and matrix multiplication.

a LyX to HTML converter:
LyX (http://www.lyx.org/) is a wonderful text editor which produces beautiful PDF files. Internally it exports documents to LaTeX, and from there to PDF. Sadly there is not an equivalent “export to HTML” option…

8-----------Inserting Characters (unicode, Math Font Styles):


If you can use either the Windows Character Map or the Macintosh Character Viewer/Palette with Dreamweaver, Notepad (Win), Unipad (Win) or BBEdit (Mac) to insert mathematical symbols directly into the HTML.
However, you may get uneven results between browsers.

-----end

5 comments:

  1. i am still not sure which one i should go, latex or mathml

    ReplyDelete
  2. this article is TLDR :D so which one is better??

    ReplyDelete
  3. If you want to get a great deal from this article then you have to apply such methods to your won blog.

    ReplyDelete