From b9e297f4c04d7e785c7440e9eb9460efdf25381e Mon Sep 17 00:00:00 2001 From: crudo Date: Thu, 19 Apr 2018 16:01:33 +0200 Subject: [PATCH] Add Makefile --- Makefile | 61 ++++++++++++++++++++++++++++++++++++ criptolibretto.md => book.md | 9 ------ 2 files changed, 61 insertions(+), 9 deletions(-) create mode 100644 Makefile rename criptolibretto.md => book.md (96%) diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..fd32b17 --- /dev/null +++ b/Makefile @@ -0,0 +1,61 @@ +book-a4.pdf: book.md + pandoc \ + --standalone \ + --toc \ + --toc-depth 2 \ + --number-sections \ + --highlight-style zenburn \ + -V documentclass:article \ + -V papersize:a4 \ + -V fontsize:14pt \ + -V geometry:"top=2.5cm, \ + bottom=2.6cm, \ + left=2.8cm, \ + right=2.8cm" \ + $< -o $@ + +book-a4.ps: book-a4.pdf + pdf2ps $< $@ + +book-a4-signature.ps: book-a4.ps + psbook $< $@ + +book-a4-signature.pdf: book-a4-signature.ps + ps2pdf $< $@ + +book-a5.ps: book-a4.ps + psnup -2 $< $@ + +book-a5-signature.ps: book-a5.ps + psbook $< $@ + +book-a5-signature.pdf: book-a5-signature.ps + ps2pdf $< $@ + +.PHONY: clean +clean: + rm -f book-a4.pdf + rm -f book-a4.ps + rm -f book-a4-signature.pdf + rm -f book-a4-signature.ps + rm -f book-a5.pdf + rm -f book-a5.ps + rm -f book-a5-signature.pdf + rm -f book-a5-signature.ps + +.PHONY: help +help: + @echo "Usage:" + @echo " make TARGET" + @echo + @echo "Available targets:" + @echo " book-a4.pdf" + @echo " book-a4.ps" + @echo " book-a4-signature.pdf" + @echo " book-a4-signature.ps" + @echo " book-a5.pdf" + @echo " book-a5.ps" + @echo " book-a5-signature.pdf" + @echo " book-a5-signature.ps" + @echo " clean" + @echo " help" diff --git a/criptolibretto.md b/book.md similarity index 96% rename from criptolibretto.md rename to book.md index e097d2f..0f0dddb 100644 --- a/criptolibretto.md +++ b/book.md @@ -2,15 +2,6 @@ title: "Cripto libretto" author: Unit hacklab - unit@paranoici.org date: 15 Aprile 2018 -documentclass: extarticle -papersize: A4 -output: pdf_document -fontsize: 14pt -geometry: top=2.5cm, bottom=2.6cm, left=2.8cm, right=2.8cm -toc: true -number_sections: true -toc_depth: 2 -highlight: zenburn lang: italian ---