Available Output Formats in Mathpix Python SDK
When using the Mathpix Python SDK, you can convert images, PDFs, and Mathpix Markdown (MMD) into a variety of output formats depending on your needs.
Supported Output Formats
Format | Description |
---|---|
Converts content into a standard PDF file. | |
docx | Converts content into a Microsoft Word (.docx) file. |
md | Converts content into plain Markdown (.md) format. |
mmd | Converts content into Mathpix Markdown (.mmd) format. |
html | Converts content into HTML for web usage. |
json | Extracts content into structured JSON format (especially useful for OCR line-by-line data). |
Example of Requesting Multiple Formats
You can request multiple output formats at once:
conversion = client.conversion_new(
mmd="E = mc^2",
formats={"pdf": True, "md": True}
)
The available formats depend on the type of conversion:
- Image and PDF conversions typically support
pdf
,docx
,md
, andjson
. - Mathpix Markdown (MMD) conversions support
pdf
,docx
,md
, andhtml
.