Skip to main content

LatexToWord

A pure python library implemented by python3 for writing Latex formulas to word.

Readme_CN

USAGE

Install

pip install latex2word

Example

from docx import Document
from latex2word import LatexToWordElement

"""
`pip install python-docx`  
常规用法  
General usage.  
"""

# 公式(Latex string)
latex_input = r"x={-b \pm \sqrt{b^2-4ac}\over 2a}"
# 构建latex_to_word对象 (Build latex_to_word objects)
latex_to_word = LatexToWordElement(latex_input)

# 插入word公式(Create the docx file and insert the element)
doc = Document()
paragraph = doc.add_paragraph()
latex_to_word.add_latex_to_paragraph(paragraph)

doc.save('test.docx')

Result:
demo

Metadata

Release files for latex2word 1.1

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

Source distribution (sdist)

Source distribution for latex2word 1.1
File Size Uploaded Provenance Actions
latex2word-1.1.tar.gz 4.3 kB Without provenance Details for latex2word-1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for latex2word 1.1
File Interpreter ABI Platform Actions
latex2word-1.1-py3-none-any.whl Python 3 none any Details for latex2word-1.1-py3-none-any.whl

Total release size: 8.9 kB

Release files / latex2word-1.1.tar.gz

Download URL latex2word-1.1.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
5c290dbbf71d4ef99fbaebb8ac462e8199a04147d5a202809e2a1b4a03122e5d
BLAKE2b-256 checksum
How to use checksums
9531ec13a3ee3d1a492a642f1c684053600d1ec866fb4ac22698e73c58f676c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.20

Release files / latex2word-1.1-py3-none-any.whl

Download URL latex2word-1.1-py3-none-any.whl
Size 4.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5e9505bbe934a3071e022a13c934733e3a5f83fa5dede425699aa2d5155e10a7
BLAKE2b-256 checksum
How to use checksums
e4f4b9eb1f86835a1befabafb0a66f8ced3ba97a022d25d4c7e1752e6b96c35b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.20

Security for latex2word 1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.1 This release

2 release files No provenance

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