• Stars
    star
    189
  • Rank 203,484 (Top 5 %)
  • Language
    Shell
  • License
    MIT License
  • Created over 5 years ago
  • Updated almost 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

🐳 Pandoc docker image for converting markdown to PDF using TeX typesetting

mdtopdf 🐳

mdtopdf is the pandoc docker image for converting markdown to PDF using TeX typesetting.

Examples

You can see example markdown file and converted PDF file from the link below👇

example markdown

example converted PDF

Top Image

Getting Started

  1. Pull docker image.
$ docker pull plass/mdtopdf

⚠️ This docker image size is 1.68GB. I recommend pulling it using the fast Internet connection.

  1. Generate PDF file.
$ docker run -it --rm -v "`pwd`":/workdir plass/mdtopdf mdtopdf INPUT.md

Windows (PowerShell) : Replace `pwd` to ${pwd}
fish shell : Replace `pwd` to (pwd)

Advanced Usages

Generate PDF file on save

$ docker run -it --rm -v "`pwd`":/workdir  plass/mdtopdf w-mdtopdf INPUT.md

Set alias

You can decrease typing using alias command as below,

$ echo "alias mdtopdf='docker run -it --rm -v "`pwd`":/workdir plass/mdtopdf mdtopdf'" >> ~/.bash_profile
$ echo "alias w-mdtopdf='docker run -it --rm -v "`pwd`":/workdir  plass/mdtopdf  w-mdtopdf'" >> ~/.bash_profile
$ source ~/.bash_profile
 
$ mdtopdf INPUT.md
$ w-mdtopdf INPUT.md

zsh : Modify .zshrc instead of .bash_profile.
Ubuntu : Modify .bashrc instead of .bash_profile.

If you're using Docker for Windows, setting alias is a bit tricky. Use following command.

> echo 'Function mdtopdf {Param($file) docker run -it --rm -v ${pwd}:/workdir plass/mdtopdf mdtopdf $(Get-ChildItem $file -Name)}' >> $PROFILE
> echo 'Function mdtopdf {Param($file) docker run -it --rm -v ${pwd}:/workdir plass/mdtopdf w-mdtopdf $(Get-ChildItem $file -Name)}' >> $PROFILE
> . $PROFILE
> mdtopdf INPUT.md
> w-mdtopdf INPUT.md

Generate tex file from markdown

$ docker run -it --rm -v "`pwd`":/workdir  plass/mdtopdf mdtotex INPUT.md

Generate html file from markdown

$ docker run -it --rm -v "`pwd`":/workdir  plass/mdtopdf mdtohtml INPUT.md

example converted HTML

Generate docx file from markdown

$ docker run -it --rm -v "`pwd`":/workdir  plass/mdtopdf mdtodocx INPUT.md

example converted docx

More Repositories

1

midare

🕒 ツイートを使って生活習慣の乱れを可視化するWebアプリ
Go
191
star
2

feeder

📮 RSS, Atom, and JSON feed generator from multiple RSS, Atom, and any entries you want.
Go
33
star
3

graphql-redis-realtime-chat

💬 Realtime Chat Server using GraphQL Subscriptions and Redis PubSub (Unmaintained)
Go
23
star
4

portfolio

🏠 My portfolio
TypeScript
18
star
5

emojic.ch

顔認識で人の顔を😇に変換するWebサービス「えもじっく」
Vue
13
star
6

go-api-sample

Go x MySQL x DockerなAPIサーバー
Go
11
star
7

kuee-thesis-markdown

京大工学部電気電子工学科の卒論をマークダウンで書くための一式
TeX
11
star
8

ku-cancel-announcement-bot

🤖 京都大学の休講情報をTwitterに呟くBot (大学卒業に伴い更新を停止しました)
Python
10
star
9

itervar

The static analysis tool that detects references to loop iterator variable.
Go
9
star
10

kuee-practice-template

京都大学工学部電気電子工学科の実験で使える Jupyter Notebook ファイル
Jupyter Notebook
8
star
11

naoki-kishi.github.io

deprecated →
HTML
4
star
12

mikku

mikku is a CLI tool to help semantic versioning management
Go
4
star
13

cpro2018

大学の講義で作ったMNISTの3層NNです
C
3
star
14

dotfiles

My dotfiles
Vim Script
3
star
15

blog

ぷらすのブログ
MDX
3
star
16

twitter-oauth-2-demo

Twitter API v2で追加されたOAuth2.0 Authorization Code Flowを使った認可のデモ用アプリケーション
Go
3
star
17

envfile-to-github-secrets

Go
2
star
18

latex-vscode-template

LaTeXをVSCodeのRemote Developmentを使って構築するテンプレート
TeX
2
star
19

data-structure-and-algorithm

Practice of data structure and algorithm
Go
1
star
20

pfn-intern-task-2019

2019年 PFN夏季インターンシップのコーディング課題を解いてみる
Go
1
star
21

cloud-gaming-operator

GCE上に建てたクラウドゲーミング用のVMを管理するやつ
Go
1
star
22

status

p1ass関係のサイトの外形監視
1
star
23

rust-rdbms

作って学ぶRDBMSのしくみ
Rust
1
star
24

delrange

The static analysis tool which detects delete function is called with a value different from the range key.
Go
1
star
25

sqlctxize

Go
1
star
26

os-practice

Java
1
star
27

grafana-otel-lgtm-playground

grafana/otel-lgtm playground
1
star