Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/huangfusl/latex-template
Multi-function LaTeX template
https://github.com/huangfusl/latex-template
beamer-template latex latex-beamer latex-class latex-template template xelatex
Last synced: 22 days ago
JSON representation
Multi-function LaTeX template
- Host: GitHub
- URL: https://github.com/huangfusl/latex-template
- Owner: HuangFuSL
- License: mit
- Created: 2023-08-08T07:01:44.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-24T11:51:08.000Z (10 months ago)
- Last Synced: 2024-11-15T11:08:39.503Z (3 months ago)
- Topics: beamer-template, latex, latex-beamer, latex-class, latex-template, template, xelatex
- Language: TeX
- Homepage:
- Size: 101 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# latex-template
My latex template
## Features
Four modes are provided within the template, specify using document class arguments
* Article mode: `\documentclass[article]{huangfusl-template}`
* Beamer mode: `\documentclass[beamer]{huangfusl-template}`
* Book mode: `\documentclass[book]{huangfusl-template}`
* Standalone mode: `\documentclass[standalone]{huangfusl-template}`### Common features
* Abbreviation for single letter `\mathbb`, `\mathbf`, `\mathcal`, `\mathrm` and `\boldsymbol`.
* Abbreviation for some math operators.
* CJK support provided by `ctex` package, use `cn` argument to enable, `en` to disable.
* `\ssection`, `\ssubsection` and `\ssubsubsection` to hide section numbering while keeps table of contents entry.
* Produce PDF-A documents.
* `\remember` and `\recall` to repeat equations.
* `ctheorem`, `clemma`, `cdefinition`, `cexample`, `cnotice`, `calgorithm` environments provided by `tcolorbox`.
* Asterisk version to disable numbering.
* Double asterisk version to disable numbering and hide title.Packages automatically loaded:
* `listings`: Code listing
* `biblatex`: Bibliography
* `tcolorbox`: Colored boxes
* `calligra`: Calligraphy fonts
* `pgf`: Plotting
* `booktabs`: Better tables
* `algorithm2e`: Algorithms### Article mode
* Pre-configured font, spacing, header and footer.
* `\subtitle` command to set document subtitle.
* `\articlefront` as shortcut for a title and toc page.
* `\watermarkon` and `\watermarkoff` to toggle watermark.### Beamer mode
* Theme pre-configured and locked.
* Support for [Présentation.app](http://iihm.imag.fr/blanch/software/osx-presentation/)### Book mode
* Pre-configured font, spacing, header and footer.
* `\watermarkon` and `\watermarkoff` to toggle watermark.### Backward compatibility
Use `version=` to specify the template version. Newer version of template is backward-compatible.
```tex
\documentclass[article, cn, version=2.0]{huangfusl-template}
```For changelog, refer to [Releases](https://github.com/HuangFuSL/latex-template/releases)
## Configuration
### Use directly
Before compiling any documents, simply add the path containing `huangfusl-template.cls` to `TEXINPUTS` environment variable.
```bash
export TEXINPUTS=/path-to-template//:
```Notice that XMP metadata will NOT be available if you don't use `makefile`. (PDF-A standard will still be met)
### Use via makefile
* Copy or link `makefile.latex.template` to `/usr/include`.
* Edit `export TEXINPUTS = /opt/template//:` line to match the path to `huangfusl-template.cls`
* Create a `makefile` in the project:```makefile
TARGET =include makefile.latex.template
```* Execute `make default` to compile the document.
Use `make help` to check all the build targets and environment variable options.
### Use via docker
The docker image contains the template itself, together with a full texlive installation. Using docker, one can achieve compiling `.tex` documents pure remotely on a docker host. It does not require the local machine to have texlive installed. However, as all texlive packages have been installed in the docker image, the size of image is kind of large (~5GB).
The workflow has been integrated into `makefile` process. Simply pass `DOCKER=1` environment variable to switch to docker.
```bash
make default DOCKER=1
```## LaTeX Workshop integration
### Use directly
Add `env` option to toolchain in `settings.json`:
```json
{
"name": "XeLaTeX",
"command": "xelatex",
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"%DOCFILE%"
],
"env": {
"TEXINPUTS": "//:"
}
}
```### Use makefile
First configure `makefile.latex.template`, write a `makefile`. Add the following compile tools in `latex-workshop.latex.tools` section of `settings.json`.
```json
{
"name": "Make",
"command": "make",
"args": [ "default" ]
}
```Add `DOCKER=1` environment variable to use docker, add `DOCKER_CONTEXT` environment variable to switch context