LaTexBot

Project Description

LaTexBot is a Python project developed by Indrajit Ghosh to simplify the process of writing and compiling LaTeX documents. The project provides a collection of classes that enable users to produce various LaTeX document templates with ease.

Author: Indrajit Ghosh

Project URL: LaTexBot

Features

Dependencies

This project requires the following dependencies to be installed on your system:

Before using this project, ensure that you have installed Python 3.x and one of the LaTeX distributions mentioned above. For detailed instructions on installing LaTeX, you can refer to the LaTeX Installation Guide created by Indrajit Ghosh.

Installation

Open a new terminal window and cd to where you want to install LaTexBot. Then follow the steps below:

  1. Clone the project from GitHub using the following command:
git clone https://github.com/indrajit912/LaTexBot.git
  1. Change into the project directory:
cd LaTexBot
  1. (Optional but Recommended) Create virtualenv (if you don’t have virtualenv in your python distribution, install it using pip).
virtualenv env
  1. (Optional, if you followed 3.) Activate the virtualenv
source env/bin/activate
  1. Install the required dependencies:
pip install -r requirements.txt
  1. Check whether everything is installed correctly by running the following script staying in the root directory LaTexBot/:
    python3 examples/example_plain_article.py
    

    If you see a pdf then everything is working as fine!

Usage

  1. Import the desired class (e.g. PlainArticle) from the latex_bot package into your Python script.

  2. Create an PlainArticle class object.

  3. Use the provided methods to write and compile the document.

Example.

from latex_bot import PlainArticle

# Create a PlainArticle document
document = PlainArticle(
    title="My LaTeX Document",
    project_dir="home/Desktop/new_plain_art" # Change with a proper path.
)

# Add sections, content, and other elements
document.add_section("Introduction")
document.add_text("This is the introduction section.")

# Create the document
document.show_output()
document.create()
  1. You can use LaTexBot to create a specific LaTeX templates, such as plainart, article, amsart, thesis, beamer etc. The bot will set up a LaTeX project directory with a predefined custom TeX settings for you everytime! See the example below:

Example

Documentation

For detailed documentation and examples, please refer to the LaTexBot Wiki (Will be updated soon!).

Contributions

Contributions to LaTexBot are welcome! If you find a bug, have a feature request, or want to contribute improvements, please submit a pull request or open an issue on GitHub.

Contact

License

This project is licensed under the MIT License. Feel free to use, modify, and distribute the code as per the terms of the license.