├── .gitignore ├── .ruby-version ├── .travis.yml ├── Gruntfile.coffee ├── README.md ├── build.sbt ├── docker-compose.yml ├── essential-slick.sublime-project ├── essential_slick_deploy.enc ├── etc ├── left-outer.graffle ├── query-types.graffle ├── schema.graffle ├── table-tyes.graffle └── versions │ └── 2.1.pdf ├── github_pages_deploy.sh ├── go.sh ├── inject_analytics.sh ├── package.json ├── project ├── build.properties ├── plugins.sbt └── sbt-updates.sbt ├── sbt.sh └── src ├── covers ├── epub-cover.ai ├── epub-cover.png ├── gumroad-cover.ai └── gumroad-cover.png ├── css └── book.less ├── img ├── Schema.png ├── exploits_of_a_mom.png ├── left-outer.png └── query-types.png ├── main └── resources │ ├── application.conf │ ├── integration-schema.sql │ └── logback.xml ├── meta ├── epub.yaml ├── html.yaml ├── metadata.yaml └── pdf.yaml ├── pages ├── 0-backers.md ├── 0-contributors.md ├── 0-conventions.md ├── 0-preface.md ├── 1-basics.md ├── 2-selecting.md ├── 3-modifying.md ├── 4-combining-actions.md ├── 5-data_modelling.md ├── 6-joins.md ├── 7-plain_sql.md ├── 8-databases.md ├── end-of-preview.md ├── links.md ├── solutions.md └── start-of-appendix.md └── templates ├── cover-notes.html ├── cover-notes.tex ├── images ├── brand.pdf ├── brand.svg ├── hero-arrow-overlay-white.svg ├── hero-left-overlay-white.pdf ├── hero-left-overlay-white.svg ├── hero-right-overlay-white.pdf └── hero-right-overlay-white.svg ├── template.epub.html ├── template.html └── template.tex /.gitignore: -------------------------------------------------------------------------------- 1 | _site/* 2 | _theme_packages/* 3 | 4 | Thumbs.db 5 | .DS_Store 6 | 7 | !.gitkeep 8 | 9 | /.vscode/ 10 | /.metals/ 11 | 12 | .rbenv-version 13 | .rvmrc 14 | /dist/ 15 | /node_modules/ 16 | npm-debug.log 17 | 18 | *.sublime-workspace 19 | 20 | target 21 | project/project 22 | project/target 23 | 24 | essential_slick_deploy 25 | essential_slick_deploy.pub 26 | temp 27 | tmp 28 | 29 | -------------------------------------------------------------------------------- /.ruby-version: -------------------------------------------------------------------------------- 1 | 1.9.3-p484 2 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | os: linux 2 | 3 | services: 4 | - docker 5 | 6 | language: scala 7 | scala: 8 | - 2.13.1 9 | 10 | cache: 11 | directories: 12 | - $HOME/.cache/coursier 13 | - "$HOME/.ivy2/cache" 14 | - "$HOME/.sbt" 15 | 16 | script: 17 | - mkdir .sbt 18 | - mkdir dist 19 | - docker-compose run book npm install 20 | - docker-compose run book ./sbt.sh pdf html epub ; export SBT_RESULT=$? 21 | - test "$SBT_RESULT" == "0" 22 | after_success: 23 | - ./inject_analytics.sh 24 | - ./github_pages_deploy.sh 25 | env: 26 | global: 27 | - secure: WoAl16UmJUPWviwhV8X5i2dmFcl4YQhA6GKRChRNst5F+oIsUzFv7QP0jwGJ3uhvMFcDJcYr7ga9cc1SkEIPI89Kn5ROKXrj+w9wc2B/x+zMrGhpMf0fM7U8dlO8fXygjjCgzqYvUOGGpJWus6JRL6CY7BYfpx1nyDPpe5oFMhpYTf9XrPuy6TFrSP8JnSGPJDC4bjwaSpCh4NgoPSLHe2MotahzqjZA7dvWunfsp6jq5bRL0+kueK7Aijm7Z2RIhMqPZj9oN0/IXGtgoLSe9tXkISaX/BkZB7+hP2WKgFxZGr6QVO4kS5lfgVj+i1+LXOmI7jpDimmbMvufuBspwWZZdE1Kk1bkr3DzJO2UpDDP7KJqnXstt24SW8P0R6m9s7iJo0BEv/rx0Ye8nRfKg6EUxcMdk11mvClqMNN3hJBLpuNveRMI43Vbis/A5s/3iVdwX3NL1Cp7DnC0gYGfcZTP6tNGbu+REvukqvZQfF6ErWCyBkR9Yxqa+brD3Q2RNLW/F9WwvXqrG9GJGXvafkhUTbcpcn1tPC46jlAoJIMBReOVcsBBHRvwBqZ9M4FMv3qzZlEPZMt7ESDIbwuPeV8EHH2zNZQoFTi/5b1A97XZ91l/6qGQxNI/8TvGKDBWs/T9DlqDbZokjL2lF9+5x3WWB4S1V+MiDWcAK2kkEPY= 28 | - secure: JZkRBHFN3yOOkVbo1KiQ5NGqfxzlTy0FQeJtVNPaoMmge3gzhYNzvcg9ou8FayZ501r61/0DENenf4FOtXnxV9U/Y4a7kIPV4lhUqfvSbO4ppvZ9G5DZ1uqDawMFIydwIL2VzQf4thP4b+D8E/Xc9rKmhdYZzcp0HAeg3BvqkK6x0avsoE3O4bPCFkrcwssZYaJzBBe3u4S0MuRAdLemW20S/E0GNjhvIj3z9Lw88t1IuR/5O7CCehIPnwao7eMbibESrULEVKHq/lYzNpVqQ2+bbnFuYxQe+k+HOTVH2jgS2l7JKFm+TbuMWriYLAVzKnGxK6M5bGLQddFEnTALla5U9ehYsm/PBfG1XJs/5Xa1SVnDV2nT5FgywXXVho14MnQZjWh20vy+PpJjES1WKRsA6ek9YSjbsZIAeN6cxllwecdq1ACqx6US1/jt0Eq3WjLk/F/qJp2SExFfDJl18rwAMkt9BXD2w+TU9sUcBWR4j2KbHQmnXGNuVlIwug8/WS6R1trEGHp3efy5cESCqgtFKPo+6VgpmuwkP9II3dQelfy56dUmvS32WUs5L6wkrfXVjC2CULzGhdIXidDaJo4GPkCHOwfuiPXnBRaIm9KEANTHnVB+1qEAQjF02j22M+M5PTw+awPmBXEcWCss4QoD6D90cxhKifdaIYSFokU= 29 | -------------------------------------------------------------------------------- /Gruntfile.coffee: -------------------------------------------------------------------------------- 1 | #global module:false 2 | 3 | "use strict" 4 | 5 | ebook = require 'underscore-ebook-template' 6 | 7 | module.exports = (grunt) -> 8 | ebook(grunt, { 9 | dir: { 10 | page : "target/pages", 11 | template : "src/templates" 12 | } 13 | }) 14 | return 15 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Essential Slick 2 | 3 | [![Build Status](https://travis-ci.org/underscoreio/essential-slick.svg?branch=3.3)](https://travis-ci.org/underscoreio/essential-slick) 4 | 5 | [slick]: http://slick.lightbend.com 6 | [download]: https://underscore.io/books/essential-slick/ 7 | [ebook-template]: https://github.com/underscoreio/underscore-ebook-template 8 | [mdoc]: https://scalameta.org/mdoc/ 9 | 10 | Creative Commons Licence
Essential Slick by Richard Dallaway, Jonathan Ferguson, Underscore Consulting LLP is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. 11 | 12 | ## Overview 13 | 14 | Essential Slick is a book to get you started building application using the [Slick] database library. 15 | It is aimed at Scala developers who need to become productive with Slick quickly. 16 | 17 | It follows a tutorial style and includes exercises. 18 | 19 | ## Download 20 | 21 | You can download the PDF, EPUB, and HTML formats of 22 | this book for [free from the book web page][download]. 23 | 24 | ## Table of Contents 25 | 26 | 1. Basics 27 | 28 | 2. Selecting Data 29 | 30 | 3. Creating and Modifying Data 31 | 32 | 4. Action Combinators and Transactions 33 | 34 | 5. Data Modelling 35 | 36 | 6. Joins and Aggregates 37 | 38 | 7. Plain SQL 39 | 40 | A. Using Different Database Products 41 | 42 | B. Solutions to Exercises 43 | 44 | ## Building the Book 45 | 46 | This book uses [Underscore's ebook build system][ebook-template]. 47 | 48 | The simplest way to build the book is to use [Docker Compose](http://docker.com): 49 | 50 | - install Docker Compose; and 51 | - run `go.sh` (or `docker-compose run book bash` if `go.sh` doesn't work). 52 | 53 | This will open a `bash` shell running inside the Docker container which contains all the dependencies to build the book. From the shell run: 54 | 55 | - `mkdir dist` 56 | - `npm install`; and then 57 | - `./sbt.sh`. 58 | 59 | Within `sbt` you can issue the commands `pdf`, `html`, `epub`, or `all` to build the desired format(s) of the book. 60 | 61 | When you build the book, you'll see `Unknown link` warning messages. 62 | You can ignore these (and if anyone wants to find out why they happen, do go for it). 63 | 64 | The results are placed in the `dist` directory. 65 | 66 | 67 | ## Writing 68 | 69 | - Essential Slick uses [mdoc] to check the Scala code on the book. 70 | - The source files are in `src/pages`. 71 | - The converted sources are output to `target/pages`. 72 | 73 | 74 | -------------------------------------------------------------------------------- /build.sbt: -------------------------------------------------------------------------------- 1 | lazy val root = project 2 | .in(file(".")) 3 | .enablePlugins(MdocPlugin) 4 | .settings( 5 | mdocIn := sourceDirectory.value / "pages", 6 | mdocOut := target.value / "pages", 7 | scalaVersion := "2.13.3", 8 | version := "3.0.0", 9 | libraryDependencies ++= Seq( 10 | "com.typesafe.slick" %% "slick" % "3.3.3", 11 | "com.typesafe.slick" %% "slick-hikaricp" % "3.3.3", 12 | "com.h2database" % "h2" % "1.4.200", 13 | "ch.qos.logback" % "logback-classic" % "1.2.3", 14 | "joda-time" % "joda-time" % "2.10.5", 15 | "org.joda" % "joda-convert" % "2.2.1" 16 | ), 17 | scalacOptions ++= Seq( 18 | "-deprecation", 19 | "-encoding", "utf-8", 20 | "-feature", 21 | "-language:existentials", 22 | "-language:experimental.macros", 23 | "-language:higherKinds", 24 | "-language:implicitConversions", 25 | "-unchecked", 26 | "-Xcheckinit", 27 | "-Xfatal-warnings", 28 | ) 29 | ) 30 | 31 | 32 | lazy val pdf = taskKey[Unit]("Builds the PDF version of the book") 33 | lazy val pdfPreview = taskKey[Unit]("Builds the PDF preview of the book") 34 | lazy val html = taskKey[Unit]("Build the HTML version of the book") 35 | lazy val epub = taskKey[Unit]("Build the ePub version of the book") 36 | 37 | import sys.process._ 38 | pdf := { mdoc.toTask("").value ; "grunt pdf" ! } 39 | pdfPreview := { mdoc.toTask("").value ; "grunt pandoc:pdf:preview" ! } 40 | html := { mdoc.toTask("").value ; "grunt html" ! } 41 | epub := { mdoc.toTask("").value ; "grunt epub" ! } 42 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | services: 3 | book: 4 | image: underscoreio/book:latest 5 | volumes: 6 | - .:/source 7 | - ~/.ivy2:/root/.ivy2 8 | -------------------------------------------------------------------------------- /essential-slick.sublime-project: -------------------------------------------------------------------------------- 1 | { 2 | "folders": [ 3 | { 4 | "path": ".", 5 | "folder_exclude_patterns": [ 6 | "dist", 7 | "essential-play", 8 | "bower_components", 9 | "node_modules", 10 | "assets", 11 | "jekyll_plugins", 12 | ".git" 13 | ], 14 | "file_exclude_patterns": [ 15 | "Gemfile", 16 | "Gemfile.lock", 17 | ".ruby-version" 18 | ] 19 | } 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /essential_slick_deploy.enc: -------------------------------------------------------------------------------- 1 | U2FsdGVkX1/Own0JSSHK6TSPvvpRtt0X3k3j4jNVqgwBWpv+pwvma1q24rt6k6Ig 2 | ZnPIspLFaqOXg85To2frITj1ZD119tzfaQjvBBedKjNi4MgHs9XK4ri9DhD6gcng 3 | 8tpbreGzKHTaOeKL3Sq866uV8FUHV+EWaqr262W6omKNM5c9gdAAcHjURdyNx5yW 4 | +UZmifNaxVlv1uKpSXX3fbkdMBN7XR71IkTzOB3hZpCOiMsqIRZ0gp04bjyLzD65 5 | fuGOAXCEhE8d4KHLzNqJtziSVA/rndtHB4hFysGEHhUwq7x32MZPCjlD3TJ8TOyO 6 | stWQ79/louHBvwzYrim0IjxFlTu/aSvx0LnH15SQWu+rJGNzoa7DMsrN00J5ldu1 7 | 6uIZR0BsPVRnk36jr/+CJrMNBQ2AjAw1tMBxWMvTuIw2ydBXwTC0img1WUQaRYqB 8 | 5ZvYHf6bYBBnTWrPXZiitVt/ZM75alqVU0fAktI4A6gYauZFK5grSIJfQxdNTMad 9 | X90PhzBWeBmkX/jx1pZC6aDVn1YggO4SGj5f8xBbMUJOl1lMSb1JKP6yxZK6NBod 10 | Zo+AdRzHExWZBtL2pgqE8qmENbuVz/mdFqE8ZGlWTRBqhyoy3wIshWAxGcC8/kcv 11 | 917DtOC/o7u/pM13h+VluZsJCbFKtoq1czTa84VYggF/qCCs2NseOi6X4L27EVPN 12 | +TIJAyAoaWPs4L0gbBGxxosgWivnrXJ0SS2rCK/77zh9/jhYXe91DK/U3PSIXAl1 13 | xWhTANfmzauJyDHy12gHkKlQKTy8O2Ehh3FFoGM0uXitYy0a7JfQH+VoA9yeGc38 14 | S3qlpIo+QAvhhznd/UdVvQTBl8lZk+BD1sfk36i9vYtU3bS97qXQuCLinVyTR2M5 15 | PioJTi5ZSVV4il9GUNjXm67gmtrvzZnvOWUTZpXKBvRmrG9Wbdhvi0eEVWCM4WXI 16 | btYkcee49HmaH4UalQ+oZgUM7TWwPyYt88//z+3aCiHG88PsqJ1aUMV5qr9wtct+ 17 | 8DxWv9E8RkhxZ+eyxFu8j0K9oaVpUaaZ5jI2q8r5eOtAZRjGJG1PQQ3h0IBb/RXw 18 | Y7emgTiLZtMGoJkjxc8DAH6lbaI7RZpZUHQHFXkChbzFRU5KIxQdiMe45Vhejbg0 19 | 8neABobUikmxkYCv3F70E2iEn9NEXXmSJIAZ2Ugkn/k7Xl2X2MnaTmsAR2KZbRVn 20 | 2QjT/2tWCuHAk5LtwkkhOHOHXBy1yBpWNpRgzEHQYPwtXeg9B8jKCFqa34KqzT6z 21 | IFGXIwlIFTNcTvNpue60WZftlRVc55gpbHPfGhSI1jwYn0BJluhmq2rtpo6tx+UW 22 | QsYHGjjzNiUDMaadwdhV0yb2/w9mKxxN6UyKflzaevJaunQGzOtUwJX+Gk/GMPRa 23 | 8cEmjV5EoAwohlCYsJNVvaxZlkpO8vB3kz9RjMdld3LvbAnX+2oJSo2oqTrTr7ch 24 | k8paMqCmQrhvqWzDg6FxUJcWGT8KxvqBKTG/eDAzNIx4a8qi27hXwegCqySkO6xF 25 | jZRPocZ5+hAKtK2MW6T7h5ZkoboHXoOqitxpbj0oheTb4V5W7aVbcFIa8YVb/0W8 26 | Y+x6xymtIKHBVEOEwBPgICJwZcVtZss6ucCxRLXxTWGqy23IAfqdzV1+Zt9uRXkG 27 | p6CPztAyZH+e40gqHOVvKpE3Uy7kgjVsJohdkJGDslgGU+ANtciwYC2Wp2mCliJd 28 | uW9r2YikRCf3nhF5TU1aWOVjnglnZ2arIQscBtIXmBXLy/MXRfdMj8m3heH/VujT 29 | qWk93OBIlKjXUvBcQw6klUSjqM9bdN0tbp8KyMNh9S6QgUueRo8vvLIruC1wCk9w 30 | quLHrsvHywjJrQne2PUlgzEccX3I8PzTax/4obq9bYuTZYBKMhn93tv/04pyQDkO 31 | 6lulPqLhwvV/oiAis46Nlt0PRrxwSAWqApFeNx76TzNnhLqshMkQbWmXvWr1qSQD 32 | L2mmP+zFrM73OMRmemJJfNMGMRWgcq2QI2aVAD2yofpn7gCSapqw9d+2rn9mdPRu 33 | 3MHImxTyVd24QO8FnqMHknFMTQ+5Az4X0PeM42OmjAyVkQuzbG4z/uXtGPE2K3Pq 34 | Fbc+g88SI1W0/jeZIxF6bn3v4zN8dnIACPsSfJem1kjP4inmJCO/VYzymVeXWlCN 35 | wwFIVQ7sCcZUuLjJDjGKL6g4bi5YiymOnZOVQAkdT2HNauLGeEHgGIAFC5qaDGqH 36 | +fu/P2Po2M7Lo5DgC/ozEA== 37 | -------------------------------------------------------------------------------- /etc/left-outer.graffle: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ActiveLayerIndex 6 | 0 7 | ApplicationVersion 8 | 9 | com.omnigroup.OmniGrafflePro 10 | 139.18.0.187838 11 | 12 | AutoAdjust 13 | 14 | BackgroundGraphic 15 | 16 | Bounds 17 | {{0, 0}, {559, 783}} 18 | Class 19 | SolidGraphic 20 | FontInfo 21 | 22 | Font 23 | Menlo-Regular 24 | Size 25 | 13 26 | 27 | ID 28 | 2 29 | Style 30 | 31 | shadow 32 | 33 | Draws 34 | NO 35 | 36 | stroke 37 | 38 | Draws 39 | NO 40 | 41 | 42 | 43 | BaseZoom 44 | 0 45 | CanvasOrigin 46 | {0, 0} 47 | ColumnAlign 48 | 1 49 | ColumnSpacing 50 | 36 51 | CreationDate 52 | 2015-02-11 14:33:05 +0000 53 | Creator 54 | Richard Dallaway 55 | DisplayScale 56 | 1.000 cm = 1.000 cm 57 | GraphDocumentVersion 58 | 8 59 | GraphicsList 60 | 61 | 62 | Bounds 63 | {{131.3333740234375, 131.5}, {97, 37}} 64 | Class 65 | ShapedGraphic 66 | FitText 67 | Vertical 68 | Flow 69 | Resize 70 | FontInfo 71 | 72 | Font 73 | Helvetica 74 | Size 75 | 22 76 | 77 | ID 78 | 101799 79 | Shape 80 | Rectangle 81 | Style 82 | 83 | fill 84 | 85 | Draws 86 | NO 87 | 88 | shadow 89 | 90 | Draws 91 | NO 92 | 93 | stroke 94 | 95 | Cap 96 | 0 97 | Draws 98 | NO 99 | Join 100 | 0 101 | 102 | 103 | Text 104 | 105 | Align 106 | 0 107 | Pad 108 | 8 109 | Text 110 | {\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf760 111 | \cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 Menlo-Regular;} 112 | {\colortbl;\red255\green255\blue255;} 113 | {\*\expandedcolortbl;;} 114 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural 115 | 116 | \f0\fs26 \cf0 Messages} 117 | VerticalPad 118 | 10 119 | 120 | TextPlacement 121 | 0 122 | 123 | 124 | Bounds 125 | {{315, 131.5}, {125.83306884765625, 37}} 126 | Class 127 | ShapedGraphic 128 | FitText 129 | Vertical 130 | Flow 131 | Resize 132 | FontInfo 133 | 134 | Font 135 | Helvetica 136 | Size 137 | 22 138 | 139 | ID 140 | 101838 141 | Shape 142 | Rectangle 143 | Style 144 | 145 | fill 146 | 147 | Draws 148 | NO 149 | 150 | shadow 151 | 152 | Draws 153 | NO 154 | 155 | stroke 156 | 157 | Cap 158 | 0 159 | Draws 160 | NO 161 | Join 162 | 0 163 | 164 | 165 | Text 166 | 167 | Pad 168 | 8 169 | Text 170 | {\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf760 171 | \cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 Menlo-Regular;} 172 | {\colortbl;\red255\green255\blue255;} 173 | {\*\expandedcolortbl;;} 174 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc 175 | 176 | \f0\fs26 \cf0 Rooms} 177 | VerticalPad 178 | 10 179 | 180 | TextPlacement 181 | 0 182 | 183 | 184 | Bounds 185 | {{115, 58.5}, {183, 183}} 186 | Class 187 | ShapedGraphic 188 | FontInfo 189 | 190 | Font 191 | Helvetica-Bold 192 | Size 193 | 18 194 | 195 | ID 196 | 101836 197 | Shape 198 | Circle 199 | Style 200 | 201 | fill 202 | 203 | Color 204 | 205 | a 206 | 0.87 207 | b 208 | 1 209 | g 210 | 0.8 211 | r 212 | 0.4 213 | 214 | 215 | shadow 216 | 217 | Draws 218 | NO 219 | 220 | stroke 221 | 222 | Color 223 | 224 | b 225 | 1 226 | g 227 | 0.827451 228 | r 229 | 0.466667 230 | 231 | Width 232 | 3 233 | 234 | 235 | 236 | 237 | Bounds 238 | {{238.66668701171875, 58.5}, {183, 183}} 239 | Class 240 | ShapedGraphic 241 | FontInfo 242 | 243 | Font 244 | Helvetica-Bold 245 | Size 246 | 18 247 | 248 | ID 249 | 101837 250 | Shape 251 | Circle 252 | Style 253 | 254 | shadow 255 | 256 | Draws 257 | NO 258 | 259 | stroke 260 | 261 | Color 262 | 263 | b 264 | 1 265 | g 266 | 0.827451 267 | r 268 | 0.466667 269 | 270 | Width 271 | 3 272 | 273 | 274 | 275 | 276 | Bounds 277 | {{84, 38}, {360.96469116210938, 232}} 278 | Class 279 | ShapedGraphic 280 | ID 281 | 101840 282 | Shape 283 | Rectangle 284 | Style 285 | 286 | shadow 287 | 288 | Draws 289 | NO 290 | 291 | 292 | 293 | 294 | GridInfo 295 | 296 | GuidesLocked 297 | NO 298 | GuidesVisible 299 | YES 300 | HPages 301 | 1 302 | ImageCounter 303 | 1 304 | KeepToScale 305 | 306 | Layers 307 | 308 | 309 | Lock 310 | NO 311 | Name 312 | Layer 1 313 | Print 314 | YES 315 | View 316 | YES 317 | 318 | 319 | LayoutInfo 320 | 321 | Animate 322 | NO 323 | circoMinDist 324 | 18 325 | circoSeparation 326 | 0.0 327 | layoutEngine 328 | dot 329 | neatoSeparation 330 | 0.0 331 | twopiSeparation 332 | 0.0 333 | 334 | LinksVisible 335 | NO 336 | MagnetsVisible 337 | NO 338 | MasterSheets 339 | 340 | ModificationDate 341 | 2017-01-16 22:49:48 +0000 342 | Modifier 343 | Richard Dallaway 344 | NotesVisible 345 | NO 346 | Orientation 347 | 2 348 | OriginVisible 349 | NO 350 | PageBreaks 351 | YES 352 | PrintInfo 353 | 354 | NSBottomMargin 355 | 356 | float 357 | 41 358 | 359 | NSHorizonalPagination 360 | 361 | coded 362 | BAtzdHJlYW10eXBlZIHoA4QBQISEhAhOU051bWJlcgCEhAdOU1ZhbHVlAISECE5TT2JqZWN0AIWEASqEhAFxlwCG 363 | 364 | NSLeftMargin 365 | 366 | float 367 | 18 368 | 369 | NSPaperSize 370 | 371 | size 372 | {595, 842} 373 | 374 | NSPrintReverseOrientation 375 | 376 | int 377 | 0 378 | 379 | NSRightMargin 380 | 381 | float 382 | 18 383 | 384 | NSTopMargin 385 | 386 | float 387 | 18 388 | 389 | 390 | PrintOnePage 391 | 392 | ReadOnly 393 | NO 394 | RowAlign 395 | 1 396 | RowSpacing 397 | 36 398 | SheetTitle 399 | Canvas 1 400 | SmartAlignmentGuidesActive 401 | YES 402 | SmartDistanceGuidesActive 403 | YES 404 | UniqueID 405 | 1 406 | UseEntirePage 407 | 408 | VPages 409 | 1 410 | WindowInfo 411 | 412 | CurrentSheet 413 | 0 414 | ExpandedCanvases 415 | 416 | 417 | name 418 | Canvas 1 419 | 420 | 421 | Frame 422 | {{178, 0}, {718, 877}} 423 | ListView 424 | 425 | OutlineWidth 426 | 142 427 | RightSidebar 428 | 429 | ShowRuler 430 | 431 | Sidebar 432 | 433 | SidebarWidth 434 | 120 435 | VisibleRegion 436 | {{-12, 0}, {583, 735}} 437 | Zoom 438 | 1 439 | ZoomValues 440 | 441 | 442 | Canvas 1 443 | 1 444 | 1 445 | 446 | 447 | 448 | 449 | 450 | -------------------------------------------------------------------------------- /etc/query-types.graffle: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ActiveLayerIndex 6 | 0 7 | ApplicationVersion 8 | 9 | com.omnigroup.OmniGrafflePro 10 | 139.18.0.187838 11 | 12 | AutoAdjust 13 | 14 | BackgroundGraphic 15 | 16 | Bounds 17 | {{0, 0}, {1118, 783}} 18 | Class 19 | SolidGraphic 20 | ID 21 | 2 22 | Style 23 | 24 | shadow 25 | 26 | Draws 27 | NO 28 | 29 | stroke 30 | 31 | Draws 32 | NO 33 | 34 | 35 | 36 | BaseZoom 37 | 0 38 | CanvasOrigin 39 | {0, 0} 40 | ColumnAlign 41 | 1 42 | ColumnSpacing 43 | 36 44 | CreationDate 45 | 2015-02-11 14:33:05 +0000 46 | Creator 47 | Richard Dallaway 48 | DisplayScale 49 | 1.000 cm = 1.000 cm 50 | GraphDocumentVersion 51 | 8 52 | GraphicsList 53 | 54 | 55 | Class 56 | LineGraphic 57 | ID 58 | 101835 59 | Points 60 | 61 | {523.33361816406273, 176.57225638942191} 62 | {523.33361816406273, 161.57227238438281} 63 | 64 | Style 65 | 66 | stroke 67 | 68 | Color 69 | 70 | b 71 | 0.0663876 72 | g 73 | 0.0760601 74 | r 75 | 0.547743 76 | 77 | HeadArrow 78 | 0 79 | Legacy 80 | 81 | TailArrow 82 | 0 83 | Width 84 | 2 85 | 86 | 87 | 88 | 89 | Bounds 90 | {{453, 170.57225374590234}, {150, 37}} 91 | Class 92 | ShapedGraphic 93 | FitText 94 | YES 95 | Flow 96 | Resize 97 | FontInfo 98 | 99 | Color 100 | 101 | b 102 | 0.0663876 103 | g 104 | 0.0760601 105 | r 106 | 0.547743 107 | 108 | Font 109 | Helvetica 110 | Size 111 | 22 112 | 113 | ID 114 | 101834 115 | Shape 116 | Rectangle 117 | Style 118 | 119 | fill 120 | 121 | Draws 122 | NO 123 | 124 | shadow 125 | 126 | Draws 127 | NO 128 | 129 | stroke 130 | 131 | Cap 132 | 0 133 | Draws 134 | NO 135 | Join 136 | 0 137 | 138 | 139 | Text 140 | 141 | Align 142 | 0 143 | Pad 144 | 20 145 | RTFD 146 | 147 | BAtzdHJlYW10eXBlZIHoA4QBQISEhBJOU0F0dHJpYnV0 148 | ZWRTdHJpbmcAhIQITlNPYmplY3QAhZKEhIQITlNTdHJp 149 | bmcBlIQBKw5Db2x1bW5bU3RyaW5nXYaEAmlJAQ6ShISE 150 | DE5TRGljdGlvbmFyeQCUhAFpA5KElpYHTlNDb2xvcoaS 151 | hISEB05TQ29sb3IAlIQBYwKEBGZmZmaDoJ8fP4OJiAg+ 152 | g6GgoD0BhpKElpYQTlNQYXJhZ3JhcGhTdHlsZYaShISE 153 | F05TTXV0YWJsZVBhcmFncmFwaFN0eWxlAISEEE5TUGFy 154 | YWdyYXBoU3R5bGUAlIQEQ0NAUwAAhISEB05TQXJyYXkA 155 | lJkMkoSEhAlOU1RleHRUYWIAlIQCQ2YAHIaShKOiADiG 156 | koSjogBUhpKEo6IAcIaShKOiAIGMAIaShKOiAIGoAIaS 157 | hKOiAIHEAIaShKOiAIHgAIaShKOiAIH8AIaShKOiAIEY 158 | AYaShKOiAIE0AYaShKOiAIFQAYaGgQAIhARbMWZdg83M 159 | TD2GkoSWlgZOU0ZvbnSGkoSEhAZOU0ZvbnQelJkkhAVb 160 | MzZjXQYAAAAcAAAA//5NAGUAbgBsAG8ALQBSAGUAZwB1 161 | AGwAYQByAIQBZg2bAJsBmwCbAIaGhg== 162 | 163 | Text 164 | {\rtf1\ansi\ansicpg1252\cocoartf1344\cocoasubrtf720 165 | \cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 Menlo-Regular;} 166 | {\colortbl;\red255\green255\blue255;\red140\green19\blue17;} 167 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural 168 | 169 | \f0\fs26 \cf2 Column[String]} 170 | VerticalPad 171 | 10 172 | 173 | TextPlacement 174 | 0 175 | Wrap 176 | NO 177 | 178 | 179 | Class 180 | LineGraphic 181 | ID 182 | 101833 183 | Points 184 | 185 | {234.16693115234398, 176.57225638942191} 186 | {234.16693115234398, 161.57227238438281} 187 | 188 | Style 189 | 190 | stroke 191 | 192 | Color 193 | 194 | b 195 | 0.0663876 196 | g 197 | 0.0760601 198 | r 199 | 0.547743 200 | 201 | HeadArrow 202 | 0 203 | Legacy 204 | 205 | TailArrow 206 | 0 207 | Width 208 | 2 209 | 210 | 211 | 212 | 213 | Bounds 214 | {{138, 170.57225374590234}, {213, 37}} 215 | Class 216 | ShapedGraphic 217 | FitText 218 | YES 219 | Flow 220 | Resize 221 | FontInfo 222 | 223 | Color 224 | 225 | b 226 | 0.0663876 227 | g 228 | 0.0760601 229 | r 230 | 0.547743 231 | 232 | Font 233 | Helvetica 234 | Size 235 | 22 236 | 237 | ID 238 | 101832 239 | Shape 240 | Rectangle 241 | Style 242 | 243 | fill 244 | 245 | Draws 246 | NO 247 | 248 | shadow 249 | 250 | Draws 251 | NO 252 | 253 | stroke 254 | 255 | Cap 256 | 0 257 | Draws 258 | NO 259 | Join 260 | 0 261 | 262 | 263 | Text 264 | 265 | Align 266 | 0 267 | Pad 268 | 20 269 | RTFD 270 | 271 | BAtzdHJlYW10eXBlZIHoA4QBQISEhBJOU0F0dHJpYnV0 272 | ZWRTdHJpbmcAhIQITlNPYmplY3QAhZKEhIQITlNTdHJp 273 | bmcBlIQBKxZDb2x1bW5bT3B0aW9uW1N0cmluZ11dhoQC 274 | aUkBFpKEhIQMTlNEaWN0aW9uYXJ5AJSEAWkDkoSWlgdO 275 | U0NvbG9yhpKEhIQHTlNDb2xvcgCUhAFjAoQEZmZmZoOg 276 | nx8/g4mICD6DoaCgPQGGkoSWlhBOU1BhcmFncmFwaFN0 277 | eWxlhpKEhIQXTlNNdXRhYmxlUGFyYWdyYXBoU3R5bGUA 278 | hIQQTlNQYXJhZ3JhcGhTdHlsZQCUhARDQ0BTAACEhIQH 279 | TlNBcnJheQCUmQyShISECU5TVGV4dFRhYgCUhAJDZgAc 280 | hpKEo6IAOIaShKOiAFSGkoSjogBwhpKEo6IAgYwAhpKE 281 | o6IAgagAhpKEo6IAgcQAhpKEo6IAgeAAhpKEo6IAgfwA 282 | hpKEo6IAgRgBhpKEo6IAgTQBhpKEo6IAgVABhoaBAAiE 283 | BFsxZl2DzcxMPYaShJaWBk5TRm9udIaShISEBk5TRm9u 284 | dB6UmSSEBVszNmNdBgAAABwAAAD//k0AZQBuAGwAbwAt 285 | AFIAZQBnAHUAbABhAHIAhAFmDZsAmwGbAJsAhoaG 286 | 287 | Text 288 | {\rtf1\ansi\ansicpg1252\cocoartf1344\cocoasubrtf720 289 | \cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 Menlo-Regular;} 290 | {\colortbl;\red255\green255\blue255;\red140\green19\blue17;} 291 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural 292 | 293 | \f0\fs26 \cf2 Column[Option[String]]} 294 | VerticalPad 295 | 10 296 | 297 | TextPlacement 298 | 0 299 | Wrap 300 | NO 301 | 302 | 303 | Class 304 | LineGraphic 305 | ID 306 | 101831 307 | Points 308 | 309 | {523.33359781901049, 138.70279195016019} 310 | {523.33359781901049, 123.70280794512109} 311 | 312 | Style 313 | 314 | stroke 315 | 316 | Color 317 | 318 | b 319 | 0.0663876 320 | g 321 | 0.0760601 322 | r 323 | 0.547743 324 | 325 | HeadArrow 326 | 0 327 | Legacy 328 | 329 | TailArrow 330 | 0 331 | Width 332 | 2 333 | 334 | 335 | 336 | 337 | Bounds 338 | {{480.3336181640625, 132.70278930664062}, {87, 37}} 339 | Class 340 | ShapedGraphic 341 | FitText 342 | YES 343 | Flow 344 | Resize 345 | FontInfo 346 | 347 | Color 348 | 349 | b 350 | 0.0663876 351 | g 352 | 0.0760601 353 | r 354 | 0.547743 355 | 356 | Font 357 | Helvetica 358 | Size 359 | 22 360 | 361 | ID 362 | 101830 363 | Shape 364 | Rectangle 365 | Style 366 | 367 | fill 368 | 369 | Draws 370 | NO 371 | 372 | shadow 373 | 374 | Draws 375 | NO 376 | 377 | stroke 378 | 379 | Cap 380 | 0 381 | Draws 382 | NO 383 | Join 384 | 0 385 | 386 | 387 | Text 388 | 389 | Align 390 | 0 391 | Pad 392 | 20 393 | RTFD 394 | 395 | BAtzdHJlYW10eXBlZIHoA4QBQISEhBJOU0F0dHJpYnV0 396 | ZWRTdHJpbmcAhIQITlNPYmplY3QAhZKEhIQITlNTdHJp 397 | bmcBlIQBKwZTdHJpbmeGhAJpSQEGkoSEhAxOU0RpY3Rp 398 | b25hcnkAlIQBaQOShJaWB05TQ29sb3KGkoSEhAdOU0Nv 399 | bG9yAJSEAWMChARmZmZmg6CfHz+DiYgIPoOhoKA9AYaS 400 | hJaWEE5TUGFyYWdyYXBoU3R5bGWGkoSEhBdOU011dGFi 401 | bGVQYXJhZ3JhcGhTdHlsZQCEhBBOU1BhcmFncmFwaFN0 402 | eWxlAJSEBENDQFMAAISEhAdOU0FycmF5AJSZDJKEhIQJ 403 | TlNUZXh0VGFiAJSEAkNmAByGkoSjogA4hpKEo6IAVIaS 404 | hKOiAHCGkoSjogCBjACGkoSjogCBqACGkoSjogCBxACG 405 | koSjogCB4ACGkoSjogCB/ACGkoSjogCBGAGGkoSjogCB 406 | NAGGkoSjogCBUAGGhoEACIQEWzFmXYPNzEw9hpKElpYG 407 | TlNGb250hpKEhIQGTlNGb250HpSZJIQFWzM2Y10GAAAA 408 | HAAAAP/+TQBlAG4AbABvAC0AUgBlAGcAdQBsAGEAcgCE 409 | AWYNmwCbAZsAmwCGhoY= 410 | 411 | Text 412 | {\rtf1\ansi\ansicpg1252\cocoartf1344\cocoasubrtf720 413 | \cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 Menlo-Regular;} 414 | {\colortbl;\red255\green255\blue255;\red140\green19\blue17;} 415 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural 416 | 417 | \f0\fs26 \cf2 String} 418 | VerticalPad 419 | 10 420 | 421 | TextPlacement 422 | 0 423 | Wrap 424 | NO 425 | 426 | 427 | Class 428 | LineGraphic 429 | ID 430 | 101829 431 | Points 432 | 433 | {452, 94.833327510898471} 434 | {452, 79.833343505859375} 435 | 436 | Style 437 | 438 | stroke 439 | 440 | Color 441 | 442 | b 443 | 0.0663876 444 | g 445 | 0.0760601 446 | r 447 | 0.547743 448 | 449 | HeadArrow 450 | 0 451 | Legacy 452 | 453 | TailArrow 454 | 0 455 | Width 456 | 2 457 | 458 | 459 | 460 | 461 | Bounds 462 | {{346, 47.833343505859375}, {213, 37}} 463 | Class 464 | ShapedGraphic 465 | FitText 466 | YES 467 | Flow 468 | Resize 469 | FontInfo 470 | 471 | Color 472 | 473 | b 474 | 0.0663876 475 | g 476 | 0.0760601 477 | r 478 | 0.547743 479 | 480 | Font 481 | Helvetica 482 | Size 483 | 22 484 | 485 | ID 486 | 101828 487 | Shape 488 | Rectangle 489 | Style 490 | 491 | fill 492 | 493 | Draws 494 | NO 495 | 496 | shadow 497 | 498 | Draws 499 | NO 500 | 501 | stroke 502 | 503 | Cap 504 | 0 505 | Draws 506 | NO 507 | Join 508 | 0 509 | 510 | 511 | Text 512 | 513 | Align 514 | 0 515 | Pad 516 | 20 517 | RTFD 518 | 519 | BAtzdHJlYW10eXBlZIHoA4QBQISEhBJOU0F0dHJpYnV0 520 | ZWRTdHJpbmcAhIQITlNPYmplY3QAhZKEhIQITlNTdHJp 521 | bmcBlIQBKxZDb2x1bW5bT3B0aW9uW1N0cmluZ11dhoQC 522 | aUkBFpKEhIQMTlNEaWN0aW9uYXJ5AJSEAWkDkoSWlgdO 523 | U0NvbG9yhpKEhIQHTlNDb2xvcgCUhAFjAoQEZmZmZoOg 524 | nx8/g4mICD6DoaCgPQGGkoSWlhBOU1BhcmFncmFwaFN0 525 | eWxlhpKEhIQXTlNNdXRhYmxlUGFyYWdyYXBoU3R5bGUA 526 | hIQQTlNQYXJhZ3JhcGhTdHlsZQCUhARDQ0BTAACEhIQH 527 | TlNBcnJheQCUmQyShISECU5TVGV4dFRhYgCUhAJDZgAc 528 | hpKEo6IAOIaShKOiAFSGkoSjogBwhpKEo6IAgYwAhpKE 529 | o6IAgagAhpKEo6IAgcQAhpKEo6IAgeAAhpKEo6IAgfwA 530 | hpKEo6IAgRgBhpKEo6IAgTQBhpKEo6IAgVABhoaBAAiE 531 | BFsxZl2DzcxMPYaShJaWBk5TRm9udIaShISEBk5TRm9u 532 | dB6UmSSEBVszNmNdBgAAABwAAAD//k0AZQBuAGwAbwAt 533 | AFIAZQBnAHUAbABhAHIAhAFmDZsAmwGbAJsAhoaG 534 | 535 | Text 536 | {\rtf1\ansi\ansicpg1252\cocoartf1344\cocoasubrtf720 537 | \cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 Menlo-Regular;} 538 | {\colortbl;\red255\green255\blue255;\red140\green19\blue17;} 539 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural 540 | 541 | \f0\fs26 \cf2 Column[Option[String]]} 542 | VerticalPad 543 | 10 544 | 545 | TextPlacement 546 | 0 547 | Wrap 548 | NO 549 | 550 | 551 | Class 552 | LineGraphic 553 | ID 554 | 101826 555 | Points 556 | 557 | {234.16693115234398, 134.20279195016019} 558 | {234.16693115234398, 119.20280794512109} 559 | 560 | Style 561 | 562 | stroke 563 | 564 | Color 565 | 566 | b 567 | 0.0663876 568 | g 569 | 0.0760601 570 | r 571 | 0.547743 572 | 573 | HeadArrow 574 | 0 575 | Legacy 576 | 577 | TailArrow 578 | 0 579 | Width 580 | 2 581 | 582 | 583 | 584 | 585 | Bounds 586 | {{169.50002034505223, 128.20278930664062}, {150, 37}} 587 | Class 588 | ShapedGraphic 589 | FitText 590 | YES 591 | Flow 592 | Resize 593 | FontInfo 594 | 595 | Color 596 | 597 | b 598 | 0.0663876 599 | g 600 | 0.0760601 601 | r 602 | 0.547743 603 | 604 | Font 605 | Helvetica 606 | Size 607 | 22 608 | 609 | ID 610 | 101825 611 | Shape 612 | Rectangle 613 | Style 614 | 615 | fill 616 | 617 | Draws 618 | NO 619 | 620 | shadow 621 | 622 | Draws 623 | NO 624 | 625 | stroke 626 | 627 | Cap 628 | 0 629 | Draws 630 | NO 631 | Join 632 | 0 633 | 634 | 635 | Text 636 | 637 | Align 638 | 0 639 | Pad 640 | 20 641 | RTFD 642 | 643 | BAtzdHJlYW10eXBlZIHoA4QBQISEhBJOU0F0dHJpYnV0 644 | ZWRTdHJpbmcAhIQITlNPYmplY3QAhZKEhIQITlNTdHJp 645 | bmcBlIQBKw5PcHRpb25bU3RyaW5nXYaEAmlJAQ6ShISE 646 | DE5TRGljdGlvbmFyeQCUhAFpA5KElpYHTlNDb2xvcoaS 647 | hISEB05TQ29sb3IAlIQBYwKEBGZmZmaDoJ8fP4OJiAg+ 648 | g6GgoD0BhpKElpYQTlNQYXJhZ3JhcGhTdHlsZYaShISE 649 | F05TTXV0YWJsZVBhcmFncmFwaFN0eWxlAISEEE5TUGFy 650 | YWdyYXBoU3R5bGUAlIQEQ0NAUwAAhISEB05TQXJyYXkA 651 | lJkMkoSEhAlOU1RleHRUYWIAlIQCQ2YAHIaShKOiADiG 652 | koSjogBUhpKEo6IAcIaShKOiAIGMAIaShKOiAIGoAIaS 653 | hKOiAIHEAIaShKOiAIHgAIaShKOiAIH8AIaShKOiAIEY 654 | AYaShKOiAIE0AYaShKOiAIFQAYaGgQAIhARbMWZdg83M 655 | TD2GkoSWlgZOU0ZvbnSGkoSEhAZOU0ZvbnQelJkkhAVb 656 | MzZjXQYAAAAcAAAA//5NAGUAbgBsAG8ALQBSAGUAZwB1 657 | AGwAYQByAIQBZg2bAJsBmwCbAIaGhg== 658 | 659 | Text 660 | {\rtf1\ansi\ansicpg1252\cocoartf1344\cocoasubrtf720 661 | \cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 Menlo-Regular;} 662 | {\colortbl;\red255\green255\blue255;\red140\green19\blue17;} 663 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural 664 | 665 | \f0\fs26 \cf2 Option[String]} 666 | VerticalPad 667 | 10 668 | 669 | TextPlacement 670 | 0 671 | Wrap 672 | NO 673 | 674 | 675 | Class 676 | LineGraphic 677 | ID 678 | 101824 679 | Points 680 | 681 | {165.66668701171875, 94.833327510898471} 682 | {165.66668701171875, 79.833343505859375} 683 | 684 | Style 685 | 686 | stroke 687 | 688 | Color 689 | 690 | b 691 | 0.0663876 692 | g 693 | 0.0760601 694 | r 695 | 0.547743 696 | 697 | HeadArrow 698 | 0 699 | Legacy 700 | 701 | TailArrow 702 | 0 703 | Width 704 | 2 705 | 706 | 707 | 708 | 709 | Bounds 710 | {{59.66668701171875, 47.833343505859375}, {213, 37}} 711 | Class 712 | ShapedGraphic 713 | FitText 714 | YES 715 | Flow 716 | Resize 717 | FontInfo 718 | 719 | Color 720 | 721 | b 722 | 0.0663876 723 | g 724 | 0.0760601 725 | r 726 | 0.547743 727 | 728 | Font 729 | Helvetica 730 | Size 731 | 22 732 | 733 | ID 734 | 101823 735 | Shape 736 | Rectangle 737 | Style 738 | 739 | fill 740 | 741 | Draws 742 | NO 743 | 744 | shadow 745 | 746 | Draws 747 | NO 748 | 749 | stroke 750 | 751 | Cap 752 | 0 753 | Draws 754 | NO 755 | Join 756 | 0 757 | 758 | 759 | Text 760 | 761 | Align 762 | 0 763 | Pad 764 | 20 765 | RTFD 766 | 767 | BAtzdHJlYW10eXBlZIHoA4QBQISEhBJOU0F0dHJpYnV0 768 | ZWRTdHJpbmcAhIQITlNPYmplY3QAhZKEhIQITlNTdHJp 769 | bmcBlIQBKxZDb2x1bW5bT3B0aW9uW1N0cmluZ11dhoQC 770 | aUkBFpKEhIQMTlNEaWN0aW9uYXJ5AJSEAWkDkoSWlgdO 771 | U0NvbG9yhpKEhIQHTlNDb2xvcgCUhAFjAoQEZmZmZoOg 772 | nx8/g4mICD6DoaCgPQGGkoSWlhBOU1BhcmFncmFwaFN0 773 | eWxlhpKEhIQXTlNNdXRhYmxlUGFyYWdyYXBoU3R5bGUA 774 | hIQQTlNQYXJhZ3JhcGhTdHlsZQCUhARDQ0BTAACEhIQH 775 | TlNBcnJheQCUmQyShISECU5TVGV4dFRhYgCUhAJDZgAc 776 | hpKEo6IAOIaShKOiAFSGkoSjogBwhpKEo6IAgYwAhpKE 777 | o6IAgagAhpKEo6IAgcQAhpKEo6IAgeAAhpKEo6IAgfwA 778 | hpKEo6IAgRgBhpKEo6IAgTQBhpKEo6IAgVABhoaBAAiE 779 | BFsxZl2DzcxMPYaShJaWBk5TRm9udIaShISEBk5TRm9u 780 | dB6UmSSEBVszNmNdBgAAABwAAAD//k0AZQBuAGwAbwAt 781 | AFIAZQBnAHUAbABhAHIAhAFmDZsAmwGbAJsAhoaG 782 | 783 | Text 784 | {\rtf1\ansi\ansicpg1252\cocoartf1344\cocoasubrtf720 785 | \cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 Menlo-Regular;} 786 | {\colortbl;\red255\green255\blue255;\red140\green19\blue17;} 787 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural 788 | 789 | \f0\fs26 \cf2 Column[Option[String]]} 790 | VerticalPad 791 | 10 792 | 793 | TextPlacement 794 | 0 795 | Wrap 796 | NO 797 | 798 | 799 | Bounds 800 | {{25, 89.833343505858011}, {565, 50}} 801 | Class 802 | ShapedGraphic 803 | FitText 804 | Vertical 805 | Flow 806 | Resize 807 | FontInfo 808 | 809 | Font 810 | Helvetica 811 | Size 812 | 22 813 | 814 | ID 815 | 101799 816 | Shape 817 | Rectangle 818 | Style 819 | 820 | fill 821 | 822 | Draws 823 | NO 824 | 825 | shadow 826 | 827 | Draws 828 | NO 829 | 830 | stroke 831 | 832 | Cap 833 | 0 834 | Draws 835 | NO 836 | Join 837 | 0 838 | 839 | 840 | Text 841 | 842 | Align 843 | 0 844 | Pad 845 | 8 846 | Text 847 | {\rtf1\ansi\ansicpg1252\cocoartf1344\cocoasubrtf720 848 | \cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 Menlo-Regular;} 849 | {\colortbl;\red255\green255\blue255;\red0\green0\blue0;} 850 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural 851 | 852 | \f0\fs26 \cf2 users.filter(_.email === oe).list == users.filter(_.email === e).list\ 853 | } 854 | VerticalPad 855 | 10 856 | 857 | TextPlacement 858 | 0 859 | 860 | 861 | Bounds 862 | {{15, 43}, {585, 198}} 863 | Class 864 | ShapedGraphic 865 | ID 866 | 101822 867 | Shape 868 | Rectangle 869 | Style 870 | 871 | fill 872 | 873 | Color 874 | 875 | b 876 | 0.964706 877 | g 878 | 0.964706 879 | r 880 | 0.964706 881 | 882 | 883 | shadow 884 | 885 | Draws 886 | NO 887 | 888 | stroke 889 | 890 | Draws 891 | NO 892 | 893 | 894 | 895 | 896 | GridInfo 897 | 898 | GuidesLocked 899 | NO 900 | GuidesVisible 901 | YES 902 | HPages 903 | 2 904 | ImageCounter 905 | 1 906 | KeepToScale 907 | 908 | Layers 909 | 910 | 911 | Lock 912 | NO 913 | Name 914 | Layer 1 915 | Print 916 | YES 917 | View 918 | YES 919 | 920 | 921 | LayoutInfo 922 | 923 | Animate 924 | NO 925 | circoMinDist 926 | 18 927 | circoSeparation 928 | 0.0 929 | layoutEngine 930 | dot 931 | neatoSeparation 932 | 0.0 933 | twopiSeparation 934 | 0.0 935 | 936 | LinksVisible 937 | NO 938 | MagnetsVisible 939 | NO 940 | MasterSheets 941 | 942 | ModificationDate 943 | 2015-02-11 14:58:43 +0000 944 | Modifier 945 | Richard Dallaway 946 | NotesVisible 947 | NO 948 | Orientation 949 | 2 950 | OriginVisible 951 | NO 952 | PageBreaks 953 | YES 954 | PrintInfo 955 | 956 | NSBottomMargin 957 | 958 | float 959 | 41 960 | 961 | NSHorizonalPagination 962 | 963 | coded 964 | BAtzdHJlYW10eXBlZIHoA4QBQISEhAhOU051bWJlcgCEhAdOU1ZhbHVlAISECE5TT2JqZWN0AIWEASqEhAFxlwCG 965 | 966 | NSLeftMargin 967 | 968 | float 969 | 18 970 | 971 | NSPaperSize 972 | 973 | size 974 | {595, 842} 975 | 976 | NSPrintReverseOrientation 977 | 978 | int 979 | 0 980 | 981 | NSRightMargin 982 | 983 | float 984 | 18 985 | 986 | NSTopMargin 987 | 988 | float 989 | 18 990 | 991 | 992 | PrintOnePage 993 | 994 | ReadOnly 995 | NO 996 | RowAlign 997 | 1 998 | RowSpacing 999 | 36 1000 | SheetTitle 1001 | Canvas 1 1002 | SmartAlignmentGuidesActive 1003 | YES 1004 | SmartDistanceGuidesActive 1005 | YES 1006 | UniqueID 1007 | 1 1008 | UseEntirePage 1009 | 1010 | VPages 1011 | 1 1012 | WindowInfo 1013 | 1014 | CurrentSheet 1015 | 0 1016 | ExpandedCanvases 1017 | 1018 | 1019 | name 1020 | Canvas 1 1021 | 1022 | 1023 | Frame 1024 | {{813, 450}, {1498, 951}} 1025 | ListView 1026 | 1027 | OutlineWidth 1028 | 142 1029 | RightSidebar 1030 | 1031 | ShowRuler 1032 | 1033 | Sidebar 1034 | 1035 | SidebarWidth 1036 | 120 1037 | VisibleRegion 1038 | {{-123, -13}, {1363, 809}} 1039 | Zoom 1040 | 1 1041 | ZoomValues 1042 | 1043 | 1044 | Canvas 1 1045 | 1 1046 | 1 1047 | 1048 | 1049 | 1050 | 1051 | 1052 | -------------------------------------------------------------------------------- /etc/schema.graffle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/underscoreio/essential-slick/f951634930d11dbfb19f52f4e3a4f2dae70c201d/etc/schema.graffle -------------------------------------------------------------------------------- /etc/table-tyes.graffle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/underscoreio/essential-slick/f951634930d11dbfb19f52f4e3a4f2dae70c201d/etc/table-tyes.graffle -------------------------------------------------------------------------------- /etc/versions/2.1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/underscoreio/essential-slick/f951634930d11dbfb19f52f4e3a4f2dae70c201d/etc/versions/2.1.pdf -------------------------------------------------------------------------------- /github_pages_deploy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Deploy the PDF, HTML, EPUB files of an Underscore book (source) 4 | # into another Git repository (target) 5 | # 6 | set -e 7 | 8 | if [[ "${TRAVIS_PULL_REQUEST}" == "false" && 9 | "${TRAVIS_BRANCH}" == "3.3" 10 | ]]; then 11 | 12 | # Configuration 13 | # 1. The key for writing into the other repository: 14 | export KEY_FILENAME=essential_slick_deploy.enc 15 | 16 | # 2. Folder inside target of where to place the artifacts: 17 | export TARGET_PATH=books/essential-slick/ 18 | # End of configuration 19 | 20 | echo "Starting deploy to github pages" 21 | echo -e "Host github.com\n\tStrictHostKeyChecking no\nIdentityFile ~/.ssh/deploy.key\n" >> ~/.ssh/config 22 | openssl aes-256-cbc -k "$SERVER_KEY" -in $KEY_FILENAME -d -a -out deploy.key 23 | cp deploy.key ~/.ssh/ 24 | chmod 600 ~/.ssh/deploy.key 25 | 26 | git config --global user.email "hello@underscore.io" 27 | git config --global user.name "Travis Build" 28 | 29 | export SRC_DIR=`pwd` # e.g., /home/travis/build/underscoreio/essential-slick 30 | export TARGET_DIR=/tmp/dist 31 | mkdir $TARGET_DIR 32 | cd $TARGET_DIR 33 | git clone git@github.com:underscoreio/books.git 34 | cd $TARGET_PATH 35 | 36 | cp $SRC_DIR/dist/*.pdf . 37 | cp $SRC_DIR/dist/*.html . 38 | cp $SRC_DIR/dist/*.epub . 39 | 40 | git add . 41 | git commit -m "auto commit via travis $TRAVIS_JOB_NUMBER $TRAVIS_COMMIT [ci skip]" 42 | git push git@github.com:underscoreio/books.git master:master 43 | 44 | rm -rf $TARGET_DIR 45 | fi 46 | -------------------------------------------------------------------------------- /go.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | docker-compose run book bash 3 | -------------------------------------------------------------------------------- /inject_analytics.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Inject analytics into html document. 4 | # 5 | set -e 6 | 7 | if [[ "${TRAVIS_PULL_REQUEST}" == "false" && 8 | "${TRAVIS_BRANCH}" == "master" 9 | ]]; then 10 | # Configuration 11 | # 1. The key for writing into the other repository: 12 | ANALYTICS_LINK=' 43 | 44 | 45 |
46 |
47 |
48 |
49 |
50 |
51 | To hear about new editions of this book, subscribe to the newsletter. 52 |
53 |
54 | $if(title)$ 55 |

56 | $title$ 57 | $if(subtitle)$ 58 | $subtitle$ 59 | $endif$ 60 |

61 | $for(author)$ 62 |

$author$

63 | $endfor$ 64 | $if(date)$ 65 |

$date$

66 | $endif$ 67 | 68 |
69 | $endif$ 70 |
71 | 72 |
73 | 74 |
75 | 76 | $if(toc)$ 77 | 99 | $endif$ 100 | 101 |
102 | $body$ 103 |
104 | 105 |
106 | 107 | 144 | 145 | 146 | 147 | -------------------------------------------------------------------------------- /src/templates/template.tex: -------------------------------------------------------------------------------- 1 | \documentclass[$if(fontsize)$$fontsize$$else$12pt$endif$,$if(lang)$$lang$,$endif$$if(papersize)$$papersize$,$endif$$for(classoption)$$classoption$$sep$,$endfor$]{$documentclass$} 2 | 3 | % Colors ---------------------------------------- 4 | 5 | \usepackage[xcolor]{mdframed} 6 | \definecolor{covercolor}{HTML}{$if(coverColor)$$coverColor$$else$777777$endif$} 7 | % \definecolor{primarycolor}{HTML}{428BCA} 8 | % \definecolor{successcolor}{HTML}{5CB85C} 9 | \definecolor{warningcolor}{HTML}{F0AD4E} 10 | \definecolor{dangercolor}{HTML}{D9534F} 11 | \definecolor{infocolor}{HTML}{5BC0DE} 12 | 13 | % Fonts ----------------------------------------- 14 | 15 | $if(fontfamily)$ 16 | \usepackage{$fontfamily$} 17 | $else$ 18 | \usepackage{lmodern} 19 | $endif$ 20 | 21 | $if(linestretch)$ 22 | \usepackage{setspace} 23 | \setstretch{$linestretch$} 24 | $endif$ 25 | \usepackage{amssymb,amsmath} 26 | \usepackage{ifxetex,ifluatex} 27 | \usepackage{fixltx2e} % provides \textsubscript 28 | \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex 29 | \usepackage[T1]{fontenc} 30 | \usepackage[utf8]{inputenc} 31 | $if(euro)$ 32 | \usepackage{eurosym} 33 | $endif$ 34 | \else % if luatex or xelatex 35 | \ifxetex 36 | \usepackage{mathspec} 37 | \usepackage{xltxtra,xunicode} 38 | \else 39 | \usepackage{fontspec} 40 | \fi 41 | \defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase} 42 | \newcommand{\euro}{€} 43 | $if(mainfont)$ 44 | \setmainfont$mainfont$ 45 | $else$ 46 | \setmainfont[% 47 | Color=primary, 48 | Path=$lib-dir$/fonts/Lato/, 49 | BoldItalicFont=Lato-BlackItalic, 50 | BoldFont=Lato-Bold, 51 | ItalicFont=Lato-Italic]{Lato-Regular} 52 | $endif$ 53 | 54 | $if(sansfont)$ 55 | \setsansfont{$sansfont$} 56 | $else$ 57 | \setsansfont[% 58 | Color=primary, 59 | Path=$lib-dir$/fonts/Lato/, 60 | BoldItalicFont=Lato-BlackItalic, 61 | BoldFont=Lato-Bold, 62 | ItalicFont=Lato-Italic]{Lato-Regular} 63 | $endif$ 64 | 65 | $if(monofont)$ 66 | \setmonofont[Mapping=tex-ansi]{$monofont$} 67 | $else$ 68 | \setmonofont[Mapping=tex-ansi]{Bitstream Vera Sans Mono} 69 | $endif$ 70 | 71 | $if(mathfont)$ 72 | \setmathfont(Digits,Latin,Greek){$mathfont$} 73 | $endif$ 74 | \fi 75 | 76 | % ----------------------------------------------- 77 | 78 | % use upquote if available, for straight quotes in verbatim environments 79 | \IfFileExists{upquote.sty}{\usepackage{upquote}}{} 80 | % use microtype if available 81 | \IfFileExists{microtype.sty}{% 82 | \usepackage{microtype} 83 | \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts 84 | }{} 85 | $if(geometry)$ 86 | \usepackage[$for(geometry)$$geometry$$sep$,$endfor$]{geometry} 87 | $endif$ 88 | $if(natbib)$ 89 | \usepackage{natbib} 90 | \bibliographystyle{$if(biblio-style)$$biblio-style$$else$plainnat$endif$} 91 | $endif$ 92 | $if(biblatex)$ 93 | \usepackage{biblatex} 94 | $if(biblio-files)$ 95 | \bibliography{$biblio-files$} 96 | $endif$ 97 | $endif$ 98 | $if(lhs)$ 99 | \lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{} 100 | $endif$ 101 | 102 | % Syntax highlighting --------------------------- 103 | 104 | $if(highlighting-macros)$ 105 | $highlighting-macros$ 106 | $endif$ 107 | 108 | % ----------------------------------------------- 109 | 110 | \usepackage{fancyvrb} 111 | $if(tables)$ 112 | \usepackage{longtable,booktabs} 113 | $endif$ 114 | $if(graphics)$ 115 | \usepackage{graphicx} 116 | \makeatletter 117 | \def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi} 118 | \def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi} 119 | \makeatother 120 | % Scale images if necessary, so that they will not overflow the page 121 | % margins by default, and it is still possible to overwrite the defaults 122 | % using explicit options in \includegraphics[width, height, ...]{} 123 | \setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio} 124 | $endif$ 125 | \ifxetex 126 | \usepackage[setpagesize=false, % page size defined by xetex 127 | unicode=false, % unicode breaks when used with xetex 128 | xetex]{hyperref} 129 | \else 130 | \usepackage[unicode=true]{hyperref} 131 | \fi 132 | \hypersetup{% 133 | breaklinks=true, 134 | bookmarks=true, 135 | pdfauthor={$author-meta$}, 136 | pdftitle={$title-meta$}, 137 | colorlinks=true, 138 | citecolor=$if(citecolor)$$citecolor$$else$blue$endif$, 139 | urlcolor=$if(urlcolor)$$urlcolor$$else$blue$endif$, 140 | linkcolor=$if(linkcolor)$$linkcolor$$else$magenta$endif$, 141 | pdfborder={0 0 0}} 142 | 143 | \urlstyle{same} % don't use monospace font for urls 144 | 145 | % Links as footnotes ---------------------------- 146 | 147 | $if(links-as-notes)$ 148 | % Make links footnotes instead of hotlinks: 149 | \renewcommand{\href}[2]{#2\footnote{\url{#1}}} 150 | $endif$ 151 | $if(strikeout)$ 152 | \usepackage[normalem]{ulem} 153 | % avoid problems with \sout in headers with hyperref: 154 | \pdfstringdefDisableCommands{\renewcommand{\sout}{}} 155 | $endif$ 156 | 157 | % The following two calls remove paragraph indentation. 158 | % and introduce extra space between paragraphs instead: 159 | \setlength{\parindent}{0pt} 160 | \setlength{\parskip}{6pt plus 2pt minus 1pt} 161 | 162 | \setlength{\emergencystretch}{3em} % prevent overfull lines 163 | $if(numbersections)$ 164 | \setcounter{secnumdepth}{5} 165 | $else$ 166 | \setcounter{secnumdepth}{0} 167 | $endif$ 168 | $if(verbatim-in-note)$ 169 | \VerbatimFootnotes % allows verbatim text in footnotes 170 | $endif$ 171 | $if(lang)$ 172 | \ifxetex 173 | \usepackage{polyglossia} 174 | \setmainlanguage{$mainlang$} 175 | \else 176 | \usepackage[$lang$]{babel} 177 | \fi 178 | $endif$ 179 | 180 | % Document metadata ----------------------------- 181 | 182 | $if(title)$ 183 | \title{$title$$if(subtitle)$\\\vspace{0.5em}{\large $subtitle$}$endif$} 184 | $endif$ 185 | $if(author)$ 186 | \author{$for(author)$$author$$sep$ \and $endfor$} 187 | $endif$ 188 | \date{$date$} 189 | $for(header-includes)$ 190 | $header-includes$ 191 | $endfor$ 192 | 193 | % Utilities for the title page ------------------ 194 | 195 | \usepackage{tikz} 196 | 197 | \newenvironment{bottompar}{\par\vspace*{\fill}}{\clearpage} 198 | 199 | % Column support (see columns.coffee) ----------- 200 | 201 | \usepackage{multicol} 202 | 203 | % Callout support (see callout.coffee) ---------- 204 | 205 | \newmdenv[% 206 | linecolor=infocolor,linewidth=5pt, 207 | topline=false,bottomline=false,rightline=false, 208 | innertopmargin=1em,innerbottommargin=1em, 209 | splittopskip=1em,splitbottomskip=1em, 210 | backgroundcolor=infocolor!30]{InfoCallout} 211 | \newmdenv[% 212 | linecolor=warningcolor,linewidth=5pt, 213 | topline=false,bottomline=false,rightline=false, 214 | innertopmargin=1em,innerbottommargin=1em, 215 | splittopskip=1em,splitbottomskip=1em, 216 | backgroundcolor=warningcolor!30]{WarningCallout} 217 | \newmdenv[% 218 | linecolor=dangercolor!60,linewidth=5pt, 219 | topline=false,bottomline=false,rightline=false, 220 | innertopmargin=1em,innerbottommargin=1em, 221 | splittopskip=1em,splitbottomskip=1em, 222 | backgroundcolor=dangercolor!25]{DangerCallout} 223 | 224 | % \newmdenv[% 225 | % topline=false,bottomline=false,leftline=false,rightline=false, 226 | % innertopmargin=1em,innerbottommargin=1em, 227 | % splittopskip=1em,splitbottomskip=1em, 228 | % backgroundcolor=black!10]{Shaded} 229 | 230 | % Customise default code blocks ----------------- 231 | 232 | \DefineVerbatimEnvironment{Highlighting}{Verbatim}{commandchars=\\\{\},fontsize=\small} 233 | 234 | \usepackage{listings} 235 | 236 | \definecolor{codebgcolor}{HTML}{F7F7F7} 237 | \definecolor{commentcolor}{HTML}{8E5A13} 238 | \definecolor{keywordcolor}{HTML}{234A85} 239 | \definecolor{literalcolor}{HTML}{0100CB} 240 | \definecolor{stringcolor}{HTML}{519818} 241 | 242 | \makeatletter 243 | \lst@CCPutMacro\lst@ProcessOther {"2D}{\lst@ttfamily{-{}}{-{}}} 244 | \@empty\z@\@empty 245 | \makeatother 246 | 247 | \lstset{ 248 | basicstyle=\tt\footnotesize, 249 | frame=single, 250 | breaklines=true 251 | } 252 | 253 | \lstdefinestyle{scala}{ 254 | breakatwhitespace=false, 255 | language=scala, 256 | frame=none, 257 | commentstyle=\tt\color{commentcolor}, 258 | extendedchars=true, 259 | keepspaces=true, 260 | keywordstyle=\tt\color{keywordcolor}, 261 | emphstyle=\tt\color{cyan}, 262 | rulecolor=\tt\color{black}, 263 | showspaces=false, 264 | showstringspaces=false, 265 | showtabs=false, 266 | stringstyle=\tt\color{stringcolor}, 267 | tabsize=2, 268 | aboveskip=0em, 269 | belowskip=0em, 270 | } 271 | 272 | \surroundwithmdframed[ 273 | hidealllines=true, 274 | backgroundcolor=codebgcolor, 275 | innerleftmargin=6pt, 276 | innerrightmargin=6pt, 277 | innertopmargin=10pt, 278 | innerbottommargin=6pt]{lstlisting} 279 | 280 | \lstdefinelanguage{scala}{ 281 | morekeywords={abstract,case,catch,class,def,% 282 | do,else,extends,false,final,finally,% 283 | for,if,implicit,import,match,mixin,% 284 | new,null,object,override,package,% 285 | private,protected,requires,return,sealed,% 286 | super,this,throw,trait,true,try,% 287 | type,val,var,while,with,yield}, 288 | moreemph={}, 289 | otherkeywords={=>,<-,<\%,<:,>:,\#,@}, 290 | sensitive=true, 291 | morecomment=[l]{//}, 292 | morecomment=[n]{/*}{*/}, 293 | morestring=[b]", 294 | morestring=[b]', 295 | morestring=[b]""" 296 | } 297 | 298 | % Needed for recent update to Pandoc ------------ 299 | 300 | \providecommand{\tightlist}{% 301 | \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} 302 | 303 | % Cat images in part title pages ---------------- 304 | 305 | \makeatletter 306 | 307 | % define a user command to choose the image 308 | % this command also creates an internal command to insert the image 309 | \newcommand{\partimage}[2][]{\gdef\@partimage{\includegraphics[#1]{#2}}} 310 | 311 | % UNCOMMENT THIS TO RE-ENABLE CAT PICTURES 312 | % 313 | % redefine the amsbook part code to include the \@partimage insertion command 314 | % \def\@part[#1]#2{% 315 | % \ifnum \c@secnumdepth >-2\relax \refstepcounter{part}% 316 | % \addcontentsline{toc}{part}{\partname\ \thepart. 317 | % \protect\enspace\protect\noindent#1}% 318 | % \else 319 | % \addcontentsline{toc}{part}{#1}\fi 320 | % \begingroup\centering 321 | % \ifnum \c@secnumdepth >-2\relax 322 | % {\fontsize{24pt}{30pt} \bfseries \partname\ \thepart} 323 | % \vskip 20\p@ \fi 324 | % \fontsize{30pt}{36pt} \bfseries#1 325 | % \vfil\@partimage\vfil 326 | % \endgroup 327 | % \newpage\thispagestyle{empty}} 328 | 329 | \makeatother 330 | 331 | % Tweaks to the table of contents --------------- 332 | 333 | $if(toc)$ 334 | \usepackage{tocloft} 335 | % \setlength{\cftpartnumwidth}{2em} 336 | % \setlength{\cftchapnumwidth}{2em} 337 | % \setlength{\cftsecnumwidth}{3em} 338 | \setlength{\cftsubsecnumwidth}{4em} 339 | % \setlength{\cftparskip}{2pt} 340 | $endif$ 341 | 342 | % =============================================== 343 | % Document 344 | % =============================================== 345 | 346 | \begin{document} 347 | \pagecolor{white} 348 | 349 | % Title page ------------------------------------ 350 | 351 | \begin{titlepage} 352 | \pagecolor{covercolor} 353 | \color{white} 354 | 355 | \begin{tikzpicture}[overlay, remember picture] 356 | \node[anchor=north west, xshift=-.2cm, yshift=.2cm] 357 | at (current page.north west) 358 | {\includegraphics{$lib-dir$/templates/images/hero-left-overlay-white.pdf}}; 359 | \end{tikzpicture} 360 | 361 | \begin{tikzpicture}[overlay, remember picture] 362 | \node[anchor=south east, xshift=.2cm, yshift=-.2cm] 363 | at (current page.south east) 364 | {\includegraphics{$lib-dir$/templates/images/hero-right-overlay-white.pdf}}; 365 | \end{tikzpicture} 366 | 367 | \begin{center} 368 | \vspace{1cm} 369 | 370 | $if(title)$ 371 | {\fontsize{1.5cm}{1em} \textsf{$title$}} 372 | $endif$ 373 | 374 | $if(subtitle)$ 375 | \vspace{.25em} 376 | 377 | {\fontsize{1cm}{1em} \textsf{$subtitle$}} 378 | $endif$ 379 | 380 | \vspace{1cm} 381 | 382 | $for(author)$ 383 | {\fontsize{1cm}{1em} \textsf{$author$}} 384 | $endfor$ 385 | 386 | \vspace{1em} 387 | 388 | $if(date)$ 389 | {\fontsize{.5cm}{1em} \textsf{$date$}} 390 | $endif$ 391 | \end{center} 392 | 393 | \begin{bottompar} 394 | \begin{center} 395 | \includegraphics[width=5cm]{$lib-dir$/templates/images/brand.pdf} 396 | 397 | \vspace{1cm} 398 | Copyright $copyright$ $author$. 399 | \vspace{1cm} 400 | \end{center} 401 | \end{bottompar} 402 | \end{titlepage} 403 | 404 | % $if(title)$ 405 | % \maketitle 406 | % $endif$ 407 | 408 | \pagecolor{white} 409 | 410 | % Abstract -------------------------------------- 411 | 412 | $if(abstract)$ 413 | \begin{abstract} 414 | $abstract$ 415 | \end{abstract} 416 | $endif$ 417 | 418 | % Include-before hook --------------------------- 419 | 420 | \vspace*{\fill} 421 | 422 | \begin{center} 423 | 424 | {\Large $title$$if(subtitle)$ $subtitle$$endif$} 425 | 426 | $date$ 427 | 428 | Copyright $copyright$ $author$. 429 | 430 | Published by \href{https://underscore.io}{Underscore Consulting LLP}, Brighton, UK. 431 | 432 | \end{center} 433 | 434 | \vspace{1em} 435 | 436 | $for(include-before)$ 437 | $include-before$ 438 | 439 | $endfor$ 440 | 441 | \vspace*{\fill} 442 | 443 | % Tables of contents, etc. ---------------------- 444 | 445 | $if(toc)$ 446 | { 447 | \hypersetup{linkcolor=black} 448 | \setcounter{tocdepth}{$if(toc-depth)$$toc-depth$$else$3$endif$} 449 | \tableofcontents 450 | } 451 | $endif$ 452 | $if(lot)$ 453 | \listoftables 454 | $endif$ 455 | $if(lof)$ 456 | \listoffigures 457 | $endif$ 458 | 459 | % Main document body ---------------------------- 460 | 461 | $body$ 462 | 463 | % Bibliography ---------------------------------- 464 | 465 | $if(natbib)$ 466 | $if(biblio-files)$ 467 | $if(biblio-title)$ 468 | $if(book-class)$ 469 | \renewcommand\bibname{$biblio-title$} 470 | $else$ 471 | \renewcommand\refname{$biblio-title$} 472 | $endif$ 473 | $endif$ 474 | \bibliography{$biblio-files$} 475 | 476 | $endif$ 477 | $endif$ 478 | $if(biblatex)$ 479 | \printbibliography$if(biblio-title)$[title=$biblio-title$]$endif$ 480 | 481 | $endif$ 482 | 483 | % Include-after hook ---------------------------- 484 | 485 | $for(include-after)$ 486 | $include-after$ 487 | 488 | $endfor$ 489 | 490 | % The end --------------------------------------- 491 | 492 | \end{document} 493 | --------------------------------------------------------------------------------