Metadata-Version: 2.3
Name: latex-jinja
Version: 0.3.1
Summary: Latex templating with Jinja and PDF conversion.
Project-URL: repository, https://github.com/JoelLefkowitz/latex
Project-URL: homepage, https://joellefkowitz.github.io/latex
Author-email: Joel Lefkowitz <joellefkowitz@hotmail.com>
License: # MIT License
        
        Copyright (c) 2024 Joel Lefkowitz
        
        Permission is hereby granted, free of charge, to any person obtaining a copy of
        this software and associated documentation files (the "Software"), to deal in
        the Software without restriction, including without limitation the rights to
        use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
        the Software, and to permit persons to whom the Software is furnished to do so,
        subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
        FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
        COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
        IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
        CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Keywords: PDF,jinja,latex,template
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Python: >=3.8
Requires-Dist: docopt~=0.6.2
Requires-Dist: jinja2~=3.0.0
Requires-Dist: rich~=13.9.4
Provides-Extra: all
Requires-Dist: autoflake~=1.4; extra == 'all'
Requires-Dist: black~=22.3.0; extra == 'all'
Requires-Dist: build~=1.2.0; extra == 'all'
Requires-Dist: bump2version~=1.0.0; extra == 'all'
Requires-Dist: furo~=2024.1.0; extra == 'all'
Requires-Dist: isort~=5.10.0; extra == 'all'
Requires-Dist: matplotlib~=3.8.0; extra == 'all'
Requires-Dist: mypy~=0.9; extra == 'all'
Requires-Dist: myst-parser~=2.0.0; extra == 'all'
Requires-Dist: pylint~=2.17.0; extra == 'all'
Requires-Dist: pytest-cov~=5.0.0; extra == 'all'
Requires-Dist: pytest~=7.1.0; extra == 'all'
Requires-Dist: sphinx-autoapi~=3.0.0; extra == 'all'
Requires-Dist: sphinxext-opengraph~=0.9.0; extra == 'all'
Requires-Dist: sphinx~=7.2.0; extra == 'all'
Requires-Dist: thx~=0.5.0; extra == 'all'
Requires-Dist: trufflehog3~=3.0.0; extra == 'all'
Requires-Dist: twine~=5.0.0; extra == 'all'
Requires-Dist: walkmate~=1.5.0; extra == 'all'
Description-Content-Type: text/markdown

# Latex Jinja

Latex templating with Jinja and PDF conversion.

![Review](https://img.shields.io/github/actions/workflow/status/JoelLefkowitz/latex-jinja/review.yaml)
![Version](https://img.shields.io/pypi/v/latex-jinja)
![Downloads](https://img.shields.io/pypi/dw/latex-jinja)
![Quality](https://img.shields.io/codacy/grade/6c16c26db4424b2a92fa96bc09c91dac)
![Coverage](https://img.shields.io/codacy/coverage/6c16c26db4424b2a92fa96bc09c91dac)

## Example

Copy the template files:

```
python -m latex-jinja init
```

```properties
INFO Copied "inputs.json"
INFO Copied "template.tex.j2"
```

This creates a [Jinja](https://jinja.palletsprojects.com) latex template and an inputs file:

`template.tex.j2`

```.j2
\documentclass[12pt]{article}
\begin{document}

\title{ {{title}} }
\maketitle

...

\end{document}
```

`inputs.json`

```json
{
  "author": "Author",
  "title": "Title"
}
```

Run the Jinja templating engine and produce a PDF:

```
python -m latex-jinja build
```

```properties
INFO Loaded inputs from "inputs.json"
INFO Rendered the template "template.tex.j2
INFO Created "article.pdf"
```

This will populate the template and produces a PDF:

![Example](docs/images/example.png)

## Installing

Download the [TeX distribution](https://miktex.org/), this includes `pdflatex` which is used by this package.

```bash
pip install latex-jinja
```

## Documentation

Documentation and more detailed examples are hosted on [Github Pages](https://joellefkowitz.github.io/latex).

## Tooling

### Dependencies

To install dependencies:

```bash
yarn install
pip install .[all]
```

### Tests

To run tests:

```bash
thx test
```

### Documentation

To generate the documentation locally:

```bash
thx docs
```

### Linters

To run linters:

```bash
thx lint
```

### Formatters

To run formatters:

```bash
thx format
```

## Contributing

Please read this repository's [Code of Conduct](CODE_OF_CONDUCT.md) which outlines our collaboration standards and the [Changelog](CHANGELOG.md) for details on breaking changes that have been made.

This repository adheres to semantic versioning standards. For more information on semantic versioning visit [SemVer](https://semver.org).

Bump2version is used to version and tag changes. For example:

```bash
bump2version patch
```

### Contributors

- [Joel Lefkowitz](https://github.com/joellefkowitz) - Initial work

## Remarks

Lots of love to the open source community!

<div align='center'>
    <img width=200 height=200 src='https://media.giphy.com/media/osAcIGTSyeovPq6Xph/giphy.gif' alt='Be kind to your mind' />
    <img width=200 height=200 src='https://media.giphy.com/media/KEAAbQ5clGWJwuJuZB/giphy.gif' alt='Love each other' />
    <img width=200 height=200 src='https://media.giphy.com/media/WRWykrFkxJA6JJuTvc/giphy.gif' alt="It's ok to have a bad day" />
</div>
