From 8e5c7b46e5310a0d35c1b8785cf7435e8d46a8b1 Mon Sep 17 00:00:00 2001 From: Igal Tabachnik Date: Thu, 13 Jun 2019 09:23:31 +0300 Subject: [PATCH] Adding hardcover for scala --- src/cover/cover-hardcover-scala.tex | 112 ++++++++++++++++++++++++++++ src/cover/cover-paperback-scala.tex | 3 +- 2 files changed, 114 insertions(+), 1 deletion(-) create mode 100644 src/cover/cover-hardcover-scala.tex diff --git a/src/cover/cover-hardcover-scala.tex b/src/cover/cover-hardcover-scala.tex new file mode 100644 index 0000000..589c087 --- /dev/null +++ b/src/cover/cover-hardcover-scala.tex @@ -0,0 +1,112 @@ +\documentclass[ + coverheight=9.249in, + coverwidth=6.319in, % (pagesize - spinewidth) / 2 + spinewidth=1.125in, + bleedwidth=0.306in, + 11pt, + marklength=0pt, + ]{bookcover} + + \usepackage{fancybox} + \usepackage{wrapfig} + \usepackage[many]{tcolorbox} + \usetikzlibrary{calc,positioning, shadings} + \usepackage[T1]{fontenc} + \usepackage{Alegreya} %% Option 'black' gives heavier bold face + + \setmainfont{Alegreya Sans}[ + UprightFeatures={SmallCapsFont=* SC}, + ItalicFeatures={SmallCapsFont=* SC Italic}, + BoldFeatures={SmallCapsFont=* SC Bold}, + BoldItalicFeatures={SmallCapsFont=* SC Bold Italic}, + ] + + \newcommand{\olpath}{../} + \newcommand{\whitebg}[1]{% + \tikz\node[circle,draw,minimum size=1.1cm, + fill=white, + path picture={ + \node at (path picture bounding box){ + \includegraphics[width=1.1cm]{\olpath#1} + }; + }]{}; + } + \newcommand{\bartosz}{ + \vspace{0pt} + \begin{tcolorbox}[beamer, + width=3.6cm, + arc=0pt, + boxsep=0pt, + left=0pt,right=0pt,top=0pt,bottom=0pt, + ] \includegraphics[width=3.6cm]{bartosz} + \end{tcolorbox} + } + \input{\olpath/version} + + \definecolor{BackgroundColor}{HTML}{f3f6ed} + \definecolor{SpineBackColor}{HTML}{262626} + + \begin{document} + + \begin{bookcover} + \bookcovercomponent{color}{bg whole}{color=BackgroundColor} + \bookcovercomponent{color}{spine}{color=SpineBackColor} + \bookcovercomponent{normal}{front}{ + \input{ribbon} + \vspace{1.1cm} + \begin{center} + \fontsize{40pt}{5em}\selectfont\bfseries + CATEGORY THEORY \\FOR PROGRAMMERS + \vfil + \hspace*{-.8cm}\includegraphics[width=.5\coverwidth]{piggie} + \linebreak + \rule[1.5cm]{\textwidth/2}{.5pt}\\ + \vspace{-1.5cm} + \normalfont\Huge\textbf{Bartosz Milewski} + \vfil + \vspace*{1cm} + \end{center}} + + \bookcovercomponent{center}{spine}{ + \rotatebox[origin=c]{-90}{\color{orange} + \Huge\bfseries Category Theory for Programmers \hspace{2em} Bartosz Milewski}} + + \bookcovercomponent{normal}{back}{% + \begin{minipage}[b][\coverheight][t]{\coverwidth} + \begin{center} + \vspace{1cm} + \includegraphics[width=.8\coverwidth]{bunnies} + \begin{minipage}[t]{.8\coverwidth} + \input{blurb} + \vspace{.5cm} + \end{minipage} + + \begin{minipage}{.85\textwidth} + \rule{\textwidth}{.5pt} + + \begin{tabular}[h]{p{3.4cm} p{\textwidth}} + \bartosz + & + \vspace{5pt} + \begin{minipage}[b]{.58\coverwidth} + \fontsize{11pt}{1.4em}\selectfont\textit{Category Theory for Programmers} + is a series of blog posts by Bartosz Milewski, originally posted on bartoszmilewski.com.\\ + Edited by Igal Tabachnik. Licenced under CC BY-SA 4.0.\\ + \end{minipage} + \end{tabular} + \begin{flushright} + \vspace{-2.6cm} + \begin{minipage}[b]{4cm} + \raggedleft + \whitebg{fig/icons/by} + \whitebg{fig/icons/cc} + \whitebg{fig/icons/sa} + \centering\footnotesize{\texttt{\OPTversion}} + \end{minipage} + \end{flushright} + \end{minipage} + \end{center} + \end{minipage} + } + \end{bookcover} +\end{document} \ No newline at end of file diff --git a/src/cover/cover-paperback-scala.tex b/src/cover/cover-paperback-scala.tex index 9ee2513..dd7178e 100644 --- a/src/cover/cover-paperback-scala.tex +++ b/src/cover/cover-paperback-scala.tex @@ -1,7 +1,7 @@ \documentclass[ coverheight=9.25in, coverwidth=6.125in, % (pagesize - spinewidth) / 2 - spinewidth=1.125in, + spinewidth=1.014in, bleedwidth=0in, 11pt, marklength=0pt, @@ -53,6 +53,7 @@ \bookcovercomponent{color}{spine}{color=SpineBackColor} \bookcovercomponent{normal}{front}{ \input{ribbon} + \vspace{1.1cm} \begin{center} \fontsize{40pt}{5em}\selectfont\bfseries CATEGORY THEORY \\FOR PROGRAMMERS