About this tool
This tool needs no file. You type a formula in LaTeX, a standard way to write formulas as text, and it makes a clear picture of it. The background can be see-through or coloured. You can set the size and colour.
For example, you show an equation in a presentation.
How to use it
- Choose this tool. You do not need to add a file.
- Type or paste your formula in LaTeX.
- Choose the size, colour and background.
- Press Generate.
- Download the picture.
What you get back
You get a picture of your formula. Download it and place it in documents, slides or web pages.
GOOD TO KNOW
Text in, one picture out. KaTeX typesets the formula; the fonts travel inside the page. Counts as one render.
TEST IT LIVE
Try Math to Image in the Studio
One click opens the Studio with this tool already selected. Add your file and see the result in seconds.
Family
Render
Plan
Free
Method
POST
Endpoint
/v1/render/math
Tool ID
render.math
Authentication
API key
Accepts
Text and settings
Background jobs
Yes
Usage group
Render
For developers
Use it from your code
cURL
curl -X POST "https://app.h2i.davixlabs.io/v1/render/math" \
-H "X-Api-Key: $DAVIX_H2I_API_KEY" \
-F 'formula=E = mc^2' \
-F 'output=png' \
-F 'display=block'Node.js
const { DavixH2I } = require('@davixlabs/h2i-sdk');
const h2i = new DavixH2I({ apiKey: process.env.DAVIX_H2I_API_KEY, baseUrl: process.env.DAVIX_H2I_URL });
const result = await h2i.render.math({
"formula": "E = mc^2",
"output": "png",
"display": "block"
});
console.log(result.data, result.requestId);PHP
<?php
require 'vendor/autoload.php';
$h2i = new \Davix\H2I\Client(['apiKey' => getenv('DAVIX_H2I_API_KEY'), 'baseUrl' => getenv('DAVIX_H2I_URL')]);
$result = $h2i->render()->math([
'formula' => 'E = mc^2',
'output' => 'png',
'display' => 'block',
]);
echo $result->requestId;