Skip to main content

Create, read, and update PowerPoint 2007+ (.pptx) files.

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pypptx_with_oxml-1.0.3.tar.gz (9.8 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pypptx_with_oxml-1.0.3-py3-none-any.whl (493.0 kB view details)

Uploaded Python 3

File details

Details for the file pypptx_with_oxml-1.0.3.tar.gz.

File metadata

  • Download URL: pypptx_with_oxml-1.0.3.tar.gz
  • Upload date:
  • Size: 9.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for pypptx_with_oxml-1.0.3.tar.gz
Algorithm Hash digest
SHA256 a093d8c8e99dfcd0131ea98b4dbc0a0a40adf44869edbb74c57d0cb87b8e4208
MD5 1b89e958dd914aa1808cedabe57ebee7
BLAKE2b-256 43177a499cea9e03b37ef5a502a7792431b5e609328908e2e11b02453071367b

See more details on using hashes here.

File details

Details for the file pypptx_with_oxml-1.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for pypptx_with_oxml-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4b3ccf51185e0f9e60ebf2884e74153d7fcb00e7e4f0461404e96e0260d7bba1
MD5 a4683846e01997a51b2fb4ab4aa83613
BLAKE2b-256 fbd8940fcaa6a1f3763d72751b6bc8054f40beeacd6e9e5b19069c6c73dab5af

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page