-
-
Save onriv/f07349c948cb9f4f18bd5b6da45004bf to your computer and use it in GitHub Desktop.
My Latex Template for Kindle (Or IPAD)
This file contains hidden or 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