Skip to main content

A Python library for reading LaTeX documents and processing BibTeX files

Project description

LaTeX Document Reader

PyPI version License

A Python library for reading LaTeX documents and processing BibTeX files.

Installation

You can install the library using pip:

pip install latex-document-reader

Usage

Reading LaTeX Documents To read a LaTeX document, create an instance of the LaTeXDocumentReader class, passing the file path of the document as a parameter. Then, use the read_document method to retrieve the content of the document.

from latex_document_reader import LaTeXDocumentReader

# Create an instance of LaTeXDocumentReader
document_reader = LaTeXDocumentReader('path/to/your/document.tex')

# Read the LaTeX document
content = document_reader.read_document()

# Print the content
print(content)

Reading BibTeX Files

To process a BibTeX file, use the read_bibtex method of the LaTeXDocumentReader class, passing the file path of the BibTeX file as a parameter.

from latex_document_reader import LaTeXDocumentReader

# Create an instance of LaTeXDocumentReader
document_reader = LaTeXDocumentReader('path/to/your/document.tex')

# Read a BibTeX file
bibtex_content = document_reader.read_bibtex('path/to/your/references.bib')

# Print the BibTeX content
print(bibtex_content)

Making the File Human-Readable

The library also provides a make_readable method that can be used to process the content of a LaTeX document or any other text and make it human-readable. You can customize the method according to your specific requirements.

from latex_document_reader import LaTeXDocumentReader

# Create an instance of LaTeXDocumentReader
document_reader = LaTeXDocumentReader('path/to/your/document.tex')

# Read the LaTeX document
content = document_reader.read_document()

# Make the content human-readable
readable_content = document_reader.make_readable(content)

# Print the human-readable content
print(readable_content)

License

This project is licensed under the MIT License - see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

latex-document-reader-1.0.1.tar.gz (3.3 kB view hashes)

Uploaded Source

Built Distribution

latex_document_reader-1.0.1-py3-none-any.whl (3.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page