View Single Post
Old 12-05-2016, 06:09 PM   #2
rkomar
Wizard
rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.
 
Posts: 3,055
Karma: 18821071
Join Date: Oct 2010
Location: Sudbury, ON, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840, PB 633
Here's what the latex preamble looks like for my PDFs:

Code:
\documentclass[11pt,a5paper,openany,oneside]{book}
\usepackage[a5paper]{geometry}
\usepackage[pdftex,pdftitle={The Title Goes Here},pdfauthor={Last_name, First_name}]{hyperref}
\usepackage[pdftex]{color,graphicx}
\usepackage{mathpazo}

\textwidth 128mm
\topmargin -15mm
\textheight 175mm
\evensidemargin -15mm
\oddsidemargin -15mm
Here's the script I use to convert the latex to HTML (using latex2html):

Code:
#!/bin/sh
# Pass in the name of the top-level TeX file, or "main.tex"
# will be assumed.

if test $# -eq 0
  then
    SOURCE=main.tex
  else
    SOURCE="$1"
fi

latex2html -nonavigation -nobottom_navigation -noaddress -noinfo -math -math_parsing -accent_images 'large' "$SOURCE"

cd `basename "$SOURCE" .tex`
fontresize.sh
The fontresize.sh script looks like this:

Code:
#!/bin/sh
for i in *.html
do
        sed -e 's/+2/+0/' < $i > j.j
        mv j.j $i
done
After that is done, I import the HTML files to the Sigil program to create the EPUB. This step is a bit tedious, so maybe there's a better way to do it (perhaps with calibre?).
rkomar is offline   Reply With Quote