Skip to main content

This is a fork of python-pptx with MathML parsing and LaTeX conversion

A significant experimental feature has been added to enable the parsing of MathML (specifically <a14:m> elements containing either <m:oMathPara> for block equations or <m:oMath> for inline equations) embedded within PowerPoint files. This MathML content can then be converted into LaTeX strings.

This functionality allows for the extraction of mathematical equations from slides. When a presentation is parsed, these math elements are represented as special run objects. The LaTeX representation of the math equation can be accessed via the .text property of such a run (e.g., a math run might return a string like '$x^2 + y^2 = z^2$').

Unrelated to the MathML parsing, this fork also fixes the parsing of tiff images.

Important note: Though the fork is right now passing all tests (except txt-font-props.feature:Get Font.underline, tested only on Python 3.10 and 3.11), this fork is still experimental and it is not yet ready for production use! Also, no tests or documentation have been added for the new features. Please report any issues in the issue tracker for this fork!

This was developed while I was working on pptx2marp, a tool that converts PowerPoint presentations to Marp markdown, itself a fork of ssine/pptx2md, and I needed to parse the MathML in the presentations, as well as fix the parsing of tiff images.

python-pptx

python-pptx is a Python library for creating, reading, and updating PowerPoint (.pptx) files.

A typical use would be generating a PowerPoint presentation from dynamic content such as a database query, analytics output, or a JSON payload, perhaps in response to an HTTP request and downloading the generated PPTX file in response. It runs on any Python capable platform, including macOS and Linux, and does not require the PowerPoint application to be installed or licensed.

It can also be used to analyze PowerPoint files from a corpus, perhaps to extract search indexing text, images, and now, mathematical equations.

Furthermore, it can automate the production of slides that would be tedious to create by hand.

More Information

More information is available in the python-pptx documentation.

Browse examples with screenshots to get a quick idea of what you can do with python-pptx.

Metadata

Release files for pypptx-with-oxml 1.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pypptx-with-oxml 1.0.3
File Size Uploaded
pypptx_with_oxml-1.0.3.tar.gz 9.8 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for pypptx-with-oxml 1.0.3
File Interpreter ABI Platform
pypptx_with_oxml-1.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 10.3 MB

Release files / pypptx_with_oxml-1.0.3.tar.gz

Download URL pypptx_with_oxml-1.0.3.tar.gz
Size 9.8 MB
Tags Source
SHA-256 checksum
How to use checksums
a093d8c8e99dfcd0131ea98b4dbc0a0a40adf44869edbb74c57d0cb87b8e4208
BLAKE2b-256 checksum
How to use checksums
43177a499cea9e03b37ef5a502a7792431b5e609328908e2e11b02453071367b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / pypptx_with_oxml-1.0.3-py3-none-any.whl

Download URL pypptx_with_oxml-1.0.3-py3-none-any.whl
Size 493.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4b3ccf51185e0f9e60ebf2884e74153d7fcb00e7e4f0461404e96e0260d7bba1
BLAKE2b-256 checksum
How to use checksums
fbd8940fcaa6a1f3763d72751b6bc8054f40beeacd6e9e5b19069c6c73dab5af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

1.0.3 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page