Web publishing system for mathematical documents



With PhpMathPublisher, you can publish mathematical documents on the web by using only a php script (no latex programs on the server, no mathml...).

  • The method : each formula is transformed into image by a php script which returns the corresponding html code.
  • Advantages for the visitors : the web pages created by PhpMathPublisher can be displayed by all the current browsers.
    The visitor does not have anything to install on his system: neither fonts, nor plugins...
  • Advantages for the webmasters :
    • Only Php (with the GD library) and some fonts are required.
    • PhpMathPublisher is simple to install and use. You can convert a mathematical text with only one php command.
    • It can be easily used by CMS systems, weblogs and forums.
    • PhpMathPublisher creates cross-browser pages.
    • The png images created by the script are transparent and can be placed in any page.


Original version : phpmathpublisher-0.3.tar.gz

Php5 version modified by Melsi Habipi : phpmathpublisher-0.3-php5.tar.gz

Installation and use of the script

  1. PhpMathPublisher needs a repertory for the fonts and another for the images (you can use your own directories or the defaults directories included in the package). You must first modify the firt lines of the "mathpublisher.php" script to indicate the absolute path to these directories.
  2. Then, you must install the fonts into their directory (there are located in the fonts/ directory in the package).
  3. The script is contained in only one file : "mathpublisher.php"
    The only command to be used in your php pages to convert a mathematical expression is :
    echo mathfilter($text,$size,$pathtoimg); (and include("mathpublisher.php") ;)
    $text is the text with standard html tags and mathematical expressions (defined by the <m>...</m> tag), $size is the size of the police used for the formulas and $pathtoimg is the relative path between the html pages and the images directory.
    The "mathfilter" function creates the images of the formulas and returns the corresponding html code. Apart from the <m>...</m> tag, $text can contain any html code. Syntax to be respected for the mathematical formulas is indicated in the help.html file.
    The php code of the demo files (in the examples/ directory) shows you how the script can be used by a webmaster.

Phpmathpublisher plugins for Wordpress