Merge branch '3-spellcheck-using-hunspell' into 'master'

Resolve "Spellcheck using hunspell"

Closes #3

See merge request dominik/latex-boilerplate!3
This commit is contained in:
Dominik Becker 2018-04-10 01:36:08 +02:00
commit a01cc30673
3 changed files with 27 additions and 3 deletions

View File

@ -1,7 +1,8 @@
stages: stages:
- test
- build - build
pdf: latexmk:
stage: build stage: build
tags: tags:
- latex - latex
@ -11,3 +12,13 @@ pdf:
expire_in: 2d expire_in: 2d
script: script:
- latexmk -pdf - latexmk -pdf
hunspell:
stage: test
tags:
- hunspell
script:
- export HUNSPELL_FINDINGS=`for filename in chapter/*.tex; do hunspell -l -d de_DE_frami,en_US -p ./.hunspellignore -t $filename; done | sort | uniq`
- echo $HUNSPELL_FINDINGS
- test "$HUNSPELL_FINDINGS" == ""
allow_failure: true

0
.hunspellignore Normal file
View File

View File

@ -80,8 +80,21 @@ Further configuration can be done in `config/config.tex`.
## Continuous Integration ## Continuous Integration
The `.gitlab-ci.yml` file comes preconfigured to compile `main.tex` (and everything included here) to PDF using `pdflatex`. The `.gitlab-ci.yml` file comes preconfigured to spellcheck and compile the LaTex document.
Build output is the file `main.pdf` that can be downloaded from GitLab coordinator for two days (each pipeline run).
### Spellchecking
Spellchecking is done using `hunspell`.
As LaTex `\input` directives are not recognized, all TeX files containing content need to be spellchecked seperately.
Therefore, only the `chapter` files are included in the spellcheck.
If you need certain words to be ignored during spellcheck (e.g. if they're not in the standard dictionaries), please insert them into the file `.hunspellignore`.
This is a simple word list structured by one word per line.
By default, the spellcheck job is allowed to fail.
### Building the PDF
The CI pipeline will build `main.tex` (and everything included here) to PDF using `pdflatex`.
Build output is the file `main.pdf`, which can be downloaded from GitLab coordinator for two days (each pipeline run).
**(!)** Please adapt the configuration to your own runner setup if neccessary. **(!)** Please adapt the configuration to your own runner setup if neccessary.