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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

Details for the file latex-document-reader-1.0.1.tar.gz.

File metadata

  • Download URL: latex-document-reader-1.0.1.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for latex-document-reader-1.0.1.tar.gz
Algorithm Hash digest
SHA256 afc1a81a3a52b1e9189b6cfa44507bc81202f00ec67b7b3b7df2753a95297efc
MD5 c59fd0646edc497dbdf0b909507877cc
BLAKE2b-256 da3f046db06096667f806d460a5d9040e9f14de71f0aec18e032b5f7c8475f38

See more details on using hashes here.

File details

Details for the file latex_document_reader-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for latex_document_reader-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3aa4f03b09c85ac68567aeaf11653ac196a01a23c258a7e5fe40bec841609566
MD5 da5e784a041b097be32f273525515b6f
BLAKE2b-256 4f96d74d3af5bf5fa3088ffe2fc08b75941c09c89147ccbfd4318ffe2d0a546b

See more details on using hashes here.

Supported by

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