From 93cb187c6d8268261eaea0e4689293d43000761f Mon Sep 17 00:00:00 2001 From: sdiehl Date: Sun, 16 Feb 2020 23:40:20 +0000 Subject: [PATCH] Update REAMDE --- Makefile | 4 +++- README.md | 64 +++++++++++++++++++++++++++++++++++++++++-------------- 2 files changed, 51 insertions(+), 17 deletions(-) diff --git a/Makefile b/Makefile index 0f3f7a2..ee2f807 100644 --- a/Makefile +++ b/Makefile @@ -22,6 +22,7 @@ EPUB = tutorial.epub PDF = tutorial.pdf PPDF = tutorial_print.pdf TEX = tutorial.tex +DOCX = tutorial.tex # LaTeX COVER = resources/cover.tex @@ -30,8 +31,9 @@ UNICODE_MAP = resources/unicodemapping.tex all: $(PDF) $(HTML) $(EPUB) html: $(HTML) -pdf: $(PDF) +docx: $(DOCX) epub: $(epub) +pdf: $(PDF) # Code snippet preprocessor includes: includes.hs diff --git a/README.md b/README.md index 5ca7db9..ebf8d53 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,10 @@ Contributing ------------ If you want to submit a fix for a typo or fix for code then just submit a pull -request, and I'm happy to recompile the resulting document. +request, and I'm happy to recompile the resulting document. Edit the following +Markdown file which generates all other targets. + +[tutorial.md](./tutorial.md) If for some reason you want to compile the HTML page yourself, then you'll need to compile the preprocessor against Pandoc and then run make to build the page. @@ -71,31 +74,60 @@ $ firefox tutorial.html Alternatively a PDF or EPUB file can be generated by one of the following commands: +**LaTeX** + ```bash $ apt-get install texlive texlive-xetex -$ make tutorial.pdf -$ make tutorial.epub +$ make pdf +$ make print ``` -Stack ------ - -Alternatively using the stack build system: +**HTML** ```bash -$ stack ghc includes.hs -- -o includes -$ stack exec make -$ firefox tutorial.html +$ make html +``` + +**Microsoft Word** + +```bash +$ make docx +``` + +**Ebook** + +```bash +$ make epub +``` + +Preproccssor +------------- + +To compile the preprocessor run either use Nix, Stack or Cabal to compile the +target in the cabal file. + +```bash +$ stack exec make # Stack +$ cabal exec make # Cabal +$ make run-shell && ghc --make includes.hs # Nix ``` License ------- -Stephen Diehl (2013-2019) +Copyright © 2009-2020 Stephen Diehl -No rights reserved. The person who associated a work with this deed has dedicated the work to the public -domain by waiving all of his or her rights to the work worldwide under copyright law, including all related -and neighboring rights, to the extent allowed by law. +This code included in the text is dedicated to the public domain. You can copy, +modify, distribute and perform the work, even for commercial purposes, all +without asking permission. -You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking -permission. +You may distribute this text in its full form freely, but may not reauthor or +sublicense this work. Any reproductions of major portions of the text must +include attribution. + +The software is provided "as is", without warranty of any kind, express or +implied, including But not limited to the warranties of merchantability, fitness +for a particular purpose and noninfringement. In no event shall the authors or +copyright holders be liable for any claim, damages or other liability, whether +in an action of contract, tort or otherwise, Arising from, out of or in +connection with the software or the use or other dealings in the software.