Initial commit
This commit is contained in:
commit
ae8ff708a9
|
|
@ -0,0 +1,2 @@
|
|||
build/
|
||||
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
BUILD = build
|
||||
OUTPUT_FILENAME = book
|
||||
METADATA = metadata.yml
|
||||
CHAPTERS = chapters/*.md
|
||||
TOC = --toc --toc-depth=2
|
||||
IMAGES_FOLDER = images
|
||||
COVER_IMAGE = $(COVER_IMAGE)/cover.png
|
||||
LATEX_CLASS = report
|
||||
MATH_FORMULAS = --webtex
|
||||
CSS_FILE = style.css
|
||||
CSS_ARG = --css=$(CSS_FILE)
|
||||
ARGS = $(TOC) $(MATH_FORMULAS) $(CSS_ARG)
|
||||
|
||||
all: book
|
||||
|
||||
book: epub html pdf
|
||||
|
||||
clean:
|
||||
rm -r $(BUILD)
|
||||
|
||||
epub: $(BUILD)/epub/$(OUTPUT_FILENAME).epub
|
||||
|
||||
html: $(BUILD)/html/$(OUTPUT_FILENAME).html
|
||||
|
||||
pdf: $(BUILD)/pdf/$(OUTPUT_FILENAME).pdf
|
||||
|
||||
$(BUILD)/epub/$(OUTPUT_FILENAME).epub: $(METADATA) $(CHAPTERS)
|
||||
mkdir -p $(BUILD)/epub
|
||||
pandoc $(ARGS) -S --epub-metadata=$(METADATA) --epub-cover-image=$(COVER_IMAGE) -o $@ $^
|
||||
|
||||
$(BUILD)/html/$(OUTPUT_FILENAME).html: $(CHAPTERS)
|
||||
mkdir -p $(BUILD)/html
|
||||
pandoc $(ARGS) --standalone --to=html5 -o $@ $^
|
||||
cp -R $(IMAGES_FOLDER)/ $(BUILD)/html/$(IMAGES_FOLDER)/
|
||||
cp $(CSS_FILE) $(BUILD)/html/$(CSS_FILE)
|
||||
|
||||
$(BUILD)/pdf/$(OUTPUT_FILENAME).pdf: $(METADATA) $(CHAPTERS)
|
||||
mkdir -p $(BUILD)/pdf
|
||||
pandoc $(ARGS) -V documentclass=$(LATEX_CLASS) -o $@ $^
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
# Pandoc book template
|
||||
|
||||
## Description
|
||||
|
||||
This repository contains a simple template for building [Pandoc](http://pandoc.org/) documents.
|
||||
|
||||
## Usage
|
||||
|
||||
Please, check [this post](http://blog.danielherzog.es/2017-01-15-utils-writing-a-book-in-markdown/).
|
||||
|
||||
## Contributors
|
||||
|
||||
This project has been developed by:
|
||||
|
||||
| Avatar | Name | Nickname | Email |
|
||||
| ------ | ---- | -------- | ----- |
|
||||
|  | Daniel Herzog | Wikiti | [info@danielherzog.es](mailto:info@danielherzog.es)
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
# Introduction
|
||||
|
||||
This is the first paragraph of the introduction chapter.
|
||||
|
||||
## First
|
||||
|
||||
This is the first subsection. Please, admire the gloriousnes of Figure \ref{seagull_image}.
|
||||
|
||||
|
||||

|
||||
|
||||
## Second
|
||||
|
||||
This is the second subsection.
|
||||
|
||||
|
||||
Please, check [First] subsection.
|
||||
|
||||
Please, check [this](#first) subsection.
|
||||
|
||||
Please, check Table \ref{example_table}.
|
||||
|
||||
| Index | Name |
|
||||
| ----- | ---- |
|
||||
| 0 | AAA |
|
||||
| 1 | BBB |
|
||||
| ... | ... |
|
||||
|
||||
Table: This is an example table.\label{example_table}
|
||||
|
||||
## Third
|
||||
|
||||
Formula example: $\mu = \sum_{i=0}^{N} \frac{x_i}{N}$
|
||||
|
||||
Now, full size:
|
||||
|
||||
$$\mu = \sum_{i=0}^{N} \frac{x_i}{N}$$
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
# Installation
|
||||
|
||||
This is the installation chapter.
|
||||
|
||||
For further information, check the [Introduction] chapter.
|
||||
|
||||
|
||||
For further information, check the [this chapter](#introduction).
|
||||
|
||||
|
||||
For further information, check the [this chapter's subsection](#first) section.
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
# Usage
|
||||
|
||||
This is the usage chapter.
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
# References
|
||||
|
||||
- [Pandoc](http://pandoc.org/)
|
||||
- [Wikipedia: Markdown](https://wikipedia.org/wiki/Markdown)
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 27 KiB |
|
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
title: My book title
|
||||
author: Daniel Herzog
|
||||
rights: Creative Commons Attribution 4.0 International
|
||||
language: en-US
|
||||
tags: [book, my-book, etc]
|
||||
abstract: |
|
||||
Your summary.
|
||||
---
|
||||
Loading…
Reference in New Issue