A Python library for reading LaTeX documents and processing BibTeX files
Project description
LaTeX Document Reader
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
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
Built Distribution
Hashes for latex-document-reader-1.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | afc1a81a3a52b1e9189b6cfa44507bc81202f00ec67b7b3b7df2753a95297efc |
|
MD5 | c59fd0646edc497dbdf0b909507877cc |
|
BLAKE2b-256 | da3f046db06096667f806d460a5d9040e9f14de71f0aec18e032b5f7c8475f38 |
Hashes for latex_document_reader-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3aa4f03b09c85ac68567aeaf11653ac196a01a23c258a7e5fe40bec841609566 |
|
MD5 | da5e784a041b097be32f273525515b6f |
|
BLAKE2b-256 | 4f96d74d3af5bf5fa3088ffe2fc08b75941c09c89147ccbfd4318ffe2d0a546b |