tex2pptx 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. tex2pptx-0.1.0/LICENSE +21 -0
  2. tex2pptx-0.1.0/MANIFEST.in +20 -0
  3. tex2pptx-0.1.0/PKG-INFO +126 -0
  4. tex2pptx-0.1.0/PYPI.md +86 -0
  5. tex2pptx-0.1.0/THIRD_PARTY_NOTICES.md +17 -0
  6. tex2pptx-0.1.0/pyproject.toml +78 -0
  7. tex2pptx-0.1.0/setup.cfg +4 -0
  8. tex2pptx-0.1.0/src/tex2pptx/__init__.py +3 -0
  9. tex2pptx-0.1.0/src/tex2pptx/__main__.py +4 -0
  10. tex2pptx-0.1.0/src/tex2pptx/alignment/__init__.py +5 -0
  11. tex2pptx-0.1.0/src/tex2pptx/alignment/matcher.py +3736 -0
  12. tex2pptx-0.1.0/src/tex2pptx/cli.py +448 -0
  13. tex2pptx-0.1.0/src/tex2pptx/compiler/__init__.py +5 -0
  14. tex2pptx-0.1.0/src/tex2pptx/compiler/latex.py +395 -0
  15. tex2pptx-0.1.0/src/tex2pptx/config.py +182 -0
  16. tex2pptx-0.1.0/src/tex2pptx/conversion/__init__.py +5 -0
  17. tex2pptx-0.1.0/src/tex2pptx/conversion/ooxml.py +542 -0
  18. tex2pptx-0.1.0/src/tex2pptx/conversion/writer.py +144 -0
  19. tex2pptx-0.1.0/src/tex2pptx/data/default.yaml +46 -0
  20. tex2pptx-0.1.0/src/tex2pptx/data/pptx-writer.cjs +15412 -0
  21. tex2pptx-0.1.0/src/tex2pptx/data/pptx-writer.cjs.LEGAL.txt +1062 -0
  22. tex2pptx-0.1.0/src/tex2pptx/diagnostics.py +102 -0
  23. tex2pptx-0.1.0/src/tex2pptx/errors.py +23 -0
  24. tex2pptx-0.1.0/src/tex2pptx/ir/__init__.py +5 -0
  25. tex2pptx-0.1.0/src/tex2pptx/ir/models.py +342 -0
  26. tex2pptx-0.1.0/src/tex2pptx/jobs.py +203 -0
  27. tex2pptx-0.1.0/src/tex2pptx/math/__init__.py +11 -0
  28. tex2pptx-0.1.0/src/tex2pptx/math/fallback.py +133 -0
  29. tex2pptx-0.1.0/src/tex2pptx/math/office.py +245 -0
  30. tex2pptx-0.1.0/src/tex2pptx/pdf/__init__.py +6 -0
  31. tex2pptx-0.1.0/src/tex2pptx/pdf/extractor.py +740 -0
  32. tex2pptx-0.1.0/src/tex2pptx/pdf/models.py +82 -0
  33. tex2pptx-0.1.0/src/tex2pptx/pipeline.py +331 -0
  34. tex2pptx-0.1.0/src/tex2pptx/qa/__init__.py +5 -0
  35. tex2pptx-0.1.0/src/tex2pptx/qa/powerpoint.py +214 -0
  36. tex2pptx-0.1.0/src/tex2pptx/qa/validator.py +1914 -0
  37. tex2pptx-0.1.0/src/tex2pptx/source/__init__.py +21 -0
  38. tex2pptx-0.1.0/src/tex2pptx/source/models.py +140 -0
  39. tex2pptx-0.1.0/src/tex2pptx/source/parser.py +1371 -0
  40. tex2pptx-0.1.0/src/tex2pptx.egg-info/PKG-INFO +126 -0
  41. tex2pptx-0.1.0/src/tex2pptx.egg-info/SOURCES.txt +43 -0
  42. tex2pptx-0.1.0/src/tex2pptx.egg-info/dependency_links.txt +1 -0
  43. tex2pptx-0.1.0/src/tex2pptx.egg-info/entry_points.txt +2 -0
  44. tex2pptx-0.1.0/src/tex2pptx.egg-info/requires.txt +16 -0
  45. tex2pptx-0.1.0/src/tex2pptx.egg-info/top_level.txt +2 -0
tex2pptx-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Zhuoxiang (Shawn) Zhou
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,20 @@
1
+ include LICENSE
2
+ include PYPI.md
3
+ include THIRD_PARTY_NOTICES.md
4
+ include pyproject.toml
5
+
6
+ recursive-include src/tex2pptx/data *.cjs *.LEGAL.txt *.yaml
7
+
8
+ exclude README.md
9
+ prune .github
10
+ prune docs
11
+ prune node_modules
12
+ prune schemas
13
+ prune scripts
14
+ prune src/pptx-writer
15
+ prune tests
16
+ prune work
17
+
18
+ global-exclude .DS_Store
19
+ global-exclude *.py[cod]
20
+ global-exclude __pycache__
@@ -0,0 +1,126 @@
1
+ Metadata-Version: 2.4
2
+ Name: tex2pptx
3
+ Version: 0.1.0
4
+ Summary: Editable-first LaTeX/Beamer to PowerPoint conversion workflow
5
+ Author: Zhuoxiang (Shawn) Zhou
6
+ License-Expression: MIT AND ISC AND Zlib
7
+ Keywords: beamer,latex,powerpoint,pptx,presentation
8
+ Classifier: Development Status :: 3 - Alpha
9
+ Classifier: Environment :: Console
10
+ Classifier: Intended Audience :: Science/Research
11
+ Classifier: Operating System :: MacOS
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Programming Language :: Python :: 3.13
16
+ Classifier: Programming Language :: Python :: 3.14
17
+ Classifier: Topic :: Office/Business :: Office Suites
18
+ Classifier: Topic :: Text Processing :: Markup :: LaTeX
19
+ Requires-Python: >=3.11
20
+ Description-Content-Type: text/markdown
21
+ License-File: LICENSE
22
+ License-File: THIRD_PARTY_NOTICES.md
23
+ License-File: src/tex2pptx/data/pptx-writer.cjs.LEGAL.txt
24
+ Requires-Dist: lxml<7,>=5.0
25
+ Requires-Dist: numpy<3,>=2.0
26
+ Requires-Dist: Pillow<13,>=11.0
27
+ Requires-Dist: pydantic<3,>=2.9
28
+ Requires-Dist: pylatexenc<3,>=2.10
29
+ Requires-Dist: PyMuPDF<2,>=1.24
30
+ Requires-Dist: PyYAML<7,>=6.0
31
+ Requires-Dist: rich<15,>=13.9
32
+ Requires-Dist: scikit-image<1,>=0.24
33
+ Requires-Dist: typer<1,>=0.15
34
+ Provides-Extra: dev
35
+ Requires-Dist: build<2,>=1.2; extra == "dev"
36
+ Requires-Dist: pytest<10,>=8.3; extra == "dev"
37
+ Requires-Dist: pytest-cov<8,>=6.0; extra == "dev"
38
+ Requires-Dist: twine<7,>=6.0; extra == "dev"
39
+ Dynamic: license-file
40
+
41
+ # tex2pptx
42
+
43
+ `tex2pptx` converts a LaTeX Beamer presentation into an editable Microsoft
44
+ PowerPoint deck. It keeps supported text, lists, equations, tables, shapes,
45
+ links, and notes editable, while figures remain movable and resizable assets.
46
+
47
+ The converter also produces PDFs of the LaTeX and PowerPoint renderings and an
48
+ HTML report for reviewing visual differences and conversion diagnostics.
49
+
50
+ ## Install
51
+
52
+ Create an isolated Python environment and install the released package:
53
+
54
+ ```bash
55
+ python3 -m venv .venv
56
+ source .venv/bin/activate
57
+ python -m pip install --upgrade pip
58
+ python -m pip install tex2pptx==0.1.0
59
+ ```
60
+
61
+ The package includes its compiled PowerPoint writer. You do not need the
62
+ development repository, pnpm, TypeScript, or a local `node_modules` directory.
63
+
64
+ ## System requirements
65
+
66
+ The complete conversion workflow currently requires:
67
+
68
+ - macOS with a logged-in desktop session
69
+ - Python 3.11 or newer
70
+ - Node.js 22 or newer
71
+ - Pandoc
72
+ - MacTeX or an equivalent TeX Live installation
73
+ - Microsoft PowerPoint installed at
74
+ `/Applications/Microsoft PowerPoint.app`
75
+
76
+ The TeX installation must provide `latexmk`, SyncTeX, `dvisvgm`, pdfLaTeX,
77
+ XeLaTeX, and LuaLaTeX. Check the installation before converting a deck:
78
+
79
+ ```bash
80
+ tex2pptx doctor
81
+ ```
82
+
83
+ The command reports every missing or unsupported prerequisite and a suggested
84
+ remedy.
85
+
86
+ ## Convert a presentation
87
+
88
+ Inspect the main Beamer file without creating conversion artifacts:
89
+
90
+ ```bash
91
+ tex2pptx inspect path/to/presentation.tex
92
+ ```
93
+
94
+ Convert it into an explicit output directory:
95
+
96
+ ```bash
97
+ tex2pptx convert path/to/presentation.tex --to path/to/output
98
+ ```
99
+
100
+ For `presentation.tex`, the output directory contains:
101
+
102
+ ```text
103
+ presentation.pptx
104
+ presentation-from-latex.pdf
105
+ presentation-from-powerpoint.pdf
106
+ presentation-report/
107
+ ```
108
+
109
+ PowerPoint opens during final validation. On first use, macOS may ask for
110
+ Automation permission; grant access and let the command finish before using
111
+ PowerPoint. Review the two PDFs and the HTML conversion report before
112
+ circulating the deck.
113
+
114
+ ## Troubleshooting
115
+
116
+ - If `tex2pptx` is not found, activate the virtual environment in which it was
117
+ installed.
118
+ - If `doctor` reports an old or missing Node.js runtime, install Node.js 22 or
119
+ newer and open a new terminal.
120
+ - If TeX commands are missing after installing MacTeX, open a new terminal so
121
+ its command directory is added to `PATH`.
122
+ - If PowerPoint validation fails, confirm that PowerPoint is installed in
123
+ `/Applications` and that macOS Automation permission has been granted to the
124
+ terminal application running `tex2pptx`.
125
+ - If conversion completes with warnings, open the generated HTML report and
126
+ review the listed slides and fallback objects.
tex2pptx-0.1.0/PYPI.md ADDED
@@ -0,0 +1,86 @@
1
+ # tex2pptx
2
+
3
+ `tex2pptx` converts a LaTeX Beamer presentation into an editable Microsoft
4
+ PowerPoint deck. It keeps supported text, lists, equations, tables, shapes,
5
+ links, and notes editable, while figures remain movable and resizable assets.
6
+
7
+ The converter also produces PDFs of the LaTeX and PowerPoint renderings and an
8
+ HTML report for reviewing visual differences and conversion diagnostics.
9
+
10
+ ## Install
11
+
12
+ Create an isolated Python environment and install the released package:
13
+
14
+ ```bash
15
+ python3 -m venv .venv
16
+ source .venv/bin/activate
17
+ python -m pip install --upgrade pip
18
+ python -m pip install tex2pptx==0.1.0
19
+ ```
20
+
21
+ The package includes its compiled PowerPoint writer. You do not need the
22
+ development repository, pnpm, TypeScript, or a local `node_modules` directory.
23
+
24
+ ## System requirements
25
+
26
+ The complete conversion workflow currently requires:
27
+
28
+ - macOS with a logged-in desktop session
29
+ - Python 3.11 or newer
30
+ - Node.js 22 or newer
31
+ - Pandoc
32
+ - MacTeX or an equivalent TeX Live installation
33
+ - Microsoft PowerPoint installed at
34
+ `/Applications/Microsoft PowerPoint.app`
35
+
36
+ The TeX installation must provide `latexmk`, SyncTeX, `dvisvgm`, pdfLaTeX,
37
+ XeLaTeX, and LuaLaTeX. Check the installation before converting a deck:
38
+
39
+ ```bash
40
+ tex2pptx doctor
41
+ ```
42
+
43
+ The command reports every missing or unsupported prerequisite and a suggested
44
+ remedy.
45
+
46
+ ## Convert a presentation
47
+
48
+ Inspect the main Beamer file without creating conversion artifacts:
49
+
50
+ ```bash
51
+ tex2pptx inspect path/to/presentation.tex
52
+ ```
53
+
54
+ Convert it into an explicit output directory:
55
+
56
+ ```bash
57
+ tex2pptx convert path/to/presentation.tex --to path/to/output
58
+ ```
59
+
60
+ For `presentation.tex`, the output directory contains:
61
+
62
+ ```text
63
+ presentation.pptx
64
+ presentation-from-latex.pdf
65
+ presentation-from-powerpoint.pdf
66
+ presentation-report/
67
+ ```
68
+
69
+ PowerPoint opens during final validation. On first use, macOS may ask for
70
+ Automation permission; grant access and let the command finish before using
71
+ PowerPoint. Review the two PDFs and the HTML conversion report before
72
+ circulating the deck.
73
+
74
+ ## Troubleshooting
75
+
76
+ - If `tex2pptx` is not found, activate the virtual environment in which it was
77
+ installed.
78
+ - If `doctor` reports an old or missing Node.js runtime, install Node.js 22 or
79
+ newer and open a new terminal.
80
+ - If TeX commands are missing after installing MacTeX, open a new terminal so
81
+ its command directory is added to `PATH`.
82
+ - If PowerPoint validation fails, confirm that PowerPoint is installed in
83
+ `/Applications` and that macOS Automation permission has been granted to the
84
+ terminal application running `tex2pptx`.
85
+ - If conversion completes with warnings, open the generated HTML report and
86
+ review the listed slides and fallback objects.
@@ -0,0 +1,17 @@
1
+ # Third-party software notices
2
+
3
+ The `tex2pptx` distribution contains a bundled JavaScript PowerPoint writer.
4
+ The complete license notices for PptxGenJS and every package incorporated into
5
+ that bundle are distributed with the package as
6
+ `tex2pptx/data/pptx-writer.cjs.LEGAL.txt`.
7
+
8
+ The bundle's notices are generated from the dependency graph used to build the
9
+ writer. They must be regenerated and reviewed whenever the bundled JavaScript
10
+ dependencies change.
11
+
12
+ Python dependencies installed separately by a package manager are not copied
13
+ into the `tex2pptx` distribution. Their own distributions provide the terms
14
+ that govern them.
15
+
16
+ These notices are provided for attribution and do not replace or modify the
17
+ terms of any third-party license.
@@ -0,0 +1,78 @@
1
+ [build-system]
2
+ requires = ["setuptools>=77.0.3"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "tex2pptx"
7
+ version = "0.1.0"
8
+ description = "Editable-first LaTeX/Beamer to PowerPoint conversion workflow"
9
+ readme = { file = "PYPI.md", content-type = "text/markdown" }
10
+ requires-python = ">=3.11"
11
+ license = "MIT AND ISC AND Zlib"
12
+ license-files = [
13
+ "LICENSE",
14
+ "THIRD_PARTY_NOTICES.md",
15
+ "src/tex2pptx/data/pptx-writer.cjs.LEGAL.txt",
16
+ ]
17
+ authors = [
18
+ { name = "Zhuoxiang (Shawn) Zhou" },
19
+ ]
20
+ keywords = ["beamer", "latex", "powerpoint", "pptx", "presentation"]
21
+ classifiers = [
22
+ "Development Status :: 3 - Alpha",
23
+ "Environment :: Console",
24
+ "Intended Audience :: Science/Research",
25
+ "Operating System :: MacOS",
26
+ "Programming Language :: Python :: 3",
27
+ "Programming Language :: Python :: 3.11",
28
+ "Programming Language :: Python :: 3.12",
29
+ "Programming Language :: Python :: 3.13",
30
+ "Programming Language :: Python :: 3.14",
31
+ "Topic :: Office/Business :: Office Suites",
32
+ "Topic :: Text Processing :: Markup :: LaTeX",
33
+ ]
34
+ dependencies = [
35
+ "lxml>=5.0,<7",
36
+ "numpy>=2.0,<3",
37
+ "Pillow>=11.0,<13",
38
+ "pydantic>=2.9,<3",
39
+ "pylatexenc>=2.10,<3",
40
+ "PyMuPDF>=1.24,<2",
41
+ "PyYAML>=6.0,<7",
42
+ "rich>=13.9,<15",
43
+ "scikit-image>=0.24,<1",
44
+ "typer>=0.15,<1",
45
+ ]
46
+
47
+ [project.optional-dependencies]
48
+ dev = [
49
+ "build>=1.2,<2",
50
+ "pytest>=8.3,<10",
51
+ "pytest-cov>=6.0,<8",
52
+ "twine>=6.0,<7",
53
+ ]
54
+
55
+ [project.scripts]
56
+ tex2pptx = "tex2pptx.cli:app"
57
+
58
+ [tool.setuptools]
59
+ package-dir = {"" = "src"}
60
+ include-package-data = true
61
+
62
+ [tool.setuptools.packages.find]
63
+ where = ["src"]
64
+
65
+ [tool.setuptools.package-data]
66
+ tex2pptx = [
67
+ "data/*.cjs",
68
+ "data/*.LEGAL.txt",
69
+ "data/*.yaml",
70
+ ]
71
+
72
+ [tool.pytest.ini_options]
73
+ testpaths = ["tests"]
74
+ addopts = "-ra"
75
+ markers = [
76
+ "integration: exercises the TypeScript/PptxGenJS writer",
77
+ "regression: validates the PhoneBans end-to-end fixture artifacts",
78
+ ]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,3 @@
1
+ """Editable-first LaTeX/Beamer to PowerPoint conversion package."""
2
+
3
+ __version__ = "0.1.0"
@@ -0,0 +1,4 @@
1
+ from .cli import app
2
+
3
+
4
+ app()
@@ -0,0 +1,5 @@
1
+ """Source-to-PDF object alignment."""
2
+
3
+ from .matcher import build_deck_ir, recover_unicode_text
4
+
5
+ __all__ = ["build_deck_ir", "recover_unicode_text"]