Metadata-Version: 2.4
Name: texcellentlatexgenerator
Version: 0.3.0
Summary: A library to generate LaTeX code for tables and images.
Home-page: https://github.com/jeck5iv/pythonHW
Author: Kalinin Ivan
Author-email: jeck5ivk@gmail.com
License: MIT
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: license-file
Dynamic: requires-python
Dynamic: summary

# LaTeX Generator

A Python library to generate LaTeX code for tables and images.

## Installation

You can install the library using `pip`:

```bash
pip install latex_generator
```

If you want to install it directly from the source, clone the repository and run:

```bash
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

```python
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

```python
from latex_generator import generate_latex

latex_code = generate_latex(image_path="example.png")
print(latex_code)
```

### Example 3: Combining Table and Image

```python
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:

```latex
\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](LICENSE) file for details.

## Contributing

No contributing.

## Author

[https://github.com/jeck5iv](https://github.com/jeck5iv)
