diff --git a/Contributing.md b/Contributing.md index b094331..a804579 100644 --- a/Contributing.md +++ b/Contributing.md @@ -7,3 +7,25 @@ - After you're done with your edits, use `make` to build the pdf and verify that everything looks nice. + +## Building pdf files + +You can build other pdf version of the guide for languages other than +english. For instance, to build the french version: + + make pdf-lang GUIDE_LANG=fr + +This will output a `tutorial-fr.pdf` file. + +Currently the repository provides a `guide-*.md` file for the following +languages: + + Language | Parameter + ---------: | ------------- + German | `GUIDE_LANG=de` + Greek | `GUIDE_LANG=el` + Spanish | `GUIDE_LANG=es` + French | `GUIDE_LANG=fr` + Italian | `GUIDE_LANG=it` + Portuguese | `GUIDE_LANG=pt` + Turkish | `GUIDE_LANG=tr` diff --git a/Makefile b/Makefile index 0d02b04..40e5f83 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,8 @@ PANDOC = pandoc INPUT = README.md +INPUT_LANG = guide-$(GUIDE_LANG).md OUTPUT = tutorial.pdf +OUTPUT_LANG = tutorial-$(GUIDE_LANG).pdf TITLE = -V title=LearnHaskell AUTHOR = -V author=bitemyapp FONTSIZE = -V fontsize=12pt @@ -14,5 +16,8 @@ FLAGS = --normalize --smart --toc --latex-engine=xelatex $(VARIABLES) pdf: README.md $(PANDOC) -s $(INPUT) -o $(OUTPUT) $(FLAGS) --column=80 +pdf-lang: guide-$(GUIDE_LANG).md + $(PANDOC) -s $(INPUT_LANG) -o $(OUTPUT_LANG) $(FLAGS) --column=80 + dialogues: dialogues.md $(PANDOC) -s dialogues.md -o dialogues.pdf $(FLAGS) --column=80