Adding hardcover for scala

This commit is contained in:
Igal Tabachnik 2019-06-13 09:23:31 +03:00
parent 31821e5ded
commit 8e5c7b46e5
2 changed files with 114 additions and 1 deletions

View File

@ -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}

View File

@ -1,7 +1,7 @@
\documentclass[ \documentclass[
coverheight=9.25in, coverheight=9.25in,
coverwidth=6.125in, % (pagesize - spinewidth) / 2 coverwidth=6.125in, % (pagesize - spinewidth) / 2
spinewidth=1.125in, spinewidth=1.014in,
bleedwidth=0in, bleedwidth=0in,
11pt, 11pt,
marklength=0pt, marklength=0pt,
@ -53,6 +53,7 @@
\bookcovercomponent{color}{spine}{color=SpineBackColor} \bookcovercomponent{color}{spine}{color=SpineBackColor}
\bookcovercomponent{normal}{front}{ \bookcovercomponent{normal}{front}{
\input{ribbon} \input{ribbon}
\vspace{1.1cm}
\begin{center} \begin{center}
\fontsize{40pt}{5em}\selectfont\bfseries \fontsize{40pt}{5em}\selectfont\bfseries
CATEGORY THEORY \\FOR PROGRAMMERS CATEGORY THEORY \\FOR PROGRAMMERS