A library to generate LaTeX code for tables and images.
Project description
LaTeX Generator
A Python library to generate LaTeX code for tables and images.
Installation
You can install the library using pip:
pip install latex_generator
If you want to install it directly from the source, clone the repository and run:
pip install .
Usage
The library provides functions to generate LaTeX code for tables and images. You can combine them to create a complete LaTeX document.
Example 1: Generating a Table
from latex_generator import generate_latex
data = [
["ID", "Name", "POWER"],
[1, "Ann", 9],
[2, "Boris", 30],
[3, "C. A. T.", 1000000000]
]
latex_code = generate_latex(data=data)
print(latex_code)
Example 2: Generating an Image
from latex_generator import generate_latex
latex_code = generate_latex(image_path="example.png")
print(latex_code)
Example 3: Combining Table and Image
from latex_generator import generate_latex
data = [
["ID", "Name", "POWER"],
[1, "Ann", 9],
[2, "Boris", 30],
[3, "C. A. T.", 1000000000]
]
latex_code = generate_latex(data=data, image_path="example.png")
print(latex_code)
Output
The output will be a complete LaTeX document:
\documentclass{article}
\usepackage{booktabs}
\usepackage{graphicx}
\begin{document}
\begin{table}[h]
\centering
\begin{tabular}{| c | c | c |}
\hline
ID & Name & POWER \\
\hline
1 & Ann & 9 \\
\hline
2 & Boris & 30 \\
\hline
3 & C. A. T. & 1000000000 \\
\hline
\end{tabular}
\caption{Table}
\label{tab:example}
\end{table}
\begin{figure}[h]
\centering
\includegraphics[width=0.5\textwidth]{example.png}
\caption{Example Image}
\label{fig:example}
\end{figure}
\end{document}
License
This project is licensed under the MIT License. See the LICENSE file for details.
Contributing
No contributing.
Author
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file texcellent_wondertex_dragon_phoenix_ninja_unicorn_texas_ranger_latex_masterpiece_generator-0.1.0.tar.gz.
File metadata
- Download URL: texcellent_wondertex_dragon_phoenix_ninja_unicorn_texas_ranger_latex_masterpiece_generator-0.1.0.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
52a15396871b7d2a009d17fc38720126180f8a398a2ad1b931f2c038f6786bef
|
|
| MD5 |
1003d560b7ca4c85bbcb81929538ce20
|
|
| BLAKE2b-256 |
734d0fb7ac9800c0917d476bf5defdac98b5b189d3225ab8b457ca992827bc89
|
File details
Details for the file texcellent_wondertex_dragon_phoenix_ninja_unicorn_texas_ranger_latex_masterpiece_generator-0.1.0-py3-none-any.whl.
File metadata
- Download URL: texcellent_wondertex_dragon_phoenix_ninja_unicorn_texas_ranger_latex_masterpiece_generator-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aee07a4f52e34f3571b2872d3245efc0b2f7f15f3a2d2609e187c7faf5f9939d
|
|
| MD5 |
7ae93fddf096280f09ae81009daea42e
|
|
| BLAKE2b-256 |
bf3f65917908ce72e7ad6a737d3b392e6c633c12b3adb32b145fdaf0e46aae74
|