Skip to main content

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

https://github.com/jeck5iv

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

texcellent_wondertex_latex_generator-0.1.0.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

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

File details

Details for the file texcellent_wondertex_latex_generator-0.1.0.tar.gz.

File metadata

File hashes

Hashes for texcellent_wondertex_latex_generator-0.1.0.tar.gz
Algorithm Hash digest
SHA256 92316d9559a207d6ccf51d68c3f11cde3da580a3d63b81eabfa0848fc603f327
MD5 4c96fef47cfeaef877b9d655bee05d10
BLAKE2b-256 6bf565d4ec493f953c1e453ea1c48539687987f48466e83b512251e75af528e1

See more details on using hashes here.

File details

Details for the file texcellent_wondertex_latex_generator-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for texcellent_wondertex_latex_generator-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 26d88489b8ea79918fbce4bd783d631028b2cf6f85bba81720863acd43eecfd0
MD5 fa2886d0104df2802c2bd0f5a188ca61
BLAKE2b-256 036e7f2aeda9fd2b465a85876891f23f2c440e9fad8dc6b5e90f6b7176d50eb2

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