https://github.com/fabianwe/gummibaum
gummibaum is LaTeX template system.
https://github.com/fabianwe/gummibaum
golang latex template template-engine template-latex
Last synced: 3 months ago
JSON representation
gummibaum is LaTeX template system.
- Host: GitHub
- URL: https://github.com/fabianwe/gummibaum
- Owner: FabianWe
- License: apache-2.0
- Created: 2018-10-08T15:10:21.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-04-18T17:25:53.000Z (about 5 years ago)
- Last Synced: 2024-11-14T23:33:13.121Z (7 months ago)
- Topics: golang, latex, template, template-engine, template-latex
- Language: Go
- Size: 44.9 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gummibaum
gummibaum is LaTeX template engine. Sometimes you just want a template with placeholders and fill those placeholders with actual content, for example using placeholders $name in your tex code and replace them with a constant "John". Or you have data in form of a csv and create LaTeX code based on that data, for example creating a dynamic table.
gummibaum tries to be simple to use: It is not a LaTeX engine like LuaTeX but a simple static content creator that produces LaTeX output that can be compiled with `pdflatex`.
It supports two different modes: Expansion mode and template mode.
## Expansion Mode
The easiest mode to understand is the expansion mode. It takes a LaTeX file as input, replaces certain placeholders with values and and can be used to iterate over specific parts of the file. The advantage is that you can write a *.tex* file that you can compile with `pdflatex` and test how it looks like. Then use gummibaum to replace constant fields or use an easy way to iterate over content. It is not as flexible as the template mode though.
## Template Mode
Using Golangs template system and some additional functionality you can write LaTeX files that contain directives such as loops. This way you need to execute your template first to create a valid LaTeX file that can be compiled with `pdflatex`.
Expansion mode is more easy to understand but not as flexible as the template mode.
## Usage
For usage information please see the [Wiki](https://github.com/FabianWe/gummibaum/wiki) and use `./gummibaum --help` or `./gummibaum expand --help` or `./gummibaum template --help`.
## Installation
### From source
Requires a go compiler ≥ 1.9. Use `go get -u github.com/FabianWe/gummibaum/...`. Then you can `go build cmd/gummibaum/gummibaum.go`.
### Binaries
Precompiled binaries are available in the [releases section](https://github.com/FabianWe/gummibaum/releases).
Windows is not tested, for Linux: Place the executable `gummibaum` (rename to`gummibaum`) somewhere and execute it. The best thing is probably to put it in */usr/local/bin*.
## For Developers
You can find the documentation on [GoDoc](https://godoc.org/github.com/FabianWe/gummibaum).
## License
Copyright 2018 Fabian WenzelmannLicensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.