Created
March 18, 2019 15:03
-
-
Save shahinism/94f01b1b2662a54eb9b700531d2b6f68 to your computer and use it in GitHub Desktop.
Convert .epub documents to eye friendly PDF
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\usepackage[Latin,Mathematics,NumberForms,Punctuation,Symbols]{ucharclasses} | |
\usepackage{fontspec} | |
\setmainfont[Ligatures=TeX]{Georgia} | |
\setsansfont[Ligatures=TeX]{Georgia} | |
\newfontfamily{\mydefaultfont}{Symbola} | |
\newfontfamily{\mymainfont}{Georgia} | |
\setTransitionsForSymbols{\mydefaultfont}{\mymainfont} | |
\setTransitionsFor{NumberForms}{\mydefaultfont}{\mymainfont} | |
\setTransitionsForMathematics{\mydefaultfont}{\mymainfont} | |
\setTransitionTo{Punctuation}{\mymainfont} | |
\setTransitionTo{Latin}{\mymainfont} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
pandoc -s -t latex \ | |
--toc \ | |
--top-level-division=chapter \ | |
--top-level-division=chapter \ | |
-V geometry:margin=1in \ | |
-V fontsize:16pt \ | |
-V documentclass:scrbook \ | |
-V classoption:oneside \ | |
--include-in-header=header.tex \ | |
--pdf-engine=xelatex \ | |
"$1" \ | |
-o "${1%.*}.pdf" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment