https://github.com/m1es/markdown-pandoc-book
Generate a PDF file using Pandoc from an input folder with Markdown files
https://github.com/m1es/markdown-pandoc-book
markdown pandoc pandoc-markdown rake ruby
Last synced: 7 months ago
JSON representation
Generate a PDF file using Pandoc from an input folder with Markdown files
- Host: GitHub
- URL: https://github.com/m1es/markdown-pandoc-book
- Owner: m1es
- Created: 2024-12-28T22:34:21.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-30T13:24:19.000Z (over 1 year ago)
- Last Synced: 2024-12-30T14:19:36.522Z (over 1 year ago)
- Topics: markdown, pandoc, pandoc-markdown, rake, ruby
- Language: Ruby
- Homepage:
- Size: 31.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
> [!IMPORTANT]
> This project was followed by m1book: https://github.com/m1es/m1book
# Markdown Pandoc Book
This repository shows a Markdown to Pandoc flow to generate a simple book.
## Example
The result of running the Rake task generates [the PDF file](build/output.pdf) that can be found in the [build](build) folder.
## Usage
`rake book:generate`
Which by default looks for source files in [src/front](src/front) and [src/main](src/main)
and writes the PDF file to [build/output.pdf](build.output.pdf)
or run
`rake book:generate\[./src,book.pdf\]`
for using another input directory and/or output file.
## Pandoc
### Pandoc command
To change the Pandoc command, head over to [lib/book.rb](lib/book.rb) and modify it's contents.
### Front and main matter
Take a look at the [src](src) folder to get an idea on how to use the front and main matter.
In short:
- The front matter does not have page numbers
- There is a table of contents at the end of the front matter
- Use numbers, like `5-filename.txt` in front of your files to determine the order
## Dependencies
- [Ruby](https://www.ruby-lang.org/en/downloads/)
- [Pandoc](https://pandoc.org/installing.html)
The following Latex packages are required:
- collection-fontsrecommended
- sectsty
These packages can be installed by running:
- `tlmgr install collection-fontsrecommended`
- `tlmgr install sectsty`