summaryrefslogtreecommitdiff
path: root/README.md
blob: bc97467e4a89d5e6c9b655c2ebf68719385b088c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# ElenQ Documentation templates

`pandoc` templates for ElenQ documents.

## Installation

Run `install.sh` script and it'll automagically link all the templates to your
`~/.pandoc/templates/` folder.

This method doesn't work on a non-Unix-like OS.


## Usage

Once installed `pandoc` will be aware of the place where the templates are so
they can be used directly like:

```
pandoc input.md -o output.pdf --template=elenq-article
```

### Specific details

These templates only work with `pandoc`'s `--latex-engine=xelatex` option.

> NOTE: Recent `pandoc` versions changed the name of the option to `--pdf-engine`

### Metadata

Templates expect some metadata to be set, no field is mandatory but some can be
important (judge yourself):

``` yaml
lang: english | spanish | basque | ...
title: The title of the document
subtitle: The subtitle of the article
author: Author's name
license: License of the document
```

Templates also accept any metadata valid for Pandoc.

> NOTE: Templates automatically put the copyleft symbol in the PDF, they are
> only prepared for copyleft licenses.

### Helpful help

You'd probably want to create some aliases like these:

``` bash
# Pandoc for ElenQ
alias pandoc-xelatex="pandoc $@ --latex-engine=xelatex --to latex -N"
alias elenqdoc-article="pandoc-xelatex $@ --template elenq-article --variable=documentclass:article"
alias elenqdoc-book="pandoc-xelatex $@  --template elenq-book --variable=documentclass:book"
```

## Editing

Just edit the content of the templates as they were LaTeX files.

### Logos

The ElenQ Technology logo is embedded inside the templates as a `tikz` image.

There's a way to convert from SVG to TikZ you'd probably want to use to change
the logo from the templates.

https://github.com/kjellmf/svg2tikz

## License

This repository is distributed under the terms of the Apache License 2.0.