A pure python library implemented by python3 for writing Latex formulas to word.
Project description
LatexToWord
A pure python library implemented by python3 for writing Latex formulas to word.
USAGE
pip install latex2word
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:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
latex2word-1.0.tar.gz
(4.1 kB
view details)
Built Distribution
File details
Details for the file latex2word-1.0.tar.gz
.
File metadata
- Download URL: latex2word-1.0.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5138c8f8c833c805dbc80ddcb477111ba1c60ab16918e58b3a688e2432d52511 |
|
MD5 | a7b6a3184f6442362d148fa914504b84 |
|
BLAKE2b-256 | 90b0ed590deb56c2b3a7ca2dbb26159af2fd6641e0a6066b0064748e7d67d164 |
File details
Details for the file latex2word-1.0-py3-none-any.whl
.
File metadata
- Download URL: latex2word-1.0-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c45193f2d49a97648907f3329a6a2bb663d6f965f3b03a827ba4200adfc6d5d |
|
MD5 | 9bddffac21f107157e738516317cb86a |
|
BLAKE2b-256 | 667462eb1026e65ff3f6de1205d56257d57e10d45d4e18374ac9836309dca238 |