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
TexFile
, PlainArticle
, Article
, AmsArticle
, and more.This project requires the following dependencies to be installed on your system:
Python 3.x: This project is built using Python 3.x. If you don’t have Python 3.x installed, you can download it from the official Python website: Python Downloads
LaTeX Distribution: A LaTeX distribution is necessary to compile and generate documents from LaTeX source code. You can choose from the following popular LaTeX distributions:
TeX Live: TeX Live is a cross-platform, comprehensive distribution that provides a wide range of packages and tools for LaTeX typesetting. It’s available for various operating systems including Windows, macOS, and Linux. You can download TeX Live from their official website: TeX Live
MiKTeX: MiKTeX is a LaTeX distribution for Windows, known for its ease of installation and package management capabilities. It provides a user-friendly interface for package installation and updates. You can download MiKTeX from their official website: MiKTeX
MacTeX: MacTeX is a distribution specifically designed for macOS, providing everything you need to work with LaTeX on a Mac. It includes various tools and editors that integrate well with the macOS environment. You can download MacTeX from their official website: MacTeX
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.
Open a new terminal window and cd
to where you want to install LaTexBot
. Then follow the steps below:
git clone https://github.com/indrajit912/LaTexBot.git
cd LaTexBot
virtualenv
in your python distribution, install it using pip
).virtualenv env
virtualenv
source env/bin/activate
pip install -r requirements.txt
LaTexBot/
:
python3 examples/example_plain_article.py
If you see a pdf
then everything is working as fine!
Import the desired class (e.g. PlainArticle
) from the latex_bot
package into your Python script.
Create an PlainArticle
class object.
Use the provided methods to write and compile the document.
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()
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:cd
to LaTexBot
.virtualenv
(in case you are using one!)
source env/bin/activate
python3 main.py
LaTeX
project directory in the current working directory. You can copy that project somewhere else if you wish!For detailed documentation and examples, please refer to the LaTexBot Wiki (Will be updated soon!).
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.
This project is licensed under the MIT License. Feel free to use, modify, and distribute the code as per the terms of the license.