{"category":"generate","description":"Lays out a formula written in LaTeX maths notation and saves it as a picture that fits it exactly. It supports a fixed set of maths commands rather than a full TeX system, so nothing in a formula can read a file or run a program.","endpoint":"https://setget.net/v1/tools/math","examples":[{"input":{"latex":"x = \\frac{-b \\pm \\sqrt{b^2 - 4ac}}{2a}"},"title":"The quadratic formula as SVG"},{"input":{"background":"#ffffff","colour":"#1e3a8a","dpi":150,"font":"stix","font_size":32,"format":"png","latex":"$e^{i\\pi} + 1 = 0$"},"title":"A dark blue PNG on white"},{"input":{"font":"dejavusans","latex":"\\sum_{n=1}^{\\infty} \\frac{1}{n^2} = \\frac{\\pi^2}{6}"},"title":"A sum in a sans-serif font"}],"input_schema":{"additionalProperties":false,"properties":{"background":{"default":"transparent","description":"Background colour: hex such as #ffffff, a basic colour name, or \"transparent\".","type":"string"},"colour":{"default":"#000000","description":"Colour of the formula: hex such as #1e3a8a, or a basic colour name.","type":"string"},"dpi":{"default":200,"description":"Resolution of a PNG, in dots per inch: 72 gives one pixel per point. Ignored for SVG.","maximum":600,"minimum":50,"type":"integer"},"font":{"default":"cm","description":"Typeface: cm is the classic LaTeX look, stix resembles Times, stixsans and dejavusans are sans-serif, dejavuserif is a wider serif.","enum":["cm","stix","stixsans","dejavusans","dejavuserif"],"type":"string"},"font_size":{"default":24,"description":"Size of the letters in points.","maximum":200,"minimum":6,"type":"integer"},"format":{"default":"svg","description":"svg stays sharp at any size; png is a fixed-size picture.","enum":["svg","png"],"type":"string"},"latex":{"description":"The formula in LaTeX maths notation, with or without $ around it.","examples":["x = \\frac{-b \\pm \\sqrt{b^2 - 4ac}}{2a}"],"maxLength":2000,"type":"string"},"padding":{"default":6,"description":"Empty space around the formula, in points.","maximum":100,"minimum":0,"type":"integer"}},"required":["latex"],"type":"object"},"keywords":["latex to image","latex to svg","latex to png","math formula image","equation image","render latex","equation editor","formula picture","maths","mathtext","tex to svg","equation to png"],"related":["graphviz","chart","code-image","svg-to-png","image-convert"],"slug":"math","summary":"Draw a LaTeX maths formula as a sharp SVG or PNG picture, with a choice of font, size and colours.","tier":"job","timeout_seconds":60,"title":"LaTeX maths to image","url":"https://setget.net/tools/math"}
