# The document template The document template is for turning a simple mardown file into a PDF via LaTeX automatically in GitLab. This can be done in any repository. ## Using the template 1. Create a mardown document in the repository. For example `file.md` in directory `documents` 1. Create a file called `.gitlab-ci.yml` in the root of the repository. 1. Copy the following code to `.gitlab-ci.yml` ```yaml stages: - build #This job uses the template below. Modify this job to add files compile: extends: .compile script: - cd documents - pandoc file.md -o flie.pdf -M documentclass=otfndoc ##### TEMPLATE STARTS # Standard template for OTFN document jobs. Don't edit this here except to if the standard template updates .compile: image: name: pandoc/latex entrypoint: ["/bin/sh", "-c"] stage: build before_script: - apk add git - git clone https://gitlab.fabcity.hamburg/OTFN/design.git - echo "TEXMFHOME = $(pwd)/design/texroot" >> $(kpsewhich texmf.cnf) - tlmgr update --self - tlmgr install roboto fontaxes sectsty artifacts: paths: - "*.pdf" - "**/*.pdf" exclude: - "design/**/*.pdf" expire_in: 1 week ##### TEMPLATE ENDS ``` 4. Save the file, commit it, and push to gitlab