From 04100af0f5573f9197d41fa36b80e64e6bb7059c Mon Sep 17 00:00:00 2001 From: Dominik Becker Date: Tue, 10 Apr 2018 01:35:16 +0200 Subject: [PATCH] #3 Hunspell Spellcheck, Docs --- .gitlab-ci.yml | 13 ++++++++++++- .hunspellignore | 0 README.md | 17 +++++++++++++++-- 3 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 .hunspellignore diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4f5a9d0..656514b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,7 +1,8 @@ stages: + - test - build -pdf: +latexmk: stage: build tags: - latex @@ -11,3 +12,13 @@ pdf: expire_in: 2d script: - 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 \ No newline at end of file diff --git a/.hunspellignore b/.hunspellignore new file mode 100644 index 0000000..e69de29 diff --git a/README.md b/README.md index 4103d99..78550e5 100644 --- a/README.md +++ b/README.md @@ -80,8 +80,21 @@ Further configuration can be done in `config/config.tex`. ## Continuous Integration -The `.gitlab-ci.yml` file comes preconfigured to compile `main.tex` (and everything included here) to PDF using `pdflatex`. -Build output is the file `main.pdf` that can be downloaded from GitLab coordinator for two days (each pipeline run). +The `.gitlab-ci.yml` file comes preconfigured to spellcheck and compile the LaTex document. + +### 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.