|
| 1 | +\documentclass[ |
| 2 | + % bleed is added to the final result |
| 3 | + coverheight=9.25in, |
| 4 | + coverwidth=6.125in, % (pagesize - spinewidth) / 2 == (13.042 - 1.042) / 2 |
| 5 | + spinewidth=1.042in, |
| 6 | + bleedwidth=0in, |
| 7 | + 11pt, |
| 8 | + marklength=0in, |
| 9 | + ]{bookcover} |
| 10 | + |
| 11 | + \usepackage{fancybox} |
| 12 | + \usepackage{wrapfig} |
| 13 | + \usepackage[many]{tcolorbox} |
| 14 | + \usetikzlibrary{calc,positioning, shadings} |
| 15 | + \usepackage[T1]{fontenc} |
| 16 | + \usepackage{fontspec} |
| 17 | + |
| 18 | + % \setmainfont{AlegreyaSans-Regular}[ |
| 19 | + % BoldFont={AlegreyaSans-Bold}, |
| 20 | + % ItalicFont={AlegreyaSans-Italic}, |
| 21 | + % UprightFeatures={SmallCapsFont=AlegreyaSansSC-Regular}, |
| 22 | + % ItalicFeatures={SmallCapsFont=AlegreyaSansSC-Italic}, |
| 23 | + % BoldFeatures={SmallCapsFont=AlegreyaSansSC-Bold}, |
| 24 | + % BoldItalicFeatures={SmallCapsFont=AlegreyaSansSC-BoldItalic}, |
| 25 | + % ] |
| 26 | + \setmainfont[ |
| 27 | + Path=fonts/, |
| 28 | + Extension=.otf, |
| 29 | + UprightFont=*-Regular, |
| 30 | + ItalicFont=*-Italic, |
| 31 | + BoldFont=*-Bold, |
| 32 | + UprightFeatures={SmallCapsFont=*SC-Regular}, |
| 33 | + ItalicFeatures={SmallCapsFont=*SC-Italic}, |
| 34 | + BoldFeatures={SmallCapsFont=*SC-Bold}, |
| 35 | + BoldItalicFeatures={SmallCapsFont=*SC-BoldItalic}, |
| 36 | + ]{AlegreyaSans} |
| 37 | + |
| 38 | + \newcommand{\olpath}{../} |
| 39 | + \newcommand{\whitebg}[1]{% |
| 40 | + \tikz\node[circle,draw,minimum size=1.1cm, |
| 41 | + fill=white, |
| 42 | + path picture={ |
| 43 | + \node at (path picture bounding box){ |
| 44 | + \includegraphics[width=1.1cm]{\olpath#1} |
| 45 | + }; |
| 46 | + }]{}; |
| 47 | + } |
| 48 | + \newcommand{\bartosz}{ |
| 49 | + \vspace{0pt} |
| 50 | + \begin{tcolorbox}[beamer, |
| 51 | + width=3.6cm, |
| 52 | + arc=0pt, |
| 53 | + boxsep=0pt, |
| 54 | + left=0pt,right=0pt,top=0pt,bottom=0pt, |
| 55 | + ] \includegraphics[width=3.6cm]{bartosz} |
| 56 | + \end{tcolorbox} |
| 57 | + } |
| 58 | + \input{\olpath/version} |
| 59 | + |
| 60 | + \definecolor{BackgroundColor}{HTML}{f3f6ed} |
| 61 | + \definecolor{SpineBackColor}{HTML}{262626} |
| 62 | + |
| 63 | + \begin{document} |
| 64 | + |
| 65 | + \begin{bookcover} |
| 66 | + \bookcovercomponent{color}{bg whole}{color=BackgroundColor} |
| 67 | + \bookcovercomponent{color}{spine}{color=SpineBackColor} |
| 68 | + \bookcovercomponent{normal}{front}{ |
| 69 | + \input{ribbon-reason} |
| 70 | + \vspace{1.1cm} |
| 71 | + \begin{center} |
| 72 | + \fontsize{40pt}{5em}\selectfont\bfseries |
| 73 | + CATEGORY THEORY \\FOR PROGRAMMERS |
| 74 | + \vfil |
| 75 | + \hspace*{-.8cm}\includegraphics[width=.5\coverwidth]{piggie} |
| 76 | + \linebreak |
| 77 | + \rule[1.5cm]{\textwidth/2}{.5pt}\\ |
| 78 | + \vspace{-1.5cm} |
| 79 | + \normalfont\Huge\textbf{Bartosz Milewski} |
| 80 | + \vfil |
| 81 | + \vspace*{1cm} |
| 82 | + \end{center}} |
| 83 | + |
| 84 | + \bookcovercomponent{center}{spine}{ |
| 85 | + \rotatebox[origin=c]{-90}{\color{orange} |
| 86 | + \Huge\bfseries Category Theory for Programmers \hspace{2em} Bartosz Milewski}} |
| 87 | + |
| 88 | + \bookcovercomponent{normal}{back}{% |
| 89 | + \begin{minipage}[b][\coverheight][t]{\coverwidth} |
| 90 | + \begin{center} |
| 91 | + \vspace{1cm} |
| 92 | + \includegraphics[width=.8\coverwidth]{bunnies} |
| 93 | + \begin{minipage}[t]{.75\coverwidth} |
| 94 | + \input{blurb} |
| 95 | + \vspace{0.6cm} |
| 96 | + \end{minipage} |
| 97 | + |
| 98 | + \begin{minipage}{.85\textwidth} |
| 99 | + \rule{\textwidth}{.5pt} |
| 100 | + |
| 101 | + \begin{tabular}[h]{p{3.4cm} p{\textwidth}} |
| 102 | + \vspace{5pt} |
| 103 | + \bartosz |
| 104 | + & |
| 105 | + \vspace{10pt} |
| 106 | + \begin{minipage}[b]{.58\coverwidth} |
| 107 | + \fontsize{11pt}{1.4em}\selectfont\textit{Category Theory for Programmers} |
| 108 | + is a series of blog posts by Bartosz Milewski, originally posted on bartoszmilewski.com.\\ |
| 109 | + Edited by Igal Tabachnik. Licenced under CC BY-SA 4.0.\\ |
| 110 | + \end{minipage} |
| 111 | + \end{tabular} |
| 112 | + \begin{flushright} |
| 113 | + \vspace{-2.6cm} |
| 114 | + \begin{minipage}[b]{4cm} |
| 115 | + \raggedleft |
| 116 | + \whitebg{fig/icons/by} |
| 117 | + \whitebg{fig/icons/cc} |
| 118 | + \whitebg{fig/icons/sa} |
| 119 | + \centering\footnotesize{\texttt{\OPTversion}} |
| 120 | + \end{minipage} |
| 121 | + \end{flushright} |
| 122 | + \end{minipage} |
| 123 | + \end{center} |
| 124 | + \end{minipage} |
| 125 | + } |
| 126 | + \end{bookcover} |
| 127 | +\end{document} |
0 commit comments