Created
September 7, 2012 16:31
-
-
Save hsanchez/3667596 to your computer and use it in GitHub Desktop.
My Latex Template for Kindle (Or IPAD)
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
\documentclass[8pt]{memoir} | |
\usepackage[utf8]{inputenc} | |
\usepackage[paperwidth=9cm, paperheight=11.5cm, top=0.5cm, left=0.5cm, right=0.5cm, bottom=0.5cm]{geometry} | |
\usepackage{graphicx} | |
\usepackage{tikz, blindtext} | |
\makechapterstyle{box}{ | |
\renewcommand*{\printchaptername}{} | |
\renewcommand*{\chapnumfont}{\normalfont\sffamily\huge\bfseries} | |
\renewcommand*{\printchapternum}{ | |
\flushright | |
\begin{tikzpicture} | |
\draw[fill,color=black] (0,0) rectangle (2cm,2cm); | |
\draw[color=white] (1cm,1cm) node { \chapnumfont\thechapter }; | |
\end{tikzpicture} | |
} | |
\renewcommand*{\chaptitlefont}{\normalfont\sffamily\Huge\bfseries} | |
\renewcommand*{\printchaptertitle}[1]{\flushright\chaptitlefont##1} | |
} | |
%Begin Decorative packages | |
\usepackage{type1cm} | |
\usepackage{lettrine} | |
%End decorative packages | |
\usepackage[T1]{fontenc} | |
\usepackage[scaled]{helvet} | |
\renewcommand*\familydefault{\sfdefault} | |
\frenchspacing | |
\sloppy | |
\pagestyle{empty} | |
\chapterstyle{box} | |
\begin{document} | |
\title{Latex Template for Kindle} | |
\author{by YOUR NAME} | |
\date{} | |
\maketitle | |
\newpage | |
\newpage | |
\chapter{Preface}{} | |
\lettrine[lines=3,slope=4pt,findent=-3pt]{O}{nce upon} a time, lala lala lalala lalalala. | |
\newpage | |
\chapter{Introduction} | |
\lettrine[lines=3,slope=4pt,findent=-3pt]{O}{nce upon} a time, lala lala lalala lalalala. | |
\end{document} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment