Skip to content

Commit

Permalink
Bump version 0.1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
hrushikeshrv committed Jun 20, 2021
1 parent 773cd32 commit bbf7ab0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
18 changes: 10 additions & 8 deletions docxlatex.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
Metadata-Version: 2.1
Name: docxlatex
Version: 0.1.5
Version: 0.1.6
Summary: Extract text from .docx files with support for inserted equations
Home-page: https://github.com/hrushikeshrv/docxlatex
Author: Hrushikesh Vaidya
Author-email: hrushikeshrv@gmail.com
License: MIT
Description: # docxlatex
A python library for extracting text from .docx files with LaTeX support
A python library for extracting text and images from .docx files with LaTeX support

Influenced by [python-docx](https://github.com/python-openxml/python-docx) and [python-docx2txt](https://github.com/ankushshah89/python-docx2txt).
This project aims to expand the above libraries' functionality by allowing you to extract the equations in a .docx file and converts them to valid LaTeX,
primarily for use with MathJax.

docxlatex DOES NOT convert the entire .docx file to a LaTeX source file.

docxlatex is still in beta and does not work perfectly on all equations. However,
it does work with reasonable accuracy on standard symbols and equations, and works reliably when the equations in the
document have been converted to linear format.

# Installation
Install using pip
`pip install docxlatex`
Expand All @@ -34,11 +38,9 @@ Description: # docxlatex
```

You can also set some settings on the `Document` object to customize behaviour, like setting the delimiters that will go before and after an equation,
and flags to extract header and footer text.
and flags to extract header and footer text. Read the documentation at [hrushikeshrv.github.io/docxlatex](https://hrushikeshrv.github.io/docxlatex) for all options.

```python
doc.get_header_text = True # False by default
doc.get_footer_text = True # False by default
doc.inline_delimiter = "%" # "$" by default
doc.block_delimiter = "%%" # "$$" by default
```
Expand All @@ -47,12 +49,12 @@ Description: # docxlatex
docxlatex currently requires all the mathematical equations in the .docx document to be converted into linear format to extract successfully. I am adding support for
equations in the professional format right now. Future releases will let you use it without having to use this workaround, but for now, make sure all the equations in the .docx file are converted into linear form.

To convert all your equations into linear format, click on any equation, go to the Equation tab, make sure LaTeX is selected, and click on Convert > All - Linear
To convert all your equations into linear format, click on any equation, go to the Equation tab, make sure LaTeX is selected, and click on Convert → All - Linear

Please report any bugs on this project's GitHub page [docxlatex/issues](https://github.com/hrushikeshrv/docxlatex/issues)

# TODOs
- [ ] Extract all images present in the file and return them as file-like objects
- [ ] Add support for equations in professional formatting
- [ ] Clean up equations in linear format that do not directly convert to valid LaTeX

Platform: UNKNOWN
Classifier: License :: OSI Approved :: MIT License
Expand Down
2 changes: 1 addition & 1 deletion docxlatex/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = '0.1.5'
__version__ = '0.1.6'

from docxlatex.docxlatex import Document
from docxlatex import tagparsers
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

setup(
name='docxlatex',
version='0.1.5',
version='0.1.6',
description='Extract text from .docx files with support for inserted equations',
long_description=README,
long_description_content_type='text/markdown',
Expand Down

0 comments on commit bbf7ab0

Please sign in to comment.