Compare commits
No commits in common. "master" and "master" have entirely different histories.
13
README.md
13
README.md
|
@ -4,19 +4,17 @@ 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:
|
||||
-------------
|
||||
|
@ -26,7 +24,6 @@ REQUIREMENTS:
|
|||
* Lipsum package to compile demos
|
||||
* perl5 (req'd by texlive-full)
|
||||
* pandoc
|
||||
* gnu make
|
||||
|
||||
|
||||
DEVELOPMENT MAP:
|
||||
|
@ -36,7 +33,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 `[X]`
|
||||
* Begin work on makefiles
|
||||
* Begin work on other output formats using pandoc - ebook formats, html formats(will need css magics)
|
||||
|
||||
|
||||
|
@ -44,8 +41,6 @@ TODO:
|
|||
-----
|
||||
|
||||
* Define auxfiles directory and succeed in compiling pdf without losing aux 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.
|
||||
|
||||
* Makefile framework for projects
|
||||
* Change script md2pdf.sh to move .tex files to a different directory to compile from, isolate "*.md" files
|
||||
|
||||
|
|
|
@ -1,70 +0,0 @@
|
|||
SHELL := /bin/bash
|
||||
# Inspired by:
|
||||
# gist by Lincoln Mullen | http://lincolnmullen.com | lincoln@lincolnmullen.com
|
||||
# and https://gist.github.com/elchinot7/67825dae97c3d628181a
|
||||
#
|
||||
#
|
||||
# Main latex document name
|
||||
FILE ?= ebook
|
||||
|
||||
#from https://www.gnu.org/software/make/manual/make.html#Phony-Targets
|
||||
# markdown sources in subdirectory
|
||||
SUBDIRS = inputs
|
||||
|
||||
MDS := ./$(SUBDIRS:%=%/*.md)
|
||||
#MDS := $(filter %/, $(wildcard ./$(SUBDIRS)/*.md)) # I don't think this works
|
||||
# List files to be made by finding all *.md files and appending .tex
|
||||
#TEXS := $(patsubst %.md,%.md.tex,$(wildcard ./$(SUBDIRS)/*.md.tex)) # I don't think this works
|
||||
# List files to be made by finding all *.tex files and appending .pdf
|
||||
#TEXS := ./$(SUBDIRS:%=%/*.md.tex) # This doesn't work
|
||||
TEXS := $(patsubst %.md,%.md.tex,$(wildcard $(MDS)))
|
||||
PDFS := $(wildcard *.pdf)
|
||||
|
||||
# differences in specification between MDS and TEXS. not sure which is best.
|
||||
# previous attempts at specifying TEXS and MDS left in place.
|
||||
|
||||
LATEX = latexmk
|
||||
PANDOC = pandoc
|
||||
LATEXFILE = $(FILE).tex
|
||||
OUTPUTFILE = $(FILE).pdf
|
||||
|
||||
|
||||
# compilation options
|
||||
# panopts - pandoc options, latopts - latexmk options
|
||||
PANOPTS = --biblatex
|
||||
LATOPTS = -pdf -e '$$pdflatex=q/xelatex %O %S/'
|
||||
|
||||
.PHONY: clean default
|
||||
|
||||
# The all rule makes the PDF file
|
||||
all : ebook # $(TEXS) ebook
|
||||
|
||||
# default rule
|
||||
default : clean all
|
||||
|
||||
# This rule accepts ebook.tex target with corresponding latex include
|
||||
# sources and makes it using latexmk
|
||||
ebook : $(LATEXFILE) $(TEXS)
|
||||
$(LATEX) -c
|
||||
$(LATEX) $(LATOPTS) $(LATEXFILE)
|
||||
|
||||
# This rule accepts TEX targets with corresponding Markdown
|
||||
# source, and makes them using pandoc
|
||||
$(TEXS) : $(MDS)
|
||||
$(PANDOC) $(PANOPTS) $< -o $@
|
||||
|
||||
# Remove all PDF outputs and pandoc's .md.tex outputs
|
||||
clean :
|
||||
@rm -f *.aux *.log *.out *.pdfsync *.tdo *.end\
|
||||
*.table *.gnuplot *.gz *.bbl *.dvi *.fls \
|
||||
*.fdb_latexmk *Notes.bib *.blg \
|
||||
*.toc ./inputs/*.aux
|
||||
@rm $(PDFS)
|
||||
@rm $(TEXS)
|
||||
|
||||
# Remove all PDF and intermediate outputs then build them again
|
||||
rebuild : clean all
|
||||
|
||||
test : $(TEXS)
|
||||
echo $(MDS)
|
||||
echo $(TEXS)
|
|
@ -0,0 +1,9 @@
|
|||
#!/bin/bash
|
||||
#This assumes you have some latex framework such as miktex or mactex or somesuch that uses xelatex as well as pandoc to convert markdown to latex
|
||||
find . -iname *.md -exec ./md2tex.sh {} \;
|
||||
latexmk -c
|
||||
latexmk -pdf -e '$pdflatex=q/xelatex %O %S/' ebook.tex
|
||||
#latexmk -pdf -e '$pdflatex=q/xelatex %O %S/' -outdir=outputs ebook.tex
|
||||
# the -outdir option sets $outdir as well as $auxdir to be the outputs directory, except in miktex...so this will put auxiliary files in the output directory.
|
||||
# the contents of the outputs directory can be safely deleted, as they will be generated each time this script is run.
|
||||
#latexmk -pdf -e '$pdflatex=q/xelatex %O %S/' -outdir=outputs -auxdir=auxfiles ebook.tex
|
Binary file not shown.
|
@ -1 +1,2 @@
|
|||
\lipsum[5-12]
|
||||
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
#pandoc --natbib "$1" -o "$1".tex
|
||||
#pandoc -f markdown+emoji --biblatex "$1" -o "$1".tex
|
||||
pandoc --biblatex "$1" -o "$1".tex
|
||||
echo "$1.tex created"
|
|
@ -1,28 +0,0 @@
|
|||
#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)))
|
||||
|
||||
.PHONY : clean test
|
||||
|
||||
default : $(PDFS)
|
||||
|
||||
$(PDFS) : $(MDS)
|
||||
$(CC) $(PANDOCFLAGS) $< -o $@ #
|
||||
|
||||
all : clean $(PDFS)
|
||||
|
||||
clean :
|
||||
@rm -f $(PDFS)
|
||||
|
|
@ -1,51 +0,0 @@
|
|||
# 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.
|
||||
|
||||
|
||||
```
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
author: Jacques Pepinillo
|
||||
author: Jacques Pepin
|
||||
foodname: Banans Nut Sweetbreads
|
||||
prelim:
|
||||
- Begin by preheating the oven to 350 $^o$F
|
Binary file not shown.
|
@ -0,0 +1,3 @@
|
|||
#!/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?
|
|
@ -1,37 +0,0 @@
|
|||
---
|
||||
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.
|
||||
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue