# [Tex/LaTex] LaTeX options for kindle

ebookkindlepdf

I was wondering if there are any good settings to produce a PDF suitable for
reading on a (6 inch) kindle. Main use is for intermediate reading of academic papers while they are being written:

1. Text needs to be large enough to be readable.
2. Equations need to be readable.
3. I don't care much what happens to the figures. They may appear on a separate page

I prefer a solution with 3 files for every project, one which contains the text and equations (paper), one which compiles to standard format, and one which compiles to
kindle friendly format.

# Here's a plan:

Create a kindle-friendly preamble (or a document class)

• Redefine your page geometry to match your screen ratio (geometry package)
• Remove most of the margins (also with geometry)
• Remove or resize headers and footers (perhaps with fancyhdr)
• Enlarge text until it is readable to you (depends on which TeX friend you are using)
• Choose appropriate (legible) fonts (depends on which TeX friend you are using)
• Redefine you section titles to smaller spacing (titlesec package)
• Reduce other spacing as well (various lenghts like \abovecaptionskip)

Don't use absolute sizes in your documents:

• Rescale your figures to fit factor\textwidth
• Mathematics should automatically break at the end of the line (breqn package might help)

If you didn't create a document class:

• Extract your document content (textbody) to a content-file
• \include{content-file} after the \begin{document}

If you created a document class, you will just have to change your class before compiling.

## Possible result

The figure is the result of the following code:

\documentclass[10pt]{article}

\usepackage{fontspec}      % font selection
\setmainfont{Cambria}
\usepackage{breqn}         % automatic equation breaking
\usepackage{microtype}     % microtypography, reduces hyphenation
\usepackage{polyglossia}   % language selection
\setmainlanguage{english}

\usepackage{graphicx}      % graphics support

\usepackage[font=small,labelformat=simple,]{caption}   % customizing captions

\usepackage{titlesec}      % customizing section titles
\titleformat{\section}{\itshape\large}{}{0em}{}
\titlespacing{\section}{0pt}{8pt}{4pt}
\titleformat{\subsection}{\itshape}{}{0em}{}
\titlespacing{\subsection}{0pt}{4pt}{2pt}
\titleformat{\subsubsection}[runin]{\bf\scshape}{}{0em}{}
\titlespacing{\subsubsection}{0pt}{5pt}{5pt}

\usepackage[papersize={3.6in,4.8in},hmargin=0.1in,vmargin={0.1in,0.1in}]{geometry}  % page geometry

\pagestyle{fancy}
\fancyfoot{}            % clear page footer

\setlength{\abovecaptionskip}{2pt} % space above captions
\setlength{\belowcaptionskip}{0pt} % space below captions
\setlength{\textfloatsep}{2pt}     % space between last top float or first bottom float and the text
\setlength{\floatsep}{2pt}         % space left between floats
\setlength{\intextsep}{2pt}        % space left on top and bottom of an in-text float

\begin{document}

In another moment down went Alice after it, never once considering how in the world she was to get out again.

\section{Wonderful section title}

Either the well was very deep, or she fell very slowly, for she had plenty of time as she went down to look
\begin{figure}[htb]
\includegraphics[width=\textwidth]{alice}
\caption{Quite wide picture, resized to fit}
\end{figure}
about her and to wonder what was going to happen next.

\subsection{Tufte-style subsection}

then she looked at the sides of the well

\subsubsection{Saving space running in} and noticed that they were filled with cupboards and book\-shel\-ves.

\begin{dmath}[label={sna74}]
\frac{1}{6} \left(\sigma(k,h,0) +\frac{3(h-1)}{h}\right)
+\frac{1}{6} \left(\sigma(h,k,0) +\frac{3(k-1)}{k}\right)
=\frac{1}{6} \left(\frac{h}{k} +\frac{k}{h} +\frac{1}{hk}\right)
+\frac{1}{2} -\frac{1}{2h} -\frac{1}{2k},
\end{dmath}

\end{document}


Different font sizes can be easily selected using fontspec.