Permalink
Browse files

initial commit

  • Loading branch information...
0 parents commit 113c64edef14c656fec0ca5def99bb01b83ef6a2 Karl Seguin committed Jan 23, 2012
Showing with 779 additions and 0 deletions.
  1. +700 −0 en/redis.md
  2. BIN en/title.png
  3. +42 −0 readme.md
  4. +37 −0 template/xetex.template
Oops, something went wrong.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,42 @@
+## About ##
+The Little Redis Book is a free book introducing Redis.
+
+The book was written by [Karl Seguin](http://openmymind.net), with [Perry Neal](http://twitter.com/perryneal)'s assistance.
+
+If you liked this book, maybe you'll also like [The Little MongoDB Book](http://openmymind.net/2011/3/28/The-Little-MongoDB-Book/).
+
+## License ##
+The book is freely distributed under the [Attribution-NonCommercial 3.0 Unported license](<http://creativecommons.org/licenses/by-nc/3.0/legalcode>).
+
+## Formats ##
+The book is written in [markdown](http://daringfireball.net/projects/markdown/) and converted to PDF using [PanDoc](http://johnmacfarlane.net/pandoc/). A few LaTex specific commands have been placed in the markdown file to help with pdf-generation (namely for the title page and to create page breaks between chapters).
+
+The LaTex template makes use of [Lena Herrmann's JavaScript highlighter](http://lenaherrmann.net/2010/05/20/javascript-syntax-highlighting-in-the-latex-listings-package).
+
+Kindle and ePub format provided using [PanDoc](http://johnmacfarlane.net/pandoc/).
+
+## Generating the PDF ##
+I use a variation of <https://github.com/claes/pandoc-templates> to generate the pdf:
+
+ #!/bin/sh
+ paper=a4paper
+ hmargin=3cm
+ vmargin=3cm
+ fontsize=11pt
+
+ mainfont=Verdana
+ sansfont=Tahoma
+ monofont="Courier New"
+ columns=onecolumn
+ geometry=portrait
+ nohyphenation=true
+
+
+ markdown2pdf --xetex --template=template/xetex.template \
+ -V paper=$paper -V hmargin=$hmargin -V vmargin=$vmargin \
+ -V mainfont="$mainfont" -V sansfont="$sansfont" -V monofont="$monofont" \
+ -V geometry=$geometry -V columns=$columns -V fontsize=$fontsize \
+ -V nohyphenation=$nohyphenation --listings en/redis.md -o redis.pdf
+
+## Title Image ##
+A PSD of the title image is included. The font used is [Comfortaa](http://www.dafont.com/comfortaa.font).
@@ -0,0 +1,37 @@
+\documentclass{book}
+\usepackage[dvipsnames,usenames]{color}
+\usepackage{fullpage}
+\usepackage{changepage}
+\usepackage{fontspec,xltxtra,xunicode}
+\setmainfont{$mainfont$}
+\setsansfont{$sansfont$}
+\setmonofont{$monofont$}
+\defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase}
+
+\setlength{\parindent}{0pt}
+\setlength{\parskip}{12pt plus 2pt minus 1pt}
+\linespread{1.2}
+
+
+$if(fancy-enums)$
+\usepackage{enumerate}
+$endif$
+\setcounter{secnumdepth}{-1}
+
+\usepackage{hyperref}
+\hypersetup{
+ colorlinks=true,%
+ citecolor=YellowOrange,%
+ filecolor=YellowOrange,%
+ linkcolor=YellowOrange,%
+ urlcolor=YellowOrange
+}
+
+\usepackage[compact]{titlesec}
+\titlespacing{\section}{0pt}{*0}{*-2}
+\titlespacing{\subsection}{0pt}{*0}{*-2}
+\titlespacing{\subsubsection}{0pt}{*1}{*-2}
+
+\begin{document}
+$body$
+\end{document}

0 comments on commit 113c64e

Please sign in to comment.