Making a book from (examples) markdown

I want to make a book from my RSCG examples . The easy way is to transform the .md files into separate chapters.

I have tried initially node with  markdown-pdf and  pdf-merger-js , but I have been going then full speed with pandoc . To generate both Word and I have used this:

pandoc.exe -d pandocHTML.yaml -o ../docs/ -t gfm

pandoc.exe -d pandocHTML.yaml -o ../docs/index.docx

The pandocHTML.yaml is here:

from: gfm

# reader: may be used instead of from:

# to: docx

# output-file:  index.docx

# to: gfm

# output-file:  ../docs/

# writer: may be used instead of to:

# leave blank for output to stdout:

reference-doc: customWord.docx

# leave blank for input from stdin, use [] for no input:


– ../book/

– ../book/

– ../ApplicationVersion/

– ../Enum/

– ../JsonToClass/

– ../CopyConstructor/

– ../DTOMapper/

– ../SkinnyControllers/

– ../DP_Builder/

– ../MetadataFromObject/

– ../DynamicMocking/

– ../MethodDecorator/

– ../PartiallyFunction/

– ../IFormattable/

– ../DP_Decorator/

– ../PropertyExpressionGenerator/

– ../book/

– ../book/

# or you may use input-file: with a single value

# defaults:

# – customWord.docx

standalone: true

self-contained: true

# metadata values specified here are parsed as literal

# string text, not markdown:


title: RSCG Examples


  – Andrei Ignat

# Note that these take files, not their contents:

include-before-body: []

include-after-body: []

include-in-header: []

resource-path: [“.”]


verbosity: INFO

log-file: log.json

table-of-contents: true

toc-depth: 3

# number-sections: true

# a list of offsets at each heading level

number-offset: [0,0,0,0,0,0]

# toc: may also be used instead of table-of-contents:

shift-heading-level-by: 1

section-divs: true

identifier-prefix: foo

title-prefix: “”

strip-empty-paragraphs: true

# lf, crlf, or native

eol: lf

strip-comments: false

indented-code-classes: []

ascii: true

default-image-extension: “.jpg”

fail-if-warnings: false

dump-args: false

ignore-args: false

trace: false

As you see , I have put the .md files to be processed. Another thing that I have the need is to have a custom word template – to put page breaks after Heading 2. You can download from