Skip to main content

gummi

Do you have a bunch of preamble files for your LaTeX documents and you reuse them all the time? What happens when you want to update these templates? You'll need to modify all the files in all your documents! Very time-consuming work, very boring, but thankfully, very easy to automate!

With gummi you can do just that! You just create a git repository with your template files in it and you can use them in every LaTeX document you have!

Table of Contents

  1. Install
  2. Commands
  3. Example: Create template, Use template, Update template

Install

Simply run

pip3 install gummi

Commands

init      Initializes a LaTeX document
check     Checks if any updates to the update are available
detach    Deletes all the template files
update    Updates the templates

You can use -h on any command to get help for this particular command.

Example

A LaTeX document of yours might usually look like this:

- .gitignore
- main.tex
- Makefile
- sections/
|      - section1.tex
|      - section2.tex
|      - section2.tex
- templates/
|      - logo/
|      |       logo.pdf
|      - preamle.tex
|      - header.tex
|      - footer.tex

Typically only the main.tex and sections change, the rest should be consistent over all your documents. Here is where gummi commes into play!

Create Templates

First, create an empty folder and open a terminal window in it. Then run

gummi init --template

Basically, not much happended but a gummi folder was created. Now, put all your template files into it as if the gummi folder was your root directory, like so:

- gummi/
|      - .gitignore
|      - Makefile
|      - templates/
|      |      - logo/
|      |      |       logo.pdf
|      |      - preamle.tex
|      |      - header.tex
|      |      - footer.tex

Push that stuff to the git service you prefer.

Use the Template

Now, visit your LaTeX document folder and again, open a terminal inside it. The structure of your document looks probably like this:

- main.tex
- sections/
|      - section1.tex
|      - section2.tex
|      - section2.tex

Time to bring up the magic! Run

gummi init

When asked for the git repository, enter the HTTPS clone URL of the repository and press enter. And this is how your document looks like afterwards:

- .gitignore
- .gummi/...
- main.tex
- Makefile
- sections/
|      - section1.tex
|      - section2.tex
|      - section2.tex
- templates/
|      - logo/
|      |       logo.pdf
|      - preamle.tex
|      - header.tex
|      - footer.tex

Update the Template

If your want to update your templates, for example remove the Makefile and add another one, do just that in your template repository and push the changes to the remote git server. Then, simply run

gummi update

in your LaTeX document. Your changes are applied immediately! Any changes made locally to a template file will not be lost, these files do not get updated.

The .gummi folder is important, it is responsible for tracking changes to your templates.

Move the binary to a place where your $PATH points to or extend the variable.

Metadata

Release files for gummi 1.3.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for gummi 1.3.4
File Interpreter ABI Platform Actions
gummi-1.3.4-py3-none-any.whl Python 3 none any Details for gummi-1.3.4-py3-none-any.whl

Release files / gummi-1.3.4-py3-none-any.whl

Download URL gummi-1.3.4-py3-none-any.whl
Size 9.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f98f7a079c8b1bfca5130da34d0c8b7e2cc0f60ea9380bfe0354c959d73d56c0
BLAKE2b-256 checksum
How to use checksums
f5f85047cb14ee6b2fe2cc2bb2420e88e38311ea22e32d74b3476693994991f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.40.1 CPython/3.8.9

Security for gummi 1.3.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page