-
Notifications
You must be signed in to change notification settings - Fork 0
Home
This project automates the conversion of LaTeX equations into Microsoft Word documents. It leverages a combination of Python and VBA macros to process LaTeX code and render it as OMath objects in Word.
The system reads LaTeX Equations from a Word document, sends them to a Python script for processing, and re-inserts the converted equations back into the document. This allows for quick and efficient mathematical document editing in Word.
- Convert LaTeX Math: Converts basic LaTeX equations (e.g., fractions, summations, integrals) into professional Word equations.
-
Symbol Replacement: Automatically replaces LaTeX-specific symbols (like
\cdot
,\div
, etc.) with Unicode equivalents. -
Preserves Fractions: Ensures up-down fraction formatting (
\frac{}
) in the resulting Word document. - Handles Nested Fractions: Can process nested fractions and complex mathematical expressions.
- Greek Letters & Special Symbols: Includes support for common Greek letters and special characters used in equations.
-
Install Python and Required Libraries: Make sure you have Python installed. The following Python libraries are required:
pylatexenc
python-docx
You can install them using:
`pip install pylatexenc python-docx`
-
Install VBA Macro:
Open your Word document. Navigate to Developer > Visual Basic. Copy the provided VBA code from this repository and paste it into the ThisDocument section in the Visual Basic Editor.
- Link to Python Script: Update the paths in the VBA code to match your local environment where the Python script is saved.