tanos-japanese-word-books/make.sh

19 lines
437 B
Bash
Raw Normal View History

2022-02-08 01:39:19 +01:00
#!/usr/bin/env bash
python3 ./toTex.py
xelatex main.tex
numberOfPages=$(pdfinfo main.pdf | awk '/^Pages:/ {print $2}')
echo $numberOfPages
cat >wrapper.tex <<EOF
\\documentclass[a4paper, twoside]{article}
\\usepackage[T1]{fontenc}
\\usepackage[utf8]{inputenc}
\\usepackage{pdfpages}
\\begin{document}
\\includepdf[pages=-,nup=1x2,signature=${numberOfPages},landscape,booklet=true]{main.pdf}
\\end{document}
EOF
pdflatex wrapper.tex