Skip to content

Kataglyphis/mdToPdf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


logo
mdToPdf

Convert markdown to modern slide show or a4paper book. Combining the very light weight markdown language with all the power of LaTeX.

TopLang Donate Twitter

About The ProjectGetting StartedLicenseLiterature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Tests
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgements
  9. Literature

About The Project

Formulating everything you need in markdown is very light weight and efficient. This can be an enormous productivity bust for oneself. Nevertheless one would miss the power of LaTeX with its unique ecosystem which is perfect for writing scientific content (paper, books, presentation). This project is using the amazing pandoc library which is the exact right tool to combine both worlds.
You can immediately get started an use my customized templates for generating nice looking books, papers or presentations. I provide detailed steps how to use it and how to reproduce everything. The main environment is containerized thanks to Docker. Therefore everything can much simpler be reproduced.

What is nicer than writing in pure, simple markdown?
No worries about latex but with all the power of it!

Key Features

Feature Implement Status
Docker image, make everything reproducible ✔️
LaTeX templates ✔️
Comprehensive python scripts ✔️

Dependencies

This enumeration also includes submodules.

For my beamer latex project I use the following latex templates:

  • beamerthemeawesome theme from LukasPietzschmann as a starting point and customized it for my needs.

  • smile theme from LukasPietzschmann as a starting point and customized it for my needs.

  • Roboto font just a very nice font

Useful tools

Getting Started

Building docker image

For building my docker image I use sth. like this:

docker build . -t pandoc_all

WINDOWS

Command works in powershell but not on cmd.

  cd mdToPdf
  docker run -it --rm -v ${PWD}/md2pdfLib:/md2pdfLib -v ${PWD}/data:/data --name mypandoc -h mypandoc pandoc_all

LINUX

Tested on ubuntu. Fedora etc. might have little differences. Idk

  cd mdToPdf
  docker run -it --rm -v ${PWD}/md2pdfLib:/md2pdfLib -v ${PWD}/data:/data --name mypandoc -h mypandoc pandoc_all

Build presentation

Place all .md files in the data/presentation/chapters/ folder

Run following command at the very first time and whenever you change your .sty files (this updates the latex repo):

  chmod +x md2pdfLib/presentation/scripts/update_own_sty.sh
  ./md2pdfLib/presentation/scripts/update_own_sty.sh
  python3 md2pdfLib/presentation/scripts/md2beamerpdf.py 2>&1 | tee data/out/beamer.log

Build book

  python3 md2pdfLib/book/scripts/md2pdf.py 2>&1 | tee data/out/book.log

Build book with glossary entries

For now we must invoke lualatex by ourselves if we want to print latex gloassary entries. Therefore the workflow changes to the following: Execute the bash script for making life easy:

  chmod +x md2pdfLib/book/scripts/compile_with_glossaries_and_nomenclature.sh
  ./md2pdfLib/book/scripts/compile_with_glossaries_and_nomenclature.sh

or run steps manually:

  # CHANGE TO OUTPUT TO .tex in this script first
  # then call this script to export a .tex file
  python3 md2pdfLib/book/scripts/md2pdf.py 2>&1 | tee data/out/book.log
  # assuming the output is named book_output.tex
  lualatex data/out/book_output.tex
  makeglossaries book_output
  makeindex book_output.nlo -s nomencl.ist -o book_output.nls
  lualatex data/out/book_output.tex
  lualatex data/out/book_output.tex

Build CV

  cd data/cv
  lualatex cv.tex

Prerequisites

Installation

  1. Clone the repo
    git clone --recurse-submodules [email protected]:Kataglyphis/mdToPdf.git

How i created my customized pandoc latex template

This project aims to provide an unique style for the pdf layouts. Therefore I had to produce my own pandoc template.latex file. The following steps are guiding you through the customization steps so you can reproduce everything:

I assume you already cloned the repo and the terminal points to the directory.

  • export standart .latex file used by pandoc:
  pandoc -D latex > md2pdfLib/presentation/pandoc/custom.tex
  • Delete ignorenonframetext out of the \documentclass options.
  • Add custom colors right before \usetheme (in my case my favorite \definecolor{myGreenAccent}{RGB}{105, 240, 174})

Tests

Roadmap

Upcoming :)

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Contact

Jonas Heinle - @Cataglyphis_ - [email protected]

Project Link: https://github.com/Kataglyphis/...

Acknowledgements

Huge shoutout to Lukas Pietzschmann for his latex template.

Literature

Some very helpful literature, tutorials, etc.

LaTeX

Pandoc

About

Easily convert markdown to a book or beamer slide show

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published