97a9083ff86f — drak@kav 7 years ago
add nagware for the free preview
3 files changed, 60 insertions(+), 2 deletions(-)

M Makefile.am
A => nagware.tex
M py2guile.org
M Makefile.am +5 -2
@@ 7,7 7,7 @@ dist_pkgdata_DATA = green_tree_python-fl
 py2guile = py2guile.org
 authors = AUTHORS AUTHORS.in
 
-EXTRA_DIST = ${dist_pkgdata_DATA} ${py2guile} ${authors} htmlize.el wisp-mode.el # ${pdf_DATA}
+EXTRA_DIST = ${dist_pkgdata_DATA} ${py2guile} ${authors} nagware.tex htmlize.el wisp-mode.el # ${pdf_DATA}
 MOSTLYCLEANFILES = *~ *.bak *_flymake.* \\\#* # kill editor backups and flymake stuff
 CLEANFILES = ${pdf_DATA} $(foreach var,tex bbl blg aux html mobi zip epub,$(basename ${pdf_DATA}).$(var)) gpl.org
 DISTCLEANFILES = _minted-py2guile/*

          
@@ 27,10 27,13 @@ py2guile.mobi : py2guile.html
 py2guile-title.pdf : py2guile-title.tex
 	pdflatex -shell-escape -interaction nonstopmode $<
 
+nagware.pdf : nagware.tex green_tree_python-flickr-author-msvg-michael_gil-license-cc_by-4533044418_707b0029b2_o-and-guile-gnu-goatee-by-martin-grabmueller-license-gplv3-or-later-unified-resynth.jpg
+	pdflatex $<
+
 # http://www.reddit.com/r/emacs/comments/dy9yt/anyone_know_of_a_script_that_i_can_feed_an/
 # http://blog.nguyenvq.com/2010/10/30/bash-batch-script-to-convert-org-mode-file-to-html/comment-page-1/#comment-27013
 # since org-mode cannot create a file in a builddir, I have to copy over the sourcefiles and delete them afterwards.
-py2guile.pdf : ${py2guile} ${dist_pkgdata_DATA} gpl.org
+py2guile.pdf : ${py2guile} ${dist_pkgdata_DATA} gpl.org nagware.pdf
 	echo yes | @emacs@ --batch --visit $< --funcall org-latex-export-to-pdf
 
 gpl.org : gpl.tex

          
A => nagware.tex +52 -0
@@ 0,0 1,52 @@ 
+\documentclass[12pt,a5]{scrartcl}
+\usepackage[english]{babel}
+\usepackage{natbib}
+\usepackage{hyperref}
+\usepackage[utf8x]{inputenc}
+\usepackage{amsmath}
+\usepackage{graphicx}
+\graphicspath{{images/}}
+\usepackage{parskip}
+\usepackage{fancyhdr}
+\usepackage{vmargin}
+\setmarginsrb{3 cm}{2.5 cm}{3 cm}{2.5 cm}{1 cm}{1.5 cm}{1 cm}{1.5 cm}
+
+\title{From Python to Guile Scheme}                                % Title
+\author{}                               % Author
+\date{}                                         % Date
+
+\makeatletter
+\let\thetitle\@title
+\let\theauthor\@author
+\let\thedate\@date
+\makeatother
+
+\pagestyle{fancy}
+\fancyhf{}
+\rhead{\theauthor}
+\lhead{\thetitle}
+\cfoot{\thepage}
+
+\begin{document}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\begin{titlepage}
+    \centering
+    \vspace*{0.5 cm}
+        \textsc{\LARGE Free Digital Preview to}\\[1.0 cm]  % University Name
+    \includegraphics[height=0.5\textwidth]{green_tree_python-flickr-author-msvg-michael_gil-license-cc_by-4533044418_707b0029b2_o-and-guile-gnu-goatee-by-martin-grabmueller-license-gplv3-or-later-unified-resynth.jpg}\\[1.0 cm]  % University Logo
+    \rule{\linewidth}{0.2 mm} \\[0.4 cm]
+    { \huge \bfseries \thetitle}\\
+    \centering \rule{\linewidth}{0.2 mm} \\[1.5 cm]
+    \textsc{\Large If you enjoy this book,\\[0.3cm] please buy the ebook or print from\\[0.7 cm] \textbf{\href{http://draketo.de/py2guile}{http://draketo.de/py2guile}}}\\[0.5 cm]               % Course Code
+
+    \textsc{\Large Buy free licensed creations,\\[0.5cm] so I can create more}
+    
+    
+\end{titlepage}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+\end{document}
  No newline at end of file

          
M py2guile.org +3 -0
@@ 10,6 10,7 @@ 
 #+latex_class_options: [a5paper]
 # setup links. See http://en.wikibooks.org/wiki/LaTeX/Hyperlinks#Customization
 #+latex_header: \usepackage{hyperref}
+#+latex_header: \usepackage{pdfpages}
 #+LATEX_HEADER: \usepackage{xcolor}
 # FAKE ISBN for now.
 #+LATEX_HEADER: \usepackage[ISBN=000-00-00000-00-0]{ean13isbn}

          
@@ 182,6 183,8 @@ This book is licensed as [[http://copyle
 # This is the [[https://freenetproject.org][Freenet]] exclusive ebook. If you got it via other channels, please install [[https://freenetproject.org][Freenet]] and share it there! \\ https://freenetproject.org \\ when free speech dies we need a place to organise!
 
 This is the free preview-version. If you enjoy this book, please consider buying py2guile from [[http://draketo.de/py2guile][draketo.de/py2guile]] as ebook or in print (ISBN: 9783737568401).
+# For the free preview, add a nagware page before each chapter. TODO: Include as regular latex to make the link clickable.
+#+LATEX_HEADER: \makechapterstyle{nag}{\renewcommand*{\chapterheadstart}{\includepdf{nagware.pdf}\newpage}}\chapterstyle{nag}
 
 # This is the paid digital version -- that’s awesome! Thank you for buying py2guile and supporting Free Culture!