Haaga-Helia Pandoc Template - Write your Thesis in MarkDown

Front page of thesis in Haaga-Helia style, converted from MarkDown.

Write your thesis in MarkDown, a plain text format.

Use Pandoc and template to convert MarkDown to official Haaga-Helia format. My student Mika Rautio created Haaga-Helia Pandoc template.

In this tutorial, you'll convert Markdown to Haaga-Helia style PDF.

Docker Install

Install Docker and Git

$ sudo apt-get update
$ sudo apt-get -y install git docker.io

Download Mika's hh-templates project

$ git clone https://github.com/mrautio/hh-templates.git
$ cd hh-templates/

Build the Docker image you will use. First, 'docker pull' to update Debian base image. If you use too old image, you get "pandoc: unrecognized option '--pdf-engine=xelatex'". Then build it. The build takes 5-30 minutes.

$ sudo docker pull debian:latest
$ time sudo docker build -t hhtemplate -f Dockerfile .

Try it out - Convert README.md to PDF

Try it out. We can use README.md as a sample file

$ mkdir in/
$ cp -n README.md in/report.md
$ sudo docker run --rm --volume $(pwd)/in:/report -t hhtemplate -o /report/report.pdf /report/report.md --variable=hhtemplatetype:long

Looks good. Let's have a look at the generated report.pdf in any pdf viewer.

$ ls in/
report.md  report.pdf
$ exo-open in/report.pdf 

A PDF in Haaga-Helia style opens.

Keep editing in/report.md

You can now write your thesis in MarkDown. You can keep editing report.md, replacing the sample text with your thesis. To convert MarkDown to PDF, just run the 'sudo docker run..." command again.

Mika Rautio has licensed his work under the permissive unlicense, so he has already given his permission to use these templates.

Rautio, Mika 2021: hh-templates - Haaga-Helia pandoc/LaTeX document templates (local mirror hh-templates-main-mika-rautio-2021-02-18.zip). (This is the project used in this tutorial, outputs PDF. Permissive unlicense.)

Salmi, Kim 2016: md2HH - markdown to Haaga-Helia [Microsoft Word docx format] (local mirror md2HH-master-haaga-helia-markdown-to-docx-2016.zip) (No license specified)

Briefly in Finnish - Lyhyesti suomeksi

Kirjoita opinnäytetyö MarkDownilla. Opiskelijani Mika Rautio teki muotin, jolla MarkDownin voi kääntää suoraan Haaga-Helian raportointiohjeen mukaiseksi PDF:ksi. Haaga-Helian raportointiohje ottaa kantaa moneen asiaan: logo, marginaali, fontti, sisällys, kansilehti... Pandoc ja tämä pohja tekevät muotoilun automaattisesti. Kirjoittaminen on mukavampaa ilman Microsoft Wordia.

Adminstrivia

I completely changed the instructions after testing a bit more. Tested on Ubuntu 18.04.5 LTS with Docker 19.03, hh-templates 2021-02-17 commit 447f3f1. Tested again on Debian 10.7 Buster, Docker 18.09.1, hh-templates 2021-02-17 commit 447f3f1: compiling a PDF worked by copy-pasting the commands in this tutorial.