Skip to content

yoshimoto/markdown2pdf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

markdown2pdf.sh

Convert your markdown file to PDF

markdownをpdfに変換するスクリプトです

Usage

$ markdown2pdf.sh  your-markdown-file  --output output.pdf

The "--output" option is optional. For example,

$ markdown2pdf.sh  README.md

will generate README.pdf from README.md.

Example

The generated pdf is avaiable at https://github.com/yoshimoto/markdown2pdf/blob/main/README.pdf.

Option

$ markdown2pdf.sh --help
 usage:
     $0  [OPTIONS] INPUT

  -o, --output FILENAME
      The filename for output pdf file

  -g, --geometry GEOMETRY
      Page geometry. Supported GEOMETRYs are "tight", "normal". (default: "tight")

  --layout LAYOUT
	  Page layout. Supported LAYOUTs are
	    - "2x1" (two-up, side-by side)
	    - "normal"
	  default is "normal"

  -2
      Alias of --layout 2x1

  --highlightstyle STYLE
      Style of syntax highlight. Supported STYLEs are "tango", "haddock", "kate", etc.
	  See pandoc's manual for details.

  --toc
      Generate table of content

Configuration file

~/.markdown2pdf

# optioins for luatex
luatexjapresetoptions=hiragino-pron

# "tight", "normal"
geometry=tight

Customize

Fonts

Add the following line in your ~/.markdown2pdf:

luatexjapresetoptions=hiragino-pron

Syntax highlight

Use --highlight-style STYLE option. Note that markdown2pdf.sh just passes the STYLE to pandoc with --highlight-style=“STYLE” internally. See pandoc’s manual for details.

Trouble shooting

Common Problems

markdown2pdf.sh is just wrapping the following command line utilities:

  • pandoc
  • lulatex
  • pdfjam

If you have any issues, please make sure first that the above utilities are installed and configured correctly.

About

Convert your markdown into pretty pdf

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages