diff --git a/README.md b/README.md index 00e837e..2c9f6d9 100644 --- a/README.md +++ b/README.md @@ -4,17 +4,19 @@ E-book publishing projects for generating fiction works, zines, documentation, a Write in markdown, compile beautiful pdfs, and ebooks. +> to compile, create and edit markdown files in the project `inputs/` subdirectory and then just type `make` in the project directory. + TEMPLATES: ---------- * ebook-story book: short stories, fiction works, verse. +* recipes: standalone recipe pages, should be able to include in book template in the future. * Upcoming: + seriousbook: nonfiction, technical documentation, etc. * pamphlets: short informative works. * flier-sm-poster: small poster (A4/letter) fliers or posters * menu: menus for foods, goods, services - * recipes: standalone recipes, should be able to include in book template in the future. REQUIREMENTS: ------------- @@ -24,6 +26,7 @@ REQUIREMENTS: * Lipsum package to compile demos * perl5 (req'd by texlive-full) * pandoc +* gnu make DEVELOPMENT MAP: @@ -33,7 +36,7 @@ DEVELOPMENT MAP: * Identify templates for inclusion in project * Modify templates to follow editing conventions (markdown \includes, etc.) * get them working & then use githooks to streamline testing during development. -* Begin work on makefiles `[/]` +* Begin work on makefiles `[X]` * Begin work on other output formats using pandoc - ebook formats, html formats(will need css magics) @@ -41,6 +44,8 @@ TODO: ----- * Define auxfiles directory and succeed in compiling pdf without losing aux files. -* Makefile framework for projects -* Change script md2pdf.sh to move .tex files to a different directory to compile from, isolate "*.md" files +* Makefile framework for projects `[STARTED]` +* ~~Change script md2pdf.sh to move .tex files to a different directory to compile from, isolate "*.md" files~~ +* Makefiles - standardize the kinds of targets, document default targets, etc. + diff --git a/recipes/Makefile b/recipes/Makefile new file mode 100644 index 0000000..1fd9aac --- /dev/null +++ b/recipes/Makefile @@ -0,0 +1,43 @@ +#Makefile for individual recipe pdfs using pandoc + +#some variable declarations +# Directories for document inputs (markdown) and outputs (pdf) and pandoc template (tex) +INPUTDIR = inputs +OUTPUTDIR = outputs +TEMPLATEDIR = templates + +# Program and option variables +CC = pandoc +PANTEMPLATE = $(TEMPLATEDIR)/recipe.tex#specifying template as variable for easier changing of templates. +PANDOCFLAGS = -s --template="$(PANTEMPLATE)" + +MDS = $(wildcard $(INPUTDIR)/*.md) +PDFS = $(patsubst %.md,$(OUTPUTDIR)/%.pdf,$(notdir $(wildcard $(INPUTDIR)/*.md))) +#PDFS = $(patsubst $(INPUTDIR),$(OUTPUTDIR),$(PDFS)) +#PDFS = $(wildcard $(OUTPUTDIR)/*.pdf) +#PDFS = $(patsubst %.md,%.md.pdf,$(MDS)) +#PDFS = $(patsubst %.md,%.md.pdf,$(wildcard $(INPUTDIR)/*.md)) +# +.PHONY : clean test + +default : $(PDFS) +#default : $(OUTPUTDIR)/%.pdf + + +$(PDFS) : $(MDS) +#$(OUTPUTDIR)/%.pdf : $(MDS) +# $(CC) $(PANDOCFLAGS) $< -o $(OUTPUTDIR)/$@ # + $(CC) $(PANDOCFLAGS) $< -o $@ # +# echo $(CC) $(PANDOCFLAGS) $< -o $@ # + + +all : clean $(PDFS) + +clean : + @rm -f $(PDFS) + + +test : + echo $(CC) $(PANDOCFLAGS) $< -o $(OUTPUTDIR)/$@ # + echo $(MDS) + echo $(PDFS) diff --git a/recipes/README.md b/recipes/README.md new file mode 100644 index 0000000..4d086c7 --- /dev/null +++ b/recipes/README.md @@ -0,0 +1,51 @@ +# TildePublishingUnlimited + +E-book publishing projects for generating fiction works, zines, documentation, and other things. + +Write in markdown, compile beautiful pdfs, and ebooks. + +> to compile, create and edit markdown files in the project `inputs/` subdirectory and then just type `make` in the project directory. + + +## recipe single pages +------------------- + +Standalone recipe pages, should be able to include in book template in the future. + +## Usage +----- + +Write recipes according to the markdown examples provided in the `inputs/` subdirectory. Run `make` in this directory to compile PDFs which will go into the `outputs/` subdirectory. + +> recipe markdown example +``` +--- +author: Jacques Pepinillo +foodname: Banans Nut Sweetbreads +prelim: + - Begin by preheating the oven to 350 $^o$F + - ... +ingredient: + - 1/2 cup unsalted butter (room temp) + - ... + - 1/2 small brain +--- + +The recipe source files are written in markdown with a yaml block header. The author, +name(foodname), preparation steps(prelim), and ingredients list are listed in the +yaml block above. Instructional prose is the main body of each recipe. +\medskip + +Step by step instructions, making sure to refer to prelim and +ingredients listed above. Separate paragraphs with this: +\medskip + +The latex template (modified pandoc template) can be modified to change formatting +and spacing, and to specify new variables that can then be included in the yaml block +above. + +Page dimensions and some other variables can be set by modifying the flags that are +passed to `pandoc` in the Makefile. + + +``` diff --git a/recipes/banans.md.pdf b/recipes/banans.md.pdf deleted file mode 100644 index 30e9a09..0000000 Binary files a/recipes/banans.md.pdf and /dev/null differ diff --git a/recipes/compile b/recipes/compile deleted file mode 100755 index 0b1bf4a..0000000 --- a/recipes/compile +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -pandoc -s --template="recipe.tex" -o banans.md.pdf banans.md -# adapt to process each markdown file into a standalone pdf recipe page by using $1 in script, and find to run script on each? diff --git a/recipes/banans.md b/recipes/inputs/banans.md similarity index 97% rename from recipes/banans.md rename to recipes/inputs/banans.md index 21838b1..6fc9c60 100644 --- a/recipes/banans.md +++ b/recipes/inputs/banans.md @@ -1,5 +1,5 @@ --- -author: Jacques Pepin +author: Jacques Pepinillo foodname: Banans Nut Sweetbreads prelim: - Begin by preheating the oven to 350 $^o$F diff --git a/recipes/inputs/carrotcake.md b/recipes/inputs/carrotcake.md new file mode 100644 index 0000000..12179d4 --- /dev/null +++ b/recipes/inputs/carrotcake.md @@ -0,0 +1,37 @@ +--- +author: Cookie Baker +foodname: Carrot Cake +prelim: + - Begin by preheating the oven to 350 $^o$F + - chill 1lb of peeled carrots + - allow eggs to reach room temp + - allow butter to reach room temp +ingredient: + - 1/2 cup unsalted butter (room temp) + - 1 cup sugar + - 3 large eggs room temp + - 1 1/2 cup all purpose flour + - 1 teaspoon baking soda + - 1/2 teaspoon baking powder + - 1 teaspoon salt + - 1 pound of peeled carrots + - 1/2 cup of sour cream + - 1 teaspoon vanilla +--- + +Begin by grating chilled peeled carrots over a large cutting board. Place grated carrots in a large collander to drain for 1 hour. Reserve liquid. +\medskip + +In a large bowl, mix together cream, butter, and sugar at medium speed. Add in eggs one at a time until well incorporated. +\medskip + +In two sperate bowls, sift, and then mix the remaining dry ingredients in one bowl, and all the remaining wet ingredients into the other. +\medskip +Begin mixing contents from dry and wet bowls into the butter and sugar mixture. Make sure to alternate starting with contents from the bowl containing dry ingredients. Do not over-mix. Fold in drained grated carrots. + +\medskip + +Place dough in a buttered, 9x5 loaf pan and bake for 1-1.25 hours. +\medskip +Enoy chilled carrot liquor drink. + diff --git a/recipes/outputs/banans.pdf b/recipes/outputs/banans.pdf new file mode 100644 index 0000000..4348744 Binary files /dev/null and b/recipes/outputs/banans.pdf differ diff --git a/recipes/outputs/carrotcake.pdf b/recipes/outputs/carrotcake.pdf new file mode 100644 index 0000000..314c2c5 Binary files /dev/null and b/recipes/outputs/carrotcake.pdf differ diff --git a/recipes/recipe.tex b/recipes/templates/recipe.tex similarity index 100% rename from recipes/recipe.tex rename to recipes/templates/recipe.tex