Download the PHP package latex2mathml/latex2mathml-php without Composer

On this page you can find all versions of the php package latex2mathml/latex2mathml-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package latex2mathml-php

Latex2MathML-PHP

Pure PHP 8.4 library for LaTeX to MathML conversion. This is a port of the Python library latex2mathml.

Features

Installation

Usage

Simple conversion

By default, the converter produces inline MathML.

Display Mode

You can specify the display mode (inline or block) as the second argument. For clarity and to ensure future compatibility, using named arguments (PHP 8.0+) is recommended.

Custom XML namespace

The third argument allows you to specify a custom XML namespace. It defaults to the standard MathML namespace (http://www.w3.org/1998/Math/MathML). Pass an empty string if you don't want a namespace attribute. Again, named arguments are recommended.

Integration with DOMDocument

If you are already working with a DOMDocument, you can use convert_to_element to get a DOMElement instead of a string.

Visualization Script

A helper script display_math.php is included to visualize LaTeX conversion from .tex files.

  1. Place one or more .tex files in the tests/ directory.
  2. Run the script and redirect the output to an HTML file:

  3. Open output.html in your web browser to see the rendered MathML.

The script automatically:

Architecture

The project is structured as follows:

Requirements

License

MIT


All versions of latex2mathml-php with dependencies

PHP Build Version
Package Version
Requires php Version >=8.4
ext-dom Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package latex2mathml/latex2mathml-php contains the following files

Loading the files please wait ...