PHP code example of metalinspired / tex2png
1. Go to this page and download the library: Download metalinspired/tex2png library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
metalinspired / tex2png example snippets
// This will create a formula and save it to sum.png
(new Tex2png('\sum_{i = 0}^{i = n} \frac{i}{2}'))
->saveTo('sum.png')
->generate();
(new Tex2png('\sum_{i = 0}^{i = n} \frac{i}{2}', 300))
->generate();