├── .gitignore ├── .jekyll-cache └── Jekyll │ └── Cache │ ├── Jekyll--Cache │ └── b7 │ │ └── 9606fb3afea5bd1609ed40b622142f1c98125abcfe89a76a661b0e8e343910 │ └── Jekyll--Converters--Markdown │ ├── 10 │ └── addc7f715b34e10b700e52ada4125395b5e8a2641beb5f2912f2c16765288d │ ├── 39 │ └── ff40c74076dc64ae3a52c08dda270808305ad2cb44f323a370d07e9a5f328b │ ├── b4 │ └── 7d3fa39973ab04879b728ece40ebbf5bdddd2dbf70b0773de973fdef1cbf74 │ └── dc │ └── 24cb68c45a356cb89f20ecf139df4c27937468a0a13ca5c972fc8bbd94103b ├── Gemfile ├── Gemfile.lock ├── LICENSE ├── README.md ├── Rakefile ├── UploadToGithub.Rakefile ├── _config.yml ├── _data ├── options.yml └── social.yml ├── _drafts └── a-test-draft.md ├── _includes ├── footer.html ├── head.html ├── header.html └── print-footer.html ├── _layouts ├── default.html ├── full-width.html ├── page.html └── post.html ├── _page.txt ├── _plugins ├── epigraph.rb ├── fullwidth.rb ├── main_column_img.rb ├── margin_figure.rb ├── marginnote.rb ├── mathjaxtag.rb ├── newthought.rb └── sidenote.rb ├── _post.txt ├── _posts ├── 2020-04-13-Edge-Cases.md └── 2020-04-13-tufte-style-jekyll-blog.md ├── _sass ├── _fonts.scss ├── _settings.scss └── _syntax-highlighting.scss ├── about └── index.md ├── assets └── img │ ├── badge.png │ ├── badge_1.png │ ├── badge_1.psd │ ├── badge_1a.psd │ ├── badge_2.png │ ├── badge_3.png │ ├── exports-imports.png │ ├── figure1.png │ ├── figure2.png │ ├── figure3.png │ ├── napoleons-march.png │ └── rhino.png ├── css ├── print.scss └── tufte.scss ├── feed.xml ├── fonts ├── et-book │ ├── et-book-bold-line-figures │ │ ├── et-book-bold-line-figures.eot │ │ ├── et-book-bold-line-figures.svg │ │ ├── et-book-bold-line-figures.ttf │ │ └── et-book-bold-line-figures.woff │ ├── et-book-display-italic-old-style-figures │ │ ├── et-book-display-italic-old-style-figures.eot │ │ ├── et-book-display-italic-old-style-figures.svg │ │ ├── et-book-display-italic-old-style-figures.ttf │ │ └── et-book-display-italic-old-style-figures.woff │ ├── et-book-roman-line-figures │ │ ├── et-book-roman-line-figures.eot │ │ ├── et-book-roman-line-figures.svg │ │ ├── et-book-roman-line-figures.ttf │ │ └── et-book-roman-line-figures.woff │ ├── et-book-roman-old-style-figures │ │ ├── et-book-roman-old-style-figures.eot │ │ ├── et-book-roman-old-style-figures.svg │ │ ├── et-book-roman-old-style-figures.ttf │ │ └── et-book-roman-old-style-figures.woff │ └── et-book-semi-bold-old-style-figures │ │ ├── et-book-semi-bold-old-style-figures.eot │ │ ├── et-book-semi-bold-old-style-figures.svg │ │ ├── et-book-semi-bold-old-style-figures.ttf │ │ └── et-book-semi-bold-old-style-figures.woff ├── icomoon.eot ├── icomoon.svg ├── icomoon.ttf └── icomoon.woff ├── index.html └── page └── index.md /.gitignore: -------------------------------------------------------------------------------- 1 | _site 2 | .sass-cache 3 | .jekyll-cache 4 | .DS\_Store 5 | config.codekit 6 | -------------------------------------------------------------------------------- /.jekyll-cache/Jekyll/Cache/Jekyll--Cache/b7/9606fb3afea5bd1609ed40b622142f1c98125abcfe89a76a661b0e8e343910: -------------------------------------------------------------------------------- 1 | I"b{"source"=>"/Users/wcharmon/Dropbox (Personal)/MAMP/htdocs/tufte-jekyll", "destination"=>"/Users/wcharmon/Dropbox (Personal)/MAMP/htdocs/tufte-jekyll/_site", "collections_dir"=>"", "cache_dir"=>".jekyll-cache", "plugins_dir"=>"_plugins", "layouts_dir"=>"_layouts", "data_dir"=>"_data", "includes_dir"=>"_includes", "collections"=>{"posts"=>{"output"=>true, "permalink"=>"/articles/:short_year/:title"}}, "safe"=>false, "include"=>[".htaccess"], "exclude"=>["Gemfile", "Gemfile.lock", "Rakefile", "UploadToGithub.Rakefile", "README.md", ".sass-cache", ".jekyll-cache", "gemfiles", "node_modules", "vendor/bundle/", "vendor/cache/", "vendor/gems/", "vendor/ruby/"], "keep_files"=>[".git", ".svn"], "encoding"=>"utf-8", "markdown_ext"=>"markdown,mkdown,mkdn,mkd,md", "strict_front_matter"=>false, "show_drafts"=>nil, "limit_posts"=>0, "future"=>false, "unpublished"=>false, "whitelist"=>[], "plugins"=>[], "markdown"=>"kramdown", "highlighter"=>"rouge", "lsi"=>false, "excerpt_separator"=>"", "incremental"=>false, "detach"=>false, "port"=>"4000", "host"=>"127.0.0.1", "baseurl"=>"", "show_dir_listing"=>false, "permalink"=>"/articles/:short_year/:title", "paginate_path"=>"/page:num", "timezone"=>"America/New_York", "quiet"=>false, "verbose"=>false, "defaults"=>[], "liquid"=>{"error_mode"=>"warn", "strict_filters"=>false, "strict_variables"=>false}, "kramdown"=>{"auto_ids"=>true, "toc_levels"=>[1, 2, 3, 4, 5, 6], "entity_output"=>"as_char", "smart_quotes"=>"lsquo,rsquo,ldquo,rdquo", "input"=>"GFM", "hard_wrap"=>false, "guess_lang"=>true, "footnote_nr"=>1, "show_warnings"=>false}, "title"=>"Tufte-Jekyll", "subtitle"=>"Content-centric blogging", "author"=>"clay harmon", "simple_search"=>"http://google.com/search", "description"=>"A Jekyll theme for content-rich sites", "name"=>"tufte", "post"=>{"template"=>"_post.txt", "extension"=>"md"}, "page"=>{"template"=>"_page.txt", "extension"=>"md"}, "editor"=>"gvim", "git"=>{"branch"=>"master"}, "transfer"=>{"command"=>"rsync", "settings"=>"-av", "source"=>"_site/", "destination"=>"~/Git/clayh53.github.com/"}, "watch"=>true, "livereload_port"=>35729, "serving"=>true, "url"=>nil}:ET -------------------------------------------------------------------------------- /.jekyll-cache/Jekyll/Cache/Jekyll--Converters--Markdown/10/addc7f715b34e10b700e52ada4125395b5e8a2641beb5f2912f2c16765288d: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clayh53/tufte-jekyll/d54bfd83aaa46f6bc8023a162637ce9c4005f62f/.jekyll-cache/Jekyll/Cache/Jekyll--Converters--Markdown/10/addc7f715b34e10b700e52ada4125395b5e8a2641beb5f2912f2c16765288d -------------------------------------------------------------------------------- /.jekyll-cache/Jekyll/Cache/Jekyll--Converters--Markdown/39/ff40c74076dc64ae3a52c08dda270808305ad2cb44f323a370d07e9a5f328b: -------------------------------------------------------------------------------- 1 | I"H

In this first iteration of the Tufte-Jekyll theme, a post and a page have exactly the same layout. That means that all the typographic and structural details are identical between the two.

2 | 3 |

Pages and Posts

4 | 5 |

Jekyll provides for both pages and posts in its default configuration. I have left this as-is.

6 | 7 |

Posts

8 | 9 |

Conceptually, posts are for recurring pieces of similar content such as might be found in a typical blog entry. Post content all sits in a folder named _posts and files are created in this folderYes, a page has essentially the same old shit as a post that are names with a date pre-pended to the title of the post. For instance 2105-02-20-this-is-a-post.md is a perfectly valid post filename.

10 | 11 |

Posts will always have a section above the content itself consisting of YAML front matter, which is meta-data information about the post. Minimally, a post title must always be present for it to be processed properly.

12 | 13 |
---
14 | Title: Some Title
15 | ---
16 | ## Content
17 | 
18 | Markdown formatted content *here*.
19 | 
20 | 21 |

Pages

22 | 23 |

Pages are any HTML documents or Markdown documents with YAML front matter that are then converted to content. Page material is more suited to static, non-recurring types of content. Like this

24 | 25 |

I am not going to re-write the Jekyll documentation. Read it and you will figure out how the site is structured.

26 | 27 | :ET -------------------------------------------------------------------------------- /.jekyll-cache/Jekyll/Cache/Jekyll--Converters--Markdown/b4/7d3fa39973ab04879b728ece40ebbf5bdddd2dbf70b0773de973fdef1cbf74: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clayh53/tufte-jekyll/d54bfd83aaa46f6bc8023a162637ce9c4005f62f/.jekyll-cache/Jekyll/Cache/Jekyll--Converters--Markdown/b4/7d3fa39973ab04879b728ece40ebbf5bdddd2dbf70b0773de973fdef1cbf74 -------------------------------------------------------------------------------- /.jekyll-cache/Jekyll/Cache/Jekyll--Converters--Markdown/dc/24cb68c45a356cb89f20ecf139df4c27937468a0a13ca5c972fc8bbd94103b: -------------------------------------------------------------------------------- 1 | I"&

The Tufte Jekyll theme is an attempt to create a website design with the look and feel of Edward Tufte’s books and handouts. Tufte’s style is known for its extensive use of sidenotes, tight integration of graphics with text, and well-set typography.

2 | :ET -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gem 'jekyll' 4 | gem 'rouge' -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://rubygems.org/ 3 | specs: 4 | addressable (2.8.0) 5 | public_suffix (>= 2.0.2, < 5.0) 6 | colorator (1.1.0) 7 | concurrent-ruby (1.1.8) 8 | em-websocket (0.5.2) 9 | eventmachine (>= 0.12.9) 10 | http_parser.rb (~> 0.6.0) 11 | eventmachine (1.2.7) 12 | ffi (1.15.0) 13 | forwardable-extended (2.6.0) 14 | http_parser.rb (0.6.0) 15 | i18n (1.8.9) 16 | concurrent-ruby (~> 1.0) 17 | jekyll (4.2.0) 18 | addressable (~> 2.4) 19 | colorator (~> 1.0) 20 | em-websocket (~> 0.5) 21 | i18n (~> 1.0) 22 | jekyll-sass-converter (~> 2.0) 23 | jekyll-watch (~> 2.0) 24 | kramdown (~> 2.3) 25 | kramdown-parser-gfm (~> 1.0) 26 | liquid (~> 4.0) 27 | mercenary (~> 0.4.0) 28 | pathutil (~> 0.9) 29 | rouge (~> 3.0) 30 | safe_yaml (~> 1.0) 31 | terminal-table (~> 2.0) 32 | jekyll-sass-converter (2.1.0) 33 | sassc (> 2.0.1, < 3.0) 34 | jekyll-watch (2.2.1) 35 | listen (~> 3.0) 36 | kramdown (2.3.1) 37 | rexml 38 | kramdown-parser-gfm (1.1.0) 39 | kramdown (~> 2.0) 40 | liquid (4.0.3) 41 | listen (3.5.0) 42 | rb-fsevent (~> 0.10, >= 0.10.3) 43 | rb-inotify (~> 0.9, >= 0.9.10) 44 | mercenary (0.4.0) 45 | pathutil (0.16.2) 46 | forwardable-extended (~> 2.6) 47 | public_suffix (4.0.6) 48 | rb-fsevent (0.10.4) 49 | rb-inotify (0.10.1) 50 | ffi (~> 1.0) 51 | rexml (3.2.5) 52 | rouge (3.26.0) 53 | safe_yaml (1.0.5) 54 | sassc (2.4.0) 55 | ffi (~> 1.9) 56 | terminal-table (2.0.0) 57 | unicode-display_width (~> 1.1, >= 1.1.1) 58 | unicode-display_width (1.7.0) 59 | 60 | PLATFORMS 61 | ruby 62 | 63 | DEPENDENCIES 64 | jekyll 65 | rouge 66 | 67 | BUNDLED WITH 68 | 2.1.4 69 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Clay H 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # tufte-jekyll theme 2 | 3 | The *Tufte-Jekyll* blog theme is based on the github repository by Edward Tufte [here](https://github.com/edwardtufte/tufte-css), which was orginally created by Dave Leipmann, but is now labeled under Edward Tufte's moniker. I borrowed freely from the Tufte-CSS repo and have transformed many of the typographic and page-structural features into a set of custom Liquid tags that make creating content using this style much easier than writing straight HTML. Essentially, if you know markdown, and mix in a few custom Liquid tags, you can be creating a website with this document style in short order. 4 | 5 | Please be aware that the feature parity between the tufte-css repository and this project is not perfect. It is very close, but this Jekyll theme has additional CSS to scratch some of my own itches. One example is that the sidenote's typography is vertically spaced in my CSS so they are on the same baseline grid as the body text and it doesn't hurt my eyes when I look at them. Another example is the optional use of color to style links. The current tufte.css repo doesn't allow that, but my opinion is that hey, this is the web. It shouldn't have to ape the way a book looks exactly. I attempt to stay true to the overall sensibility of the tufte.css repo, but I am not going to sacrifice anything that I think reduces the usability or esthetics of this theme in the service of exact feature parity. Just as I have 'forked' the tufte.css, you are more than welcome to modify this theme to suit your own tastes and specific needs. 6 | 7 | ## Demo 8 | 9 | A sample site with self-documenting content is available [here](http://clayh53.github.io/tufte-jekyll/) on github pages. 10 | 11 | ## Installation 12 | 13 | I'm not going to go into great detail here. I am just going to assume that anyone interested in either Jekyll, Edward Tufte's work or Github has some basic skills. I created this with Ruby 2.2.0 and Jekyll 2.5.3. There is absolutely nothing exotic going on here, so you can probably make any recent version of Jekyll work with this setup. 14 | 15 | So copy, pull, download a zipfile or whatever and fire it up. 16 | 17 | ``` 18 | cd ~/thatPlaceYouPutIt/tufte-jekyll 19 | jekyll build 20 | jekyll serve -w 21 | ``` 22 | 23 | And then point your browser at localhost:4000/tufte-jekyll 24 | 25 | You can also use `jekyll serve -w --baseurl ''` to remove `/tufte-jekyll` from the url and serve your site directly from localhost:4000. This only affects your local preview. See [Setting your baseurl correctly](#setting-your-baseurl-correctly) for more details. 26 | 27 | ## Configuration 28 | 29 | ### Jekyll site building options 30 | 31 | I have created a very simple site options file in the ```_data``` directory that contains two settings currently. The file in the github repo looks like this: 32 | ``` 33 | mathjax: true 34 | lato_font_load: true 35 | ``` 36 | Removing either 'true' value will prevent the jekyll site building process from adding links to either the Mathjax library or the Google Fonts Lato font as a fallback for the Gill Sans. Set these values to blank if you want to really streamline your page loading time. 37 | 38 | ### SASS 39 | 40 | I am using Sass to create the css file used by this theme. If you would like to change things like fonts, text colors, background colors and so forth, edit the ```_scss/_settings.scss``` file. This file gets loaded first when Jekyll constructs the master CSS file from the tufte.scss SASS file, and contains SASS variables that influence the appearance of the site. The one variable that may be of interest to some is the ```$link-style``` variable, which can be set to either ```underline``` or ```color```. This will determine if your links are styled using the ```$contrast-color``` variable with no underlining, or whether they are styled using light underlining as seen on the [*tufte-css*](https://github.com/edwardtufte/tufte-css) repo. 41 | 42 | ### Social icons 43 | 44 | You can edit the ```_data/social.yml``` file and put in your own information for the footer links 45 | 46 | ### Silly-ass badge in the upper left 47 | 48 | In the ```assets/img``` directory is a file called ```badge_1.png```. This file's parent is ```badge_1.psd``` and is an editable photoshop file with layers for the letters comprising the initials. Change them to suit your fancy. Or just substitute another badge in its place. You can edit the ```_includes/header.html``` file and change the file that it points too. Find your favorite Tufte emoji and fly your freak flag proudly. 49 | 50 | ## Some things about the things 51 | 52 | I needed to create several custom Liquid tags to wrap content in the right kind of tags. You will create your posts in the normal way in the ```_posts``` directory, and then edit them with Github-Flavored Markdown. In addition to all that GFM goodness, you can use the following custom Liquid tags in your content area. 53 | 54 | Note that these tags *have been altered* from Version 1 of this theme to accommodate some responsive features, namely the ability to reveal hidden sidenotes, margin notes and margin figures by tapping either a superscript or a symbol on small screens. This requires you to add a parameter to the tag that is a unique *ID* for each tag instance on the page. What the id is called is not important, but it is important that it be unique for each individual element on the page. I would recommend in the interest of sanity to give names that are descriptive, like ```'sn-id-1'``` or ```'mf-id-rhino'```. 55 | 56 | ### Notes about quotes in Liquid tags 57 | 58 | The custom Liquid tags are designed to simplify writing content and displaying it with the *tufte-css* look. Here are a few notes on using quotes inside the tags. 59 | 60 | * Liquid tags work with either double or single quotes to surround the tag parameters, as you'll see in all the examples below. 61 | 62 | * You can use single quotes and apostrophes in the text inside tag parameters, as long as all the parameters are surrounded by double quotes. Liquid will automatically process them correctly. For example: `{% newthought "I'm so smart!" %}` will render as `I'm so smart!`. If the text inside one of the parameters contains a single quote, then use double quotes to surround the parameters. Conversely, if the text inside one of the parameters contains a double quote, use single quotes to surround the parameters. 63 | 64 | * One can also use a double quote in the text inside a tag parameter by 'escaping' the double quote by placing a backslash directly in front of it, for example: `{% newthought "\"I'm so smart!\", she thought." %}` will render as `"I'm so smart!", she thought.` 65 | 66 | * You can use HTML inside of a tag parameter. Originally, Markdown support inside the Liquid parameters strings was spotty, but I recently added some code that should allow most Markdown inside the tag parameter strings. You can use either single quotes, or escaped double quotes in the HTML. For example, both of the following tags will work: 67 | 68 | ``` 69 | {% newthought "Example website: example label" %} 70 | ``` 71 | ``` 72 | {% newthought "Example website: example label" %} 73 | ``` 74 | 75 | The [demo site's Edge Cases entry](https://clayh53.github.io/tufte-jekyll/articles/20/Edge-Cases.html) has an example toward the bottom illustrating HTML inside of a tag parameter. 76 | 77 | ### Epigraph 78 | 79 | This tag will render its three components into a standalone epigraph. This can be used as an introduction to a page or to a section within a page. As with most things Markdown, surround the epigraph with a blank line above and below it. 80 | 81 | ``` 82 | {% epigraph ' "How did you go bankrupt?" Two ways. Gradually, then suddenly.' 'Ernest Hemingway' ' "The Sun Also Rises" ' %} 83 | ``` 84 | 85 | ### New thought 86 | 87 | This tag will render its contents in small caps. Useful at the beginning of new sections: 88 | 89 | ``` 90 | {% newthought "This will be rendered in small caps" %} blah blah 91 | ``` 92 | 93 | ### Sidenote 94 | 95 | This tag inserts a *sidenote* in the content, which is like a footnote, only its in the spacious right-hand column. It is automatically numbered, starting over on each page. Just put it in the content like you would insert a footnote like so: 96 | 97 | ``` 98 | blah lorem blah{% sidenote "sidenote-id" "This is a random sidenote" %} blah blah 99 | ``` 100 | And it will add the html spans and superscripts. On smaller screens, tapping on the number will reveal the sidenote! 101 | 102 | The `full-width` page layout will not display side notes. (It's a full-width page and has no margin) 103 | 104 | ### Margin note 105 | 106 | This tag is essentially the same as a sidenote, but heh, no number. Like this: 107 | 108 | ``` 109 | lorem nobeer toasty critters{% marginnote "margin-note-id" "Random thought when drinking" %} continue train of thought 110 | ``` 111 | On smaller screens, tapping on the symbol will open up the margin note. 112 | 113 | The `full-width` page layout will not display margin notes. (It's a full-width page and has no margin) 114 | 115 | ### Full width image 116 | 117 | This tag inserts an image that spans both the main content column and the side column: 118 | 119 | ``` 120 | blah blah 121 | {% fullwidth "assets/img/rhino.png" "A caption for the image" %} 122 | blah 123 | ``` 124 | 125 | or 126 | 127 | ``` 128 | blah blah 129 | {% fullwidth "http://example.com/image.jpg" "A caption for the image" %} 130 | blah 131 | ``` 132 | 133 | Note the absence of a leading slash in the image url when using relative file paths. (This is incorrect: `/assets/img/rhino.png`) 134 | 135 | Also note that fullwidth images need to be included *on their own line* in order for the captions to work correctly. 136 | 137 | ### Main column image 138 | 139 | This tag inserts an image that is confined to the main content column: 140 | 141 | ``` 142 | blah blah 143 | {% maincolumn "assets/img/rhino.png" "This is the caption" %} 144 | blah 145 | ``` 146 | 147 | or 148 | 149 | ``` 150 | blah blah 151 | {% maincolumn "http://example.com/image.jpg" "This is the caption" %} 152 | blah 153 | ``` 154 | 155 | No need for an ID in this tag because it doesn't have any doohickies that open and close on narrow screens. Again note the absence of the leading slash in the image url when using relative file paths. (This is incorrect: `/assets/img/rhino.png`) 156 | 157 | And just like fullwidth images, main column images need to be included on their own line in order for the captions to work correctly. 158 | 159 | ### Margin figure 160 | 161 | This tag inserts and image in the side column area. Note that an id needs to be specified: 162 | 163 | ``` 164 | blah blah {% marginfigure "margin-figure-id" "assets/img/rhino.png" "This is the caption" %} blah 165 | ``` 166 | 167 | or 168 | 169 | ``` 170 | blah blah {% marginfigure "margin-figure-id" "http://example.com/image.jpg" "This is the caption" %} blah 171 | ``` 172 | 173 | This needs an ID parameter so that it can be clicked and opened on small screens. Again note the absence of the leading slash in the image url when using relative file paths. (This is incorrect: `/assets/img/rhino.png`) 174 | 175 | The `full-width` page layout will not display margin figures. (It's a full-width page and has no margin) 176 | 177 | ### Mathjax 178 | 179 | For those wanting to use this Jekyll theme for academic writing, the new Kramdown Markdown engine will accurately parse *MathJax* expressions as long as they are enclosed in a pair of double dollar signs like this: 180 | 181 | ```$$ x = {-b \pm \sqrt{b^2-4ac} \over 2a} $$``` 182 | 183 | As a side note - if you do not need the math ability, navigate to the ```_data/options.yml``` file and change the mathjax to 'false' and it will not load the mathjax javascript. 184 | 185 | ### Setting your baseurl correctly 186 | 187 | In the `_config.yml` file is a setting called `baseurl`. This is used by the Jekyll engine to construct all the proper links in the static site. Right now it is set to `/tufte-jekyll` since this project is using Github Pages and you are required to set the project name as the baseurl to serve from Github Pages. 188 | 189 | Set this to your own project name if you're going to serve your site from Github Pages. Be sure to include the leading slash, and no trailing slash. For example: `/my-project-name` 190 | 191 | For a full explanation of setting your baseurl to work with Github Pages, see the [Project Page URL Structure](http://jekyllrb.com/docs/github-pages/#project-page-url-structure) section of the Jekyll documentation. 192 | 193 | To serve from anywhere else besides Github Pages, use a blank baseurl in your `_config.yml` file: 194 | 195 | ``` 196 | baseurl: 197 | ``` 198 | 199 | This is `baseurl:` with nothing after it. Not even a space. 200 | 201 | ### Rakefile 202 | 203 | I have added a boilerplate Rakefile directly from the [jekyll-rake-boilerplate repo](https://github.com/gummesson/jekyll-rake-boilerplate). This saves you a small amount of time by prepending the date on a post name and populated the bare minimum of YAML front matter in the file. Please visit the link to the repo to find out how it runs. One thing to note is that there should be *no* space between the task and the opening bracket of your file name. ```rake post["Title"]``` will work while ```rake post ["Title"]``` will not. 204 | 205 | There is another rakefile (UploadtoGithub.Rakefile) included that only has one task in it - an automated upload to a *Github Pages* location of the site. This is necessary because of the plugins used by this theme. It does scary stuff like move your ```_site``` somewhere safe, delete everything, move the ```_site``` back and then do a commit to the ```gh-pages``` branch of your repository. You can read about it [here](http://blog.nitrous.io/2013/08/30/using-jekyll-plugins-on-github-pages.html). You would only need to use this if you are using Github project pages to host your site. Integration with the existing Rakefile is left as an exercise for the reader. 206 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | require 'rubygems' 2 | require 'rake' 3 | require 'rdoc' 4 | require 'date' 5 | require 'yaml' 6 | require 'tmpdir' 7 | require 'jekyll' 8 | 9 | desc "Generate blog files" 10 | task :generate do 11 | Jekyll::Site.new(Jekyll.configuration({ 12 | "source" => ".", 13 | "destination" => "_site" 14 | })).process 15 | end 16 | 17 | 18 | desc "Generate and publish blog to gh-pages" 19 | task :publish => [:generate] do 20 | Dir.mktmpdir do |tmp| 21 | system "mv _site/* #{tmp}" 22 | system "git checkout -B gh-pages" 23 | system "rm -rf *" 24 | system "mv #{tmp}/* ." 25 | message = "Site updated at #{Time.now.utc}" 26 | system "git add ." 27 | system "git commit -am #{message.shellescape}" 28 | system "git push origin gh-pages --force" 29 | system "git checkout master" 30 | system "echo yolo" 31 | end 32 | end 33 | 34 | task :default => :publish -------------------------------------------------------------------------------- /UploadToGithub.Rakefile: -------------------------------------------------------------------------------- 1 | require 'rubygems' 2 | require 'rake' 3 | require 'rdoc' 4 | require 'date' 5 | require 'yaml' 6 | require 'tmpdir' 7 | require 'jekyll' 8 | 9 | desc "Generate blog files" 10 | task :generate do 11 | Jekyll::Site.new(Jekyll.configuration({ 12 | "source" => ".", 13 | "destination" => "_site" 14 | })).process 15 | end 16 | 17 | 18 | desc "Generate and publish blog to gh-pages" 19 | task :publish => [:generate] do 20 | Dir.mktmpdir do |tmp| 21 | system "mv _site/* #{tmp}" 22 | system "git checkout -B gh-pages" 23 | system "rm -rf *" 24 | system "mv #{tmp}/* ." 25 | message = "Site updated at #{Time.now.utc}" 26 | system "git add ." 27 | system "git commit -am #{message.shellescape}" 28 | system "git push origin gh-pages --force" 29 | system "git checkout master" 30 | system "echo yolo" 31 | end 32 | end 33 | 34 | task :default => :publish 35 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | baseurl: /tufte-jekyll 2 | title: Tufte-Jekyll 3 | subtitle: Content-centric blogging 4 | author: clay harmon 5 | simple_search: http://google.com/search 6 | description: A Jekyll theme for content-rich sites 7 | name: tufte 8 | markdown: kramdown 9 | markdown_ext: "markdown,mkdown,mkdn,mkd,md" 10 | permalink: /articles/:short_year/:title 11 | timezone: America/New_York 12 | excerpt_separator: # you can specify your own separator, of course. 13 | exclude: ['Gemfile', 'Gemfile.lock', 'Rakefile', 'UploadToGithub.Rakefile', 'README.md'] 14 | post: 15 | template: _post.txt 16 | extension: md 17 | page: 18 | template: _page.txt 19 | extension: md 20 | editor: gvim 21 | git: 22 | branch: master 23 | transfer: 24 | command: rsync 25 | settings: -av 26 | source: _site/ 27 | destination: ~/Git/clayh53.github.com/ 28 | -------------------------------------------------------------------------------- /_data/options.yml: -------------------------------------------------------------------------------- 1 | mathjax: true 2 | lato_font_load: true -------------------------------------------------------------------------------- /_data/social.yml: -------------------------------------------------------------------------------- 1 | - link: //www.twitter.com/twitter_handle 2 | icon: icon-twitter 3 | - link: //plus.google.com/+googlePlusName 4 | icon: icon-google2 5 | - link: //github.com/GithubHandle 6 | icon: icon-github 7 | - link: //www.flickr.com/photos/FlickrUserID 8 | icon: icon-flickr3 9 | - link: /feed 10 | icon: icon-rss2 11 | - link: //vimeo.com/vimeo-id 12 | icon: icon-vimeo2 13 | - link: //www.linkedin.com/ 14 | icon: icon-linkedin 15 | -------------------------------------------------------------------------------- /_drafts/a-test-draft.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "A test draft" 3 | layout: post 4 | --- -------------------------------------------------------------------------------- /_includes/footer.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /_includes/head.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | {% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %} 7 | 8 | 9 | 10 | {% if site.data.options.lato_font_load %} 11 | 12 | {% endif %} 13 | 14 | 15 | {% if site.data.options.mathjax %} 16 | 35 | 36 | 37 | 38 | {% endif %} 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /_includes/header.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 15 |
-------------------------------------------------------------------------------- /_includes/print-footer.html: -------------------------------------------------------------------------------- 1 | {% if page.date %}{{ page.title }} - {{ page.date | date: "%B %-d, %Y" }} - {{site.author}}{% else %}{{ page.title }} - {{site.author}}{% endif %} -------------------------------------------------------------------------------- /_layouts/default.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {% include head.html %} 4 | 5 | {% include header.html %} 6 |
7 | {{ content }} 8 |
9 | {% include print-footer.html %} 10 | {% include footer.html %} 11 | 12 | 13 | -------------------------------------------------------------------------------- /_layouts/full-width.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {% include head.html %} 4 | 5 | {% include header.html %} 6 |
7 | {{ content }} 8 |
9 | {% include print-footer.html %} 10 | {% include footer.html %} 11 | 12 | 13 | -------------------------------------------------------------------------------- /_layouts/page.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 |

{{ page.title}}

5 |

{{ page.date | date: "%B %-d, %Y" }}

6 | 7 | 8 | {{ content }} 9 | -------------------------------------------------------------------------------- /_layouts/post.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 |

{{ page.title}}

5 |

{{ page.date | date: "%B %-d, %Y" }}

6 | 7 | {{ content }} 8 | 9 | -------------------------------------------------------------------------------- /_page.txt: -------------------------------------------------------------------------------- 1 | --- 2 | title: 3 | layout: page 4 | --- -------------------------------------------------------------------------------- /_plugins/epigraph.rb: -------------------------------------------------------------------------------- 1 | ## Liquid tag 'epigraph' used to add an epigraph 2 | ## in the main text area of the layout 3 | ## Usage {% epigraph 'text-body-of-epigraph' 'author-of-epigraph' 'citation-of-epigraph' %} 4 | # 5 | module Jekyll 6 | class RenderEpigraphTag < Liquid::Tag 7 | 8 | require "shellwords" 9 | 10 | def initialize(tag_name, text, tokens) 11 | super 12 | @text = text.shellsplit 13 | end 14 | 15 | def render(context) 16 | "

#{@text[0]}

"+ 17 | "
" 18 | end 19 | end 20 | end 21 | 22 | Liquid::Template.register_tag('epigraph', Jekyll::RenderEpigraphTag) 23 | -------------------------------------------------------------------------------- /_plugins/fullwidth.rb: -------------------------------------------------------------------------------- 1 | ## This has a fairly harmless hack that wraps the img tag in a div to prevent it from being 2 | ## wrapped in a paragraph tag instead, which would totally fuck things up layout-wise 3 | ## Usage {% fullwidth 'path/to/image' 'caption goes here in quotes' %} 4 | # 5 | module Jekyll 6 | class RenderFullWidthTag < Liquid::Tag 7 | 8 | require "shellwords" 9 | require "kramdown" 10 | 11 | def initialize(tag_name, text, tokens) 12 | super 13 | @text = text.shellsplit 14 | end 15 | 16 | def render(context) 17 | 18 | # Gather settings 19 | site = context.registers[:site] 20 | converter = site.find_converter_instance(::Jekyll::Converters::Markdown) 21 | 22 | baseurl = context.registers[:site].config['baseurl'] 23 | label = Kramdown::Document.new(@text[1],{remove_span_html_tags:true}).to_html # render markdown in caption 24 | label = converter.convert(label).gsub(/<\/?p[^>]*>/, "").chomp # remove

tags from render output 25 | 26 | if @text[0].start_with?('http://', 'https://','//') 27 | "

"+ 28 | "
#{label}
" 29 | else 30 | "
"+ 31 | "
#{label}
" 32 | end 33 | end 34 | end 35 | end 36 | 37 | Liquid::Template.register_tag('fullwidth', Jekyll::RenderFullWidthTag) 38 | -------------------------------------------------------------------------------- /_plugins/main_column_img.rb: -------------------------------------------------------------------------------- 1 | ## Liquid tag 'maincolumn-figure' used to add image data that fits within the 2 | ## main column area of the layout 3 | ## Usage {% maincolumn 'path/to/image' 'This is the caption' %} 4 | # 5 | module Jekyll 6 | class RenderMainColumnTag < Liquid::Tag 7 | 8 | require "shellwords" 9 | require "kramdown" 10 | 11 | def initialize(tag_name, text, tokens) 12 | super 13 | @text = text.shellsplit 14 | end 15 | 16 | def render(context) 17 | 18 | # Gather settings 19 | site = context.registers[:site] 20 | converter = site.find_converter_instance(::Jekyll::Converters::Markdown) 21 | 22 | baseurl = context.registers[:site].config['baseurl'] 23 | label = Kramdown::Document.new(@text[1],{remove_span_html_tags:true}).to_html # render markdown in caption 24 | label = converter.convert(label).gsub(/<\/?p[^>]*>/, "").chomp # remove

tags from render output 25 | 26 | if @text[0].start_with?('http://', 'https://','//') 27 | "

#{label}
" 28 | else 29 | "
#{label}
" 30 | end 31 | end 32 | end 33 | end 34 | 35 | Liquid::Template.register_tag('maincolumn', Jekyll::RenderMainColumnTag) 36 | -------------------------------------------------------------------------------- /_plugins/margin_figure.rb: -------------------------------------------------------------------------------- 1 | ## Liquid tag 'marginfigure' used to add image data that fits 2 | ## in the right margin column area of the layout 3 | ## Usage {% marginfigure 'margin-id-whatever' 'path/to/image' 'This is the caption' %} 4 | # 5 | module Jekyll 6 | class RenderMarginFigureTag < Liquid::Tag 7 | 8 | require "shellwords" 9 | 10 | def initialize(tag_name, text, tokens) 11 | super 12 | @text = text.shellsplit 13 | end 14 | 15 | def render(context) 16 | baseurl = context.registers[:site].config['baseurl'] 17 | if @text[1].start_with?('http://', 'https://', '//') 18 | ""+ 19 | ""+ 20 | "
#{@text[2]}
" 21 | else 22 | ""+ 23 | ""+ 24 | "
#{@text[2]}
" 25 | end 26 | end 27 | end 28 | end 29 | 30 | Liquid::Template.register_tag('marginfigure', Jekyll::RenderMarginFigureTag) 31 | -------------------------------------------------------------------------------- /_plugins/marginnote.rb: -------------------------------------------------------------------------------- 1 | module Jekyll 2 | class RenderMarginNoteTag < Liquid::Tag 3 | 4 | require "shellwords" 5 | 6 | def initialize(tag_name, text, tokens) 7 | super 8 | @text = text.shellsplit 9 | end 10 | 11 | def render(context) 12 | "#{@text[1]} " 13 | end 14 | end 15 | end 16 | 17 | Liquid::Template.register_tag('marginnote', Jekyll::RenderMarginNoteTag) 18 | 19 | -------------------------------------------------------------------------------- /_plugins/mathjaxtag.rb: -------------------------------------------------------------------------------- 1 | module Jekyll 2 | class MathJaxBlockTag < Liquid::Tag 3 | def render(context) 4 | '
' 15 | end 16 | end 17 | class MathJaxEndInlineTag < Liquid::Tag 18 | def render(context) 19 | '' 20 | end 21 | end 22 | end 23 | 24 | Liquid::Template.register_tag('math', Jekyll::MathJaxBlockTag) 25 | Liquid::Template.register_tag('m', Jekyll::MathJaxInlineTag) 26 | Liquid::Template.register_tag('endmath', Jekyll::MathJaxEndBlockTag) 27 | Liquid::Template.register_tag('em', Jekyll::MathJaxEndInlineTag) -------------------------------------------------------------------------------- /_plugins/newthought.rb: -------------------------------------------------------------------------------- 1 | ## Newthought tag will render anything in the tag with small caps 2 | ## Usage {% newthought Your text string here} will render a span 3 | ## YOUR TEXT STRING HERE (sort of, you know, small caps) if you are using the tufte.css file 4 | 5 | module Jekyll 6 | class RenderNewThoughtTag < Liquid::Tag 7 | 8 | require "shellwords" 9 | 10 | def initialize(tag_name, text, tokens) 11 | super 12 | @text = text.shellsplit 13 | end 14 | 15 | 16 | def render(context) 17 | "#{@text[0]} " 18 | end 19 | end 20 | end 21 | 22 | Liquid::Template.register_tag('newthought', Jekyll::RenderNewThoughtTag) -------------------------------------------------------------------------------- /_plugins/sidenote.rb: -------------------------------------------------------------------------------- 1 | module Jekyll 2 | class RenderSideNoteTag < Liquid::Tag 3 | 4 | require "shellwords" 5 | 6 | def initialize(tag_name, text, tokens) 7 | super 8 | @text = text.shellsplit 9 | end 10 | 11 | def render(context) 12 | "#{@text[1]} " 13 | end 14 | end 15 | end 16 | 17 | Liquid::Template.register_tag('sidenote', Jekyll::RenderSideNoteTag) 18 | 19 | -------------------------------------------------------------------------------- /_post.txt: -------------------------------------------------------------------------------- 1 | --- 2 | title: 3 | layout: post 4 | --- -------------------------------------------------------------------------------- /_posts/2020-04-13-Edge-Cases.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: post 3 | title: "Edge Cases" 4 | date: 2020-04-13 17:04:01 5 | categories: post 6 | --- 7 | Some edge cases and cautionary examples on using Markdown for writing content using this theme. In particular, list syntax can really knot things up. 8 | 9 | 10 | ### Mathjax improperly parsing greater and less than and ampersands inside blocks 11 | 12 | The mathjax HTML `````` scripts have been modified to properly render block style mathjax expressions inside a ```$$ ... $$``` set of character pairs, 13 | using the standard Kramdown parser. Some examples sent to me by Quxiaofeng are now parsing correctly, I believe. 14 | 15 | This code: 16 | 17 | ```latex 18 | $$ 19 | D = \left(\begin{matrix} 20 | 1 & -1 & & & & \\ 21 | & & \cdots & & \\ 22 | & & & 1 & -1 23 | \end{matrix} 24 | \right) 25 | $$ 26 | ``` 27 | yields this: 28 | 29 | $$ 30 | D = \left(\begin{matrix} 31 | 1 & -1 & & & & \\ 32 | & & \cdots & & \\ 33 | & & & 1 & -1 34 | \end{matrix} 35 | \right) 36 | $$ 37 | 38 | Other examples from the [wikia Tex reference](http://latex.wikia.com/wiki/Matrix_environments): 39 | 40 | $$ 41 | \begin{matrix} 42 | \alpha& \beta^{*}\\ 43 | \gamma^{*}& \delta 44 | \end{matrix} 45 | $$ 46 | 47 | 48 | $$ 49 | \begin{bmatrix} 50 | \alpha& \beta^{*}\\ 51 | \gamma^{*}& \delta 52 | \end{bmatrix} 53 | $$ 54 | 55 | $$ 56 | \begin{Bmatrix} 57 | \alpha& \beta^{*}\\ 58 | \gamma^{*}& \delta 59 | \end{Bmatrix} 60 | $$ 61 | 62 | $$ 63 | \begin{vmatrix} 64 | \alpha& \beta^{*}\\ 65 | \gamma^{*}& \delta 66 | \end{vmatrix} 67 | $$ 68 | 69 | $$ 70 | \begin{Vmatrix} 71 | \alpha& \beta^{*}\\ 72 | \gamma^{*}& \delta 73 | \end{Vmatrix} 74 | $$ 75 | 76 | $$ 77 | \begin{Vmatrix} 78 | \alpha& \beta^{*}\\ 79 | \gamma^{*}& \delta 80 | \end{Vmatrix} 81 | $$ 82 | 83 | However, a problem still exists for inline matrix notation, from an example [here](https://en.wikibooks.org/wiki/LaTeX/Mathematics#Matrices_in_running_text): 84 | 85 | A matrix in text must be set smaller: $$ \bigl(\begin{smallmatrix}a & b \\ c & d\end{smallmatrix} \bigr) $$ to not increase leading in a portion of text. The way this inline matrix is written is: ```$$ \bigl(\begin{smallmatrix}a & b \\ c & d\end{smallmatrix} \bigr) $$``` 86 | 87 | ## Edge Case 1 from Quxiaofeng: 88 | 89 | ### No blank lines between Markdown list items 90 | 91 | The issue arises when sidenotes and marginnotes are put into list items. As mentioned in the main documentation page, lists can be problematic not only for semantic clarity, but also because they can creating formatting issues. For example: 92 | 93 | ### Related algorithms 94 | 95 | + Split Bregman iteration {% sidenote 1 'Goldstein, T. and Osher, S. (2009). The split Bregman method for l1-regularized problems. SIAM J. Img. Sci., 2:323-343.' %} 96 | + Dykstra's alternating projection algorithm {% sidenote 2 'Dykstra, R. L. (1983). An algorithm for restricted least squares regression. J. Amer. Statist. Assoc., 78(384):837-842.' %} 97 | + Proximal point algorithm applied to the dual 98 | + Numerous applications in statistics and machine learning: lasso, gen. lasso, graphical lasso, (overlapping) group lasso, ... 99 | + Embraces distributed computing for big data {% sidenote 3 'Boyd, S., Parikh, N., Chu, E., Peleato, B., and Eckstein, J. (2011). Distributed optimization and statistical learning via the alternating direction method of multipliers. Found. Trends Mach. learn., 3(1):1-122.' %} 100 | 101 | ### Why this matters 102 | 103 | Notice how the sidenotes display properly, but the fact that sidenotes have more display 'volume' than the list items themselves causes a horizontal mismatch between the sidenote item's number and its corresponding list item. 104 | 105 | Please note that there must be *no blank lines between your list items*. This is due to a really strange thing about the Jekyll Markdown engine I have never noticed before. If you have a list, and you put a blank line between the items like this: 106 | 107 | ``` 108 | + list item 1 109 | 110 | + list item 2 111 | ``` 112 | 113 | It will create an html tag structure like this: 114 | 115 | ``` 116 | 124 | ``` 125 | Which *totally* goofs up the layout CSS. 126 | 127 | However, if your Markdown is this: 128 | 129 | ``` 130 | + list item 1 131 | + list item 2 132 | ``` 133 | 134 | It will create a tag structure like this: 135 | 136 | ``` 137 | 141 | ``` 142 | 143 | Here is the same content as above, with a blank line separating the list items. Notice how the sidenotes get squashed into the main content area: 144 | 145 | 146 | ### Remarks on ADMM version 2 - **one blank line** between Markdown list items 147 | 148 | Related algorithms 149 | 150 | + Split Bregman iteration {% sidenote 1 'Goldstein, T. and Osher, S. (2009). The split Bregman method for l1-regularized problems. SIAM J. Img. Sci., 2:323-343.' %} 151 | 152 | + Dykstra's alternating projection algorithm {% sidenote 2 'Dykstra, R. L. (1983). An algorithm for restricted least squares regression. J. Amer. Statist. Assoc., 78(384):837-842.' %} 153 | 154 | + Proximal point algorithm applied to the dual 155 | 156 | + Numerous applications in statistics and machine learning: lasso, gen. lasso, graphical lasso, (overlapping) group lasso, ... 157 |
158 |
159 |
160 |
161 | 162 | ### Liquid tag parsing strangeness 163 | 164 | Example of the proper way to write an url inside a *Liquid* full-width image tag. 165 | 166 | This code: ```{{ '{% fullwidth "assets/img/rhino.png" "Tuftes pet rhino (via Edward Tufte)" ' }} %}``` 167 | 168 | produces the following image with a title. Notice that I have had to escape the double quotes in the HTML with a backslash. Also, the example above leaves out the single quote in 'Tufte's" because of the topsy-turvy way that you have to escape the escapes in code sections that are used for illustrative purposes in this text. Bottom line is that there are occasionally some odd interactions between the Markdown parser, custom *Liquid* tags and HTML. 169 | {% fullwidth "assets/img/rhino.png" "Tufte's pet rhino (via Edward Tufte)" %} 170 | -------------------------------------------------------------------------------- /_posts/2020-04-13-tufte-style-jekyll-blog.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: post 3 | title: "Tufte-style Jekyll blog" 4 | date: 2020-04-13 09:46:04 5 | categories: jekyll css 6 | --- 7 | 8 | {% newthought 'The Tufte Jekyll theme' %} is an attempt to create a website design with the look and feel of Edward Tufte's books and handouts. Tufte’s style is known for its extensive use of sidenotes, tight integration of graphics with text, and well-set typography. The idea for this project is essentially cribbed wholesale from Tufte and R Markdown's Tufte Handout format{% sidenote 'One' 'See [tufte-latex.github.io/tufte-latex/](https://tufte-latex.github.io/tufte-latex/) and [rmarkdown.rstudio.com/tufte_handout_format](http://rmarkdown.rstudio.com/tufte_handout_format.html)' %} This page is an adaptation of the [Tufte Handout PDF](http://rmarkdown.rstudio.com/examples/tufte-handout.pdf). 9 | 10 | ## Jekyll customizations 11 | 12 | This Jekyll blog theme is based on the github repository by Edward Tufte [here](https://github.com/edwardtufte/tufte-css), which was orginally created by Dave Leipmann, but is now labeled under Edward Tufte's moniker. I borrowed freely from the Tufte-CSS repo and have transformed many of the typographic and page-structural features into a set of custom Liquid tags that make creating content using this style much easier than writing straight HTML. Essentially, if you know markdown, and mix in a few custom Liquid tags, you can be creating a website with this document style in short order. 13 | 14 | The remainder of this sample post is a self-documenting survey of the features of the Tufte-Jekyll theme. I have taken almost all of the sample content from the [Tufte-css](https://github.com/edwardtufte/tufte-css) repo and embedded it here to illustrate the parity in appearence between the two. The additional verbiage and commentary I have added is to document the custom *Liquid* markup tags and other features that are bundled with this theme. 15 | 16 | ### The SASS settings file 17 | 18 | I have taken much of the actual *Tufte-css* files and modified them as necessary to accomodate the needs inherent in creating a Jekyll theme that has additional writing aids such as the Liquid tags. I have also turned the CSS file into a [SASS](http://sass-lang.com) file (the .scss type). This means that you can alter things like font choices, text color, background color, and underlining style by changing values in this file. When the Jekyll site is built using ```jekyll build``` the settings in this file will be compiled into the customized CSS file that the site uses. If you don't use SCSS or SASS, you are missing out on a huge productivity tool. 19 | 20 | This file looks like this: 21 | 22 | ``` 23 | /* This file contains all the constants for colors and font styles */ 24 | 25 | $body-font: ETBembo, Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua", Georgia, serif; 26 | // Note that Gill Sans is the top of the stack and corresponds to what is used in Tufte's books 27 | // However, it is not a free font, so if it is not present on the computer that is viewing the webpage 28 | // The free Google 'Lato' font is used instead. It is similar. 29 | $sans-font: "Gill Sans", "Gill Sans MT", "Lato", Calibri, sans-serif; 30 | $code-font: Consolas, "Liberation Mono", Menlo, Courier, monospace; 31 | $url-font: "Lucida Console", "Lucida Sans Typewriter", Monaco, "Bitstream Vera Sans Mono", monospace; 32 | $text-color: #111; 33 | $bg-color: #fffff8; 34 | $contrast-color: #a00000; 35 | $border-color: #333333; 36 | $link-style: color; // choices are 'color' or 'underline'. Default is color using $contrast-color set above 37 | ``` 38 | Any of these values can be changed in the ```_sass/_settings.scss``` file before the site is built. The default values are the ones from *tufte-css*. 39 | 40 | ## Fundamentals 41 | 42 | ### Color 43 | 44 | Although paper handouts obviously have a pure white background, the web is better served by the use of slightly off-white and off-black colors. I picked ```#fffff8``` and ```#111111``` because they are nearly indistinguishable from their 'pure' cousins, but dial down the harsh contrast. Tufte's books are a study in spare, minimalist design. In his book [The Visual Display of Quantitative Information](http://www.edwardtufte.com/tufte/books_vdqi), he uses a red ink to add some visual punctuation to the buff colored paper and dark ink. In that spirit, links are styled using a similar red color. 45 | 46 | ### Headings 47 | 48 | Tufte CSS uses ```

``` for the document title, ```

``` with class ```code``` for the document subtitle, ```

``` for section headings, and ```

``` for low-level headings. More specific headings are not encouraged. If you feel the urge to reach for a heading of level 4 or greater, consider redesigning your document: 49 | 50 | 51 | > [It is] notable that the Feynman lectures (3 volumes) write about all of physics in 1800 pages, using only 2 levels of hierarchical headings: chapters and A-level heads in the text. It also uses the methodology of *sentences* which then cumulate sequentially into *paragraphs*, rather than the grunts of bullet points. Undergraduate Caltech physics is very complicated material, but it didn’t require an elaborate hierarchy to organize. 52 | 53 | [http://www.edwardtufte.com/bboard/q-and-a-fetch-msg?msg_id=0000hB](http://www.edwardtufte.com/bboard/q-and-a-fetch-msg?msg_id=0000hB) 54 | 55 | 56 | As a bonus, this excerpt regarding the use of headings provides an example of using block quotes. Markdown does not have a native `````` shorthand, but real html can be sprinkled in with the Markdown text. In the previous example, the `````` was preceded with a single return after the quotation itself. The previous blockquote was written in Markdown thusly: 57 | 58 | ```Liquid 59 | [It is] notable that the Feynman lectures (3 volumes) write about all of physics in 1800 pages, using only 2 levels of hierarchical headings: chapters and A-level heads in the text. It also uses the methodology of *sentences* which then cumulate sequentially into *paragraphs*, rather than the grunts of bullet points. Undergraduate Caltech physics is very complicated material, but it didn’t require an elaborate hierarchy to organize. 60 | [http://www.edwardtufte.com/bboard/q-and-a-fetch-msg?msg_id=0000hB](http://www.edwardtufte.com/bboard/q-and-a-fetch-msg?msg_id=0000hB) 61 | ``` 62 | 63 | 64 | 65 | {% newthought 'In his later books' %}{% sidenote 'two' '[http://www.edwardtufte.com/tufte/books_be](http://www.edwardtufte.com/tufte/books_be)'%}, Tufte starts each section with a bit of vertical space, a non-indented paragraph, and sets the first few words of the sentence in small caps. To accomplish this using this style, enclose the sentence fragment you want styled with small caps in a custom Liquid tag called 'newthought' like so: 66 | 67 | ```Liquid 68 | {{ "{% newthought 'In his later books'" }} %} 69 | ``` 70 | 71 | ### Text 72 | 73 | In print, Tufte uses the proprietary Monotype Bembo{% sidenote 3 'See Tufte’s comment in the [Tufte book fonts](http://www.edwardtufte.com/bboard/q-and-a-fetch-msg?msg_id=0000Vt) thread.' %} font. A similar effect is achieved in digital formats with the now open-source ETBembo, which Tufte-Jekyll supplies with a ```@font-face``` reference to a .ttf file. Thanks to [Linjie Ding](https://github.com/daveliepmann/tufte-css/commit/0a810a7d5f4707941c6f9fe99a53ec41f50a5c00), italicized text uses the ETBembo Italic font instead of mechanically skewing the characters. In case ETBembo somehow doesn’t work, Tufte CSS degrades gracefully to other serif fonts like Palatino and Georgia. Notice that Tufte CSS includes separate font files for **bold** (strong) and *italic* (emphasis), instead of relying on the browser to mechanically transform the text. This is typographic best practice. It’s also really important. Thus concludes my unnecessary use of em and strong for the purpose of example. 74 | 75 | Code snippets ape GitHub's font selection using Microsoft's [*Consolas*](http://www.microsoft.com/typography/ClearTypeFonts.mspx) and the sans-serif font uses Tufte's choice of Gill Sans. Since this is not a free font, and some systems will not have it installed, the free google font [*Lato*](https://www.google.com/fonts/specimen/Lato) is designated as a fallback. 76 | 77 | 78 | 79 |

Epigraphs

80 | 81 | {% epigraph 'The English language . . . becomes ugly and inaccurate because our thoughts are foolish, but the slovenliness of our language makes it easier for us to have foolish thoughts.' 'George Orwell' ' "Politics and the English Language" ' %} 82 | 83 | {% epigraph 'For a successful technology, reality must take precedence over public relations, for Nature cannot be fooled.' 'Richard P. Feynman' ' “What Do You Care What Other People Think?” ' %} 84 | 85 | 86 | 87 | If you’d like to introduce your page or a section of your page with some quotes, use epigraphs. The two examples above show how they are styled. Epigraph elements are modeled after chapter epigraphs in Tufte’s books (particularly *Beautiful Evidence*). The [Tufte-css](https://github.com/edwardtufte/tufte-css) gitub repository has detailed instructions on how to achieve this using HTML elements. As an easier alternative, the *Tufte-jekyll* theme uses custom *Liquid tag* pairs that allow the writer to embed elements such as epigraphs in the middle of the regular Markdown text being edited. 88 | 89 | In order to use an epigraph in a page or section, type this: 90 | 91 | ```{{ "{% epigraph 'text of citation' 'author of citation' 'citation source' "}} %}``` 92 | 93 | to produce this: 94 | 95 | {% epigraph 'I do not paint things, I paint only the differences between things.' 'Henri Matisse' 'Henri Matisse Dessins: thèmes et variations, 1943' %} 96 | 97 | {% epigraph ' "How did you go bankrupt?" Two ways. Gradually, then suddenly.' 'Ernest Hemingway' ' "The Sun Also Rises" '%} 98 | 99 | ### Lists 100 | 101 | Tufte points out that while lists have valid uses, they tend to promote ineffective writing habits due to their “lack of syntactic and intellectual discipline”. He is particularly critical of hierarchical and bullet-pointed lists. So before reaching for an HTML list element, ask yourself: 102 | 103 | * Does this list actually have to be represented using an HTML ul or ol element? 104 | * Would my idea be better expressed as sentences in paragraphs? 105 | * Is my message causally complex enough to warrant a flow diagram instead? 106 | 107 | This is but a small subset of a proper overview of the topic of lists in communication. A better way to understand Tufte’s thoughts on lists would be to read “The Cognitive Style of PowerPoint: Pitching Out Corrupts Within,” a chapter in Tufte’s book *Beautiful Evidence*, excerpted at some length by Tufte himself [on his website](http://www.edwardtufte.com/bboard/q-and-a-fetch-msg?msg_id=0002QF). The whole piece is information-dense and therefore difficult to summarize. He speaks to web design specifically, but in terms of examples and principles rather than as a set of simple do-this, don’t-do-that prescriptions. It is well worth reading in full for that reason alone. 108 | 109 | For these reasons, Tufte CSS encourages caution before reaching for a list element, and by default removes the bullet points from unordered lists. 110 | 111 | ## Figures 112 | 113 | ### Margin Figures 114 | 115 | {% marginfigure 'mf-id-1' 'assets/img/rhino.png' 'F.J. Cole, “The History of Albrecht Dürer’s Rhinoceros in Zoological Literature,” *Science, Medicine, and History: Essays on the Evolution of Scientific Thought and Medical Practice* (London, 1953), ed. E. Ashworth Underwood, 337-356. From page 71 of Edward Tufte’s *Visual Explanations*.' %} 116 | 117 | Images and graphics play an integral role in Tufte’s work. To place figures in the margin, use the custom margin figure liquid tag included in the ```_plugins``` directory like so: 118 | 119 | ```{{ "{% marginfigure 'mf-id-whatever' 'assets/img/rhino.png' 'F.J. Cole, “The History of Albrecht Dürer’s Rhinoceros in Zoological Literature,” *Science, Medicine, and History: Essays on the Evolution of Scientific Thought and Medical Practice* (London, 1953), ed. E. Ashworth Underwood, 337-356. From page 71 of Edward Tufte’s *Visual Explanations*.' "}} %}```. 120 | 121 | Note that this tag has *three* parameters. The first is an arbitrary id. This parameter can be named anything as long as it is unique to this post. The second parameter is the path to the image. And the final parameter is whatever caption you want to be displayed with the figure. All parameters *must* be enclosed in quotes for this simple liquid tag to work! 122 | 123 | In this example, the *Liquid* marginfigure tag was inserted *before* the paragraph so that it aligns with the beginning of the paragraph. On small screens, the image will collapse into a small symbol: at the location it has been inserted in the manuscript. Clicking on it will open the image. 124 | 125 | ### Full Width Figures 126 | 127 | If you need a full-width image or figure, another custom liquid tag is available to use. Oddly enough, it is named 'fullwidth', and this markup: 128 | 129 | ```{{ "{% fullwidth 'assets/img/napoleons-march.png' 'Napoleon's March *(Edward Tufte’s English translation)*' "}} %}``` 130 | 131 | Yields this: 132 | 133 | {% fullwidth 'assets/img/napoleons-march.png' "Napoleon's March *(Edward Tufte’s English translation)*" %} 134 | 135 | 136 | ### Main Column Figures 137 | 138 | Besides margin and full width figures, you can of course also include figures constrained to the main column. Yes, you guessed it, a custom liquid tag rides to the rescue once again: 139 | 140 | ```{{ "{% maincolumn 'assets/img/export-imports.png' 'From Edward Tufte, *Visual Display of Quantitative Information*, page 92' "}} %}``` 141 | 142 | yields this: 143 | 144 | {% maincolumn "assets/img/exports-imports.png" "From Edward Tufte, *Visual Display of Quantitative Information*, page 92" %} 145 | 146 | ## Sidenotes and Margin notes 147 | 148 | One of the most prominent and distinctive features of Tufte's style is the extensive use of sidenotes and margin notes. Perhaps you have noticed their use in this document already. You are very astute. 149 | 150 | There is a wide margin to provide ample room for sidenotes and small figures. There exists a slight semantic distinction between *sidenotes* and *marginnotes*. 151 | 152 | ### Sidenotes 153 | 154 | Sidenotes{% sidenote 'sn-id-whatever' 'This is a sidenote and *displays a superscript*'%} display a superscript. The *sidenote* Liquid tag contains two components. The first is an identifier allowing the sidenote to be targeted by the twitchy index fingers of mobile device users so that all the yummy sidenote goodness is revealed when the superscript is tapped. The second components is the actual content of the sidenote. Both of these components should be enclosed in single quotes. Note that we are using the CSS 'counter' trick to automagically keep track of the number sequence on each page or post. On small screens, the sidenotes disappear and when the superscript is clicked, a side note will open below the content, which can then be closed with a similar click. Here is the markup for the sidenote at the beginning of this paragraph: 155 | 156 | ```{{ "{% sidenote 'sn-id-whatever' 'This is a sidenote and *displays a superscript*'" }}%}``` 157 | 158 | ### Margin notes 159 | 160 | Margin notes{% marginnote 'mn-id-whatever' 'This is a margin note *without* a superscript' %} are similar to sidenotes, but do not display a superscript. The *marginnnote* Liquid tags has the same two components as the *sidenote* tag. Anything can be placed in a margin note. Well, anything that is an inline element. Block level elements can make the Kramdown parser do strange things. On small screens, the margin notes disappear and this symbol: pops up. When clicked, it will open the margin note below the content, which can then be closed with a similar click. The Markdown content has a similar sort of markup as a sidenote, but without a number involved: 161 | 162 | ```{{ "{% marginnote 'mn-id-whatever' 'This is a margin note *without* a superscript'" }} %}``` 163 | 164 | ## Equations 165 | 166 | The Markdown parser being used by this Jekyll theme is Kramdown, which contains some built-in [Mathjax](//www.mathjax.org) support. Both inline and block-level mathematical figures can be added to the content. 167 | 168 | For instance, the following inline sequence: 169 | 170 | *When $$ a \ne 0 $$, there are two solutions to $$ ax^2 + bx + c = 0 $$* 171 | 172 | is written by enclosing a Mathjax expression within *a matching pair of double dollar signs: ```$$```*: 173 | 174 | ```When $$ a \ne 0 $$, there are two solutions to $$ ax^2 + bx + c = 0 $$``` 175 | 176 | Similarly, this block-level Mathjax expression: 177 | 178 | $$ x = {-b \pm \sqrt{b^2-4ac} \over 2a} $$ 179 | 180 | is written by enclosing the expression within a pair of ```$$``` with an empty line above and below: 181 | 182 | ```$$ x = {-b \pm \sqrt{b^2-4ac} \over 2a} $$``` 183 | 184 | 185 | You can get pretty fancy, for instance, the wave equation's nabla is no big thing: 186 | 187 | $$ \frac{\partial^2 y}{\partial t^2}= c^2\nabla^2u $$ 188 | 189 | 190 | All of the standard LaTeX equation markup is available to use inside these block tags. 191 | 192 | Please note that the block-level Mathjax expressions *must* be on their own line, separated from content above and below the block by a blank line for the Kramdown parser and the Mathjax javascript to play nicely with one another. 193 | 194 | The Mathjax integration is tricky, and some things such as the inline matrix notation simply do not work well unless allowances are made for using the notation for a small matrix. Bottom line: If you are using this to document mathematics, be super careful to isolate your LaTeX blocks by blank lines! 195 | 196 | ## Tables 197 | 198 | Tables are, frankly, a pain in the ass to create. That said, they often are one of the best methods for presenting data. Tabular data are normally presented with right-aligned numbers, left-aligned text, and minimal grid lines. 199 | 200 | Note that when writing Jekyll Markdown content, there will often be a need to get some dirt under your fingernails and stoop to writing a little honest-to-god html. Yes, all that hideous ```....
``` nonsense. *And* you must wrap the unholy mess in a ```
``` tag to ensure that the table stays centered in the main content column. 201 | 202 | Tables are designed with an ```overflow:scroll``` property to create slider bars when the viewport is narrow. This is so that you do not collapse all your beautiful data into a jumble of letters and numbers when you view it on your smartphone. 203 | 204 | {% marginnote 'table-1-id' '*Table 1*: A table with default style formatting' %} 205 |
206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 |
Content and tone of front-page articles in 94 U.S. newspapers, October and November, 1974Number of articlesPercent of articles with negative criticism of specific person or policy
Watergate: defendants and prosecutors, Ford’s pardon of Nixon
537
49%
Inflation, high cost of living
415
28%
Government competence: costs, quality, salaries of public employees
322
30%
Confidence in government: power of special interests, trust in political leaders, dishonesty in politics
266
52%
Government power: regulation of business, secrecy, control of CIA and FBI
154
42%
Crime
123
30%
Race
103
25%
Unemployment
100
13%
Shortages: energy, food
68
16%
261 |
262 | 263 | 264 | This is not the One True Table. Such a style does not exist. One must craft each data table with custom care to the narrative one is telling with that specific data. So take this not as “the table style to use”, but rather as “a table style to start from”. From here, use principles to guide you: avoid chartjunk, optimize the data-ink ratio (“within reason”, as Tufte says), and “mobilize every graphical element, perhaps several times over, to show the data.{% sidenote 'table-id' 'Page 139, *The Visual Display of Quantitative Information*, Edward Tufte 2001.'%} Furthermore, one must know when to reach for more complex data presentation tools, like a custom graphic or a JavaScript charting library. 265 | 266 | As an example of alternative table styles, academic publications written in LaTeX often rely on the ```booktabs``` package to produce clean, clear tables. Similar results can be achieved in Tufte CSS with the ```booktabs``` class, as demonstrated in this table: 267 | 268 | {% marginnote 'table-2-id' '*Table 2*: A table with booktabs style formatting' %} 269 |
270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 |
Items
AnimalDescriptionPrice ($)
Gnat per gram13.65
each 0.01
Gnu stuffed 92.50
Emu stuffed 33.33
Armadillofrozen 8.99
283 |
284 | 285 | The table above was written in HTML as follows: 286 | 287 | ``` 288 |
289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 |
Items
AnimalDescriptionPrice ($)
Gnat per gram13.65
each 0.01
Gnu stuffed 92.50
Emu stuffed 33.33
Armadillofrozen 8.99
302 |
303 | ``` 304 | 305 | 306 | {% newthought 'I like this style of table,' %} so I have made it the default for unstyled tables. This allows use of the [*Markdown Extra*](https://michelf.ca/projects/php-markdown/extra/) features built into the [*Kramdown*](http://kramdown.gettalong.org/parser/kramdown.html) parser. Here is a table created using the Markdown Extra table syntax to make a nice table which has the side benefit of being human readable in the raw Markdown file: 307 | 308 | {% marginnote 'tableID-3' 'Table 3: a table created with *Markdown Extra* markup using only the default table styling' %} 309 | 310 | | |mpg | cyl | disp | hp | drat | wt | 311 | |:----------------|----:|-----:|-------:|-------:|-------:|----:| 312 | |Mazda RX4 |21 |6 |160 |110 |3.90 |2.62 | 313 | |Mazda RX4 Wag |21 |6 |160 |110 |3.90 |2.88 | 314 | |Datsun 710 |22.8 |4 |108 |93 |3.85 |2.32 | 315 | |Hornet 4 Drive |21.4 |6 |258 |110 |3.08 |3.21 | 316 | |Hornet Sportabout|18.7 |8 |360 |175 |3.15 |3.44 | 317 | |Valiant |18.1 |6 |160 |105 |2.76 |3.46 | 318 | 319 | 320 | Using the following Markdown formatting: 321 | 322 | ``` 323 | | |mpg | cyl | disp | hp | drat | wt | 324 | |:----------------|----:|-----:|-------:|-------:|-------:|----:| 325 | |Mazda RX4 |21 |6 |160 |110 |3.90 |2.62 | 326 | |Mazda RX4 Wag |21 |6 |160 |110 |3.90 |2.88 | 327 | |Datsun 710 |22.8 |4 |108 |93 |3.85 |2.32 | 328 | etc... 329 | ``` 330 | 331 | The following is a more simple table, showing the Markdown-style table markup. Remember to label the table with a *marginnote* Liquid tag, and you *must* separate the label from the table with a single blank line. This markup: 332 | 333 | ``` 334 | {{ "{% marginnote 'Table-ID4' 'Table 4: a simple table showing left, center, and right alignment of table headings and data' "}} %} 335 | 336 | |**Left** |**Center**|**Right**| 337 | |:--------|:--------:|--------:| 338 | Aardvarks| 1|$3.50 339 | Cat| 5 |$4.23 340 | Dogs |3 |$5.29 341 | ``` 342 | 343 | Yields this table: 344 | 345 | {% marginnote 'Table-ID4' 'Table 4: a simple table showing left, center, and right alignment of table headings and data' %} 346 | 347 | |**Left** |**Center**|**Right**| 348 | |:--------|:--------:|--------:| 349 | Aardvarks| 1|$3.50 350 | Cat| 5 |$4.23 351 | Dogs |3 |$5.29 352 | 353 | 354 | ## Code 355 | 356 | Code samples use a monospace font using the 'code' class. The Kramdown parser has the 'GFM' option enabled, which stands for 'Github Flavored Markdown', and this means that both inline code such as ```#include ``` and blocks of code can be delimited by surrounding them with 3 backticks: 357 | 358 | ``` 359 | (map tufte-style all-the-things) 360 | ``` 361 | is created by the following markup: 362 |
```(map tufte-style all-the-things)```
363 | 364 | To get the code highlighted in the language of your choice like so: 365 | 366 | 367 | ``` ruby 368 | module Jekyll 369 | class RenderFullWidthTag < Liquid::Tag 370 | require "shellwords" 371 | 372 | def initialize(tag_name, text, tokens) 373 | super 374 | @text = text.shellsplit 375 | end 376 | 377 | def render(context) 378 | "
" + 379 | "

#{@text[1]}

" 380 | end 381 | end 382 | end 383 | 384 | Liquid::Template.register_tag('fullwidth', Jekyll::RenderFullWidthTag) 385 | ``` 386 | 387 | Enclose the code block in three backticks, followed by a space and then the language name, like this: 388 | 389 |
 ``` ruby
390 |     module Jekyll
391 |     blah, blah...
392 |    ``` 
393 | 394 | 395 | -------------------------------------------------------------------------------- /_sass/_fonts.scss: -------------------------------------------------------------------------------- 1 | // Font imports file. If you don't want these fonts, comment out these and add your own into the fonts directory 2 | // and point the src attribute to the file. 3 | // 4 | 5 | @charset "UTF-8"; 6 | 7 | @font-face { 8 | font-family: ETbook; 9 | src: url("../fonts/et-book/et-book-roman-line-figures/et-book-roman-line-figures.eot"); 10 | src: url("../fonts/et-book/et-book-roman-line-figures/et-book-roman-line-figures.eot?#iefix") format("embedded-opentype"), url("../fonts/et-book/et-book-roman-line-figures/et-book-roman-line-figures.woff") format("woff"), url("../fonts/et-book/et-book-roman-line-figures/et-book-roman-line-figures.ttf") format("truetype"), url("../fonts/et-book/et-book-roman-line-figures/et-book-roman-line-figures.svg#etbemboromanosf") format("svg"); 11 | font-weight: normal; 12 | font-style: normal 13 | } 14 | 15 | @font-face { 16 | font-family: ETbook; 17 | src: url("../fonts/et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.eot"); 18 | src: url("../fonts/et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.eot?#iefix") format("embedded-opentype"), url("../fonts/et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.woff") format("woff"), url("../fonts/et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.ttf") format("truetype"), url("../fonts/et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.svg#etbemboromanosf") format("svg"); 19 | font-weight: normal; 20 | font-style: italic 21 | } 22 | 23 | @font-face { 24 | font-family: ETbook; 25 | src: url("../fonts/et-book/et-book-bold-line-figures/et-book-bold-line-figures.eot"); 26 | src: url("../fonts/et-book/et-book-bold-line-figures/et-book-bold-line-figures.eot?#iefix") format("embedded-opentype"), url("../fonts/et-book/et-book-bold-line-figures/et-book-bold-line-figures.woff") format("woff"), url("../fonts/et-book/et-book-bold-line-figures/et-book-bold-line-figures.ttf") format("truetype"), url("../fonts/et-book/et-book-bold-line-figures/et-book-bold-line-figures.svg#etbemboromanosf") format("svg"); 27 | font-weight: bold; 28 | font-style: normal 29 | } 30 | 31 | @font-face { 32 | font-family: ETbookRomanOldStyle; 33 | src: url("../fonts/et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.eot"); 34 | src: url("../fonts/et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.eot?#iefix") format("embedded-opentype"), url("../fonts/et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.woff") format("woff"), url("../fonts/et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.ttf") format("truetype"), url("../fonts/et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.svg#etbemboromanosf") format("svg"); 35 | font-weight: normal; 36 | font-style: normal; 37 | } -------------------------------------------------------------------------------- /_sass/_settings.scss: -------------------------------------------------------------------------------- 1 | /* This file contains all the constants for colors and font styles */ 2 | 3 | $body-font: ETBembo, "Chronicle Text G2", Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua", Georgia, serif; 4 | // Note that Gill Sans is the top of the stack and corresponds to what is used in Tufte's books 5 | // However, it is not a free font, so if it is not present on the computer that is viewing the webpage 6 | // The free Google 'Lato' font is used instead. It is similar. 7 | $sans-font: "Gill Sans", "Gill Sans MT", "Gotham Narrow", "Lato", Calibri, sans-serif; 8 | $code-font: Consolas, "Liberation Mono", Menlo, Courier, monospace; 9 | $url-font: "Lucida Console", "Lucida Sans Typewriter", Monaco, "Bitstream Vera Sans Mono", monospace; 10 | $text-color: #111; 11 | $bg-color: #fffff8; 12 | $contrast-color: #a00000; 13 | $border-color: #333333; 14 | $link-style: underline; // choices are 'color' or 'underline'. Color option styles links with $contrast-color set above 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /_sass/_syntax-highlighting.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Syntax highlighting styles 3 | */ 4 | $spacing-unit: 30px; 5 | %vertical-rhythm { 6 | margin-bottom: $spacing-unit / 2; 7 | } 8 | 9 | .highlight { 10 | background: #fffff8; 11 | @extend %vertical-rhythm; 12 | 13 | .c { color: #998; font-style: italic } // Comment 14 | .err { color: #a61717; background-color: #e3d2d2 } // Error 15 | .k { font-weight: bold } // Keyword 16 | .o { font-weight: bold } // Operator 17 | .cm { color: #998; font-style: italic } // Comment.Multiline 18 | .cp { color: #999; font-weight: bold } // Comment.Preproc 19 | .c1 { color: #998; font-style: italic } // Comment.Single 20 | .cs { color: #999; font-weight: bold; font-style: italic } // Comment.Special 21 | .gd { color: #000; background-color: #fdd } // Generic.Deleted 22 | .gd .x { color: #000; background-color: #faa } // Generic.Deleted.Specific 23 | .ge { font-style: italic } // Generic.Emph 24 | .gr { color: #a00 } // Generic.Error 25 | .gh { color: #999 } // Generic.Heading 26 | .gi { color: #000; background-color: #dfd } // Generic.Inserted 27 | .gi .x { color: #000; background-color: #afa } // Generic.Inserted.Specific 28 | .go { color: #888 } // Generic.Output 29 | .gp { color: #555 } // Generic.Prompt 30 | .gs { font-weight: bold } // Generic.Strong 31 | .gu { color: #aaa } // Generic.Subheading 32 | .gt { color: #a00 } // Generic.Traceback 33 | .kc { font-weight: bold } // Keyword.Constant 34 | .kd { font-weight: bold } // Keyword.Declaration 35 | .kp { font-weight: bold } // Keyword.Pseudo 36 | .kr { font-weight: bold } // Keyword.Reserved 37 | .kt { color: #458; font-weight: bold } // Keyword.Type 38 | .m { color: #099 } // Literal.Number 39 | .s { color: #d14 } // Literal.String 40 | .na { color: #008080 } // Name.Attribute 41 | .nb { color: #0086B3 } // Name.Builtin 42 | .nc { color: #458; font-weight: bold } // Name.Class 43 | .no { color: #008080 } // Name.Constant 44 | .ni { color: #800080 } // Name.Entity 45 | .ne { color: #900; font-weight: bold } // Name.Exception 46 | .nf { color: #900; font-weight: bold } // Name.Function 47 | .nn { color: #555 } // Name.Namespace 48 | .nt { color: #000080 } // Name.Tag 49 | .nv { color: #008080 } // Name.Variable 50 | .ow { font-weight: bold } // Operator.Word 51 | .w { color: #bbb } // Text.Whitespace 52 | .mf { color: #099 } // Literal.Number.Float 53 | .mh { color: #099 } // Literal.Number.Hex 54 | .mi { color: #099 } // Literal.Number.Integer 55 | .mo { color: #099 } // Literal.Number.Oct 56 | .sb { color: #d14 } // Literal.String.Backtick 57 | .sc { color: #d14 } // Literal.String.Char 58 | .sd { color: #d14 } // Literal.String.Doc 59 | .s2 { color: #d14 } // Literal.String.Double 60 | .se { color: #d14 } // Literal.String.Escape 61 | .sh { color: #d14 } // Literal.String.Heredoc 62 | .si { color: #d14 } // Literal.String.Interpol 63 | .sx { color: #d14 } // Literal.String.Other 64 | .sr { color: #009926 } // Literal.String.Regex 65 | .s1 { color: #d14 } // Literal.String.Single 66 | .ss { color: #990073 } // Literal.String.Symbol 67 | .bp { color: #999 } // Name.Builtin.Pseudo 68 | .vc { color: #008080 } // Name.Variable.Class 69 | .vg { color: #008080 } // Name.Variable.Global 70 | .vi { color: #008080 } // Name.Variable.Instance 71 | .il { color: #099 } // Literal.Number.Integer.Long 72 | } 73 | -------------------------------------------------------------------------------- /about/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: full-width 3 | title: About 4 | --- 5 | 6 | The *Tufte-Jekyll* theme is a natural extension of the work done by [Edward Tufte](https://github.com/edwardtufte/tufte-css) and his collaborators on Github who created a CSS file that allows web writers to use the same simple and elegant style employed in his published materials. 7 | 8 | To incorporate these styles into a Jekyll theme, I have made some very slight modifications that attempt to maintain the feel of the CSS styles in his Github repo. 9 | 10 | Note that this is a full-width layout. This was accomplished by including ```layout: full-width``` in the YAML front matter for this page. Keep in mind that all the Tufte-Jekyll sidenote and marginnote goodness will not work on full-width layouts! 11 | 12 | You can find the source code for Jekyll at [github.com/jekyll/jekyll](https://github.com/jekyll/jekyll). 13 | 14 | 15 | -------------------------------------------------------------------------------- /assets/img/badge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clayh53/tufte-jekyll/d54bfd83aaa46f6bc8023a162637ce9c4005f62f/assets/img/badge.png -------------------------------------------------------------------------------- /assets/img/badge_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clayh53/tufte-jekyll/d54bfd83aaa46f6bc8023a162637ce9c4005f62f/assets/img/badge_1.png -------------------------------------------------------------------------------- /assets/img/badge_1.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clayh53/tufte-jekyll/d54bfd83aaa46f6bc8023a162637ce9c4005f62f/assets/img/badge_1.psd -------------------------------------------------------------------------------- /assets/img/badge_1a.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clayh53/tufte-jekyll/d54bfd83aaa46f6bc8023a162637ce9c4005f62f/assets/img/badge_1a.psd -------------------------------------------------------------------------------- /assets/img/badge_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clayh53/tufte-jekyll/d54bfd83aaa46f6bc8023a162637ce9c4005f62f/assets/img/badge_2.png -------------------------------------------------------------------------------- /assets/img/badge_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clayh53/tufte-jekyll/d54bfd83aaa46f6bc8023a162637ce9c4005f62f/assets/img/badge_3.png -------------------------------------------------------------------------------- /assets/img/exports-imports.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clayh53/tufte-jekyll/d54bfd83aaa46f6bc8023a162637ce9c4005f62f/assets/img/exports-imports.png -------------------------------------------------------------------------------- /assets/img/figure1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clayh53/tufte-jekyll/d54bfd83aaa46f6bc8023a162637ce9c4005f62f/assets/img/figure1.png -------------------------------------------------------------------------------- /assets/img/figure2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clayh53/tufte-jekyll/d54bfd83aaa46f6bc8023a162637ce9c4005f62f/assets/img/figure2.png -------------------------------------------------------------------------------- /assets/img/figure3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clayh53/tufte-jekyll/d54bfd83aaa46f6bc8023a162637ce9c4005f62f/assets/img/figure3.png -------------------------------------------------------------------------------- /assets/img/napoleons-march.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clayh53/tufte-jekyll/d54bfd83aaa46f6bc8023a162637ce9c4005f62f/assets/img/napoleons-march.png -------------------------------------------------------------------------------- /assets/img/rhino.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clayh53/tufte-jekyll/d54bfd83aaa46f6bc8023a162637ce9c4005f62f/assets/img/rhino.png -------------------------------------------------------------------------------- /css/print.scss: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | --- 4 | @import "../_sass/settings"; 5 | * { 6 | -webkit-transition: none !important; 7 | transition: none !important; 8 | } 9 | *, 10 | *:before, 11 | *:after { 12 | background: transparent !important; 13 | box-shadow: none !important; 14 | text-shadow: none !important; 15 | } 16 | *{transition:none!important} 17 | @page { 18 | margin: 0.75in 0.5in 0.75in 0.5in; 19 | orphans:4; widows:2; 20 | } 21 | 22 | body { 23 | font-size: 12pt; 24 | 25 | } 26 | html body span.print-footer{ 27 | font-family: $sans-font; 28 | font-size: 9pt; 29 | margin-top: 22.4pt; 30 | padding-top: 4pt; 31 | border-top: 1px solid #000; 32 | } 33 | 34 | thead { 35 | display: table-header-group; 36 | } 37 | 38 | tr, 39 | img { 40 | page-break-inside: avoid; 41 | } 42 | 43 | img { 44 | max-width: 100% !important; 45 | } 46 | 47 | p, 48 | h2, 49 | h3 { 50 | orphans: 4; 51 | widows: 4; 52 | } 53 | article h2, article h2 h3, article h3, article h3 h4, article h4, article h4 h5 { 54 | page-break-after: avoid; 55 | } 56 | 57 | body header , body footer { 58 | display:none; 59 | } 60 | -------------------------------------------------------------------------------- /css/tufte.scss: -------------------------------------------------------------------------------- 1 | --- 2 | # this ensures Jekyll reads the file to be transformed into CSS later 3 | # only Main files contain this front matter, not partials. 4 | nav_exclude: true 5 | --- 6 | /*****************************************************************************/ 7 | /* 8 | /* Tufte Jekyll blog theme 9 | /* Based on Tufte CSS by Dave Liepmann ( https://github.com/edwardtufte/tufte-css ) 10 | /* 11 | /* The README.md will show you how to set up your site along with other goodies 12 | /*****************************************************************************/ 13 | 14 | // Imports to create final 15 | 16 | @import "../_sass/fonts"; 17 | @import "../_sass/settings"; 18 | @import "../_sass/syntax-highlighting"; 19 | 20 | // Global Resets 21 | // 22 | * { margin: 0; padding: 0; } 23 | 24 | /* clearfix hack after Cederholm (group class name) */ 25 | .group:after { 26 | content: ""; 27 | display: table; 28 | clear: both; 29 | } 30 | 31 | html, body { height: 100%; } 32 | 33 | // First significant deviation from CSS on tufte.css site - variable font size as browser width expands or contracts 34 | //html { font-size: 15px; } 35 | 36 | html{ 37 | text-align: baseline; 38 | font-size: 11px; 39 | -webkit-font-smoothing: antialiased; 40 | -moz-osx-font-smoothing: grayscale; 41 | 42 | } 43 | 44 | @media screen and (min-width: 800px){ html{ font-size: 12px;} } 45 | 46 | @media screen and (min-width: 900px){ html{ font-size: 13px;} } 47 | 48 | @media screen and (min-width: 1000px){ html{ font-size: 14px;} } 49 | 50 | @media screen and (min-width: 1100px){ html{ font-size: 15px; } } 51 | 52 | @media screen and (min-width: 1200px){ html{ font-size: 16px; } } 53 | 54 | @media screen and (min-width: 1300px){ html{ font-size: 17px; } } 55 | 56 | // Mathjax fonts need TLC 57 | .mjx-math{ 58 | font-size: 1.3rem; 59 | } 60 | // sets link style according to values in _settings.scss 61 | a { 62 | color: $contrast-color; 63 | text-decoration: none; 64 | } 65 | 66 | p > a, cite > a, span > a { @if $link-style == underline 67 | { 68 | color: $text-color; 69 | text-decoration: none; 70 | background: -webkit-linear-gradient($bg-color, $bg-color), -webkit-linear-gradient($bg-color, $bg-color), -webkit-linear-gradient(currentColor, currentColor); 71 | background: linear-gradient($bg-color, $bg-color), linear-gradient($bg-color, $bg-color), linear-gradient(currentColor, currentColor); 72 | -webkit-background-size: 0.05em 1px, 0.05em 1px, 1px 1px; 73 | -moz-background-size: 0.05em 1px, 0.05em 1px, 1px 1px; 74 | background-size: 0.05em 1px, 0.05em 1px, 1px 1px; 75 | background-repeat: no-repeat, no-repeat, repeat-x; 76 | text-shadow: 0.03em 0 $bg-color, -0.03em 0 $bg-color, 0 0.03em $bg-color, 0 -0.03em $bg-color, 0.06em 0 $bg-color, -0.06em 0 $bg-color, 0.09em 0 $bg-color, -0.09em 0 $bg-color, 0.12em 0 $bg-color, -0.12em 0 $bg-color, 0.15em 0 $bg-color, -0.15em 0 $bg-color; 77 | background-position: 0% 93%, 100% 93%, 0% 93%; 78 | } 79 | @else 80 | { 81 | color: $contrast-color; 82 | text-decoration: none; 83 | } 84 | } 85 | 86 | body { width: 87.5%; 87 | margin-left: auto; 88 | margin-right: auto; 89 | padding-left: 12.5%; 90 | font-family: $body-font; 91 | background-color: $bg-color; 92 | color: $text-color; 93 | max-width: 1400px; 94 | counter-reset: sidenote-counter; } 95 | 96 | // --------- Typography stuff -----------// 97 | // added rational line height and margins ala http://webtypography.net/intro/ 98 | 99 | h1 { font-weight: 400; 100 | margin-top: 1.568rem; 101 | margin-bottom: 1.568rem; 102 | font-size: 2.5rem; 103 | line-height: 0.784; } 104 | 105 | h2 { font-style: italic; 106 | font-weight: 400; 107 | margin-top: 1.866666666666667rem; 108 | margin-bottom: 0; 109 | font-size: 2.1rem; 110 | line-height: 0.933333333333333; } 111 | 112 | h3 { font-style: italic; 113 | font-weight: 400; 114 | font-size: 1.8rem; 115 | margin-top: 2.1777777777777778rem; 116 | margin-bottom: 0; 117 | line-height: 1.08888888888889; } 118 | 119 | // ET says a need for more than 3 levels of headings is the sign of a diseased mind 120 | 121 | p .subtitle { font-style: italic; 122 | margin-top: 2.1777777777777778rem; 123 | margin-bottom: 2.1777777777777778rem; 124 | font-size: 1.8rem; 125 | display: block; 126 | line-height: 1.08888888888889; } 127 | 128 | 129 | p, ol, ul { font-size: 1.4rem; } 130 | 131 | p, li { line-height: 2rem; 132 | margin-top: 1.4rem; 133 | padding-right: 2rem; //removed because, why? 134 | vertical-align: baseline; } 135 | 136 | /* Chapter Epigraphs */ 137 | div.epigraph { margin: 3.5636rem 0; } 138 | 139 | div.epigraph > blockquote { margin-top: 3rem; 140 | margin-bottom: 3rem; 141 | } 142 | 143 | div.epigraph > blockquote, div.epigraph > blockquote > p { font-style: italic; } 144 | 145 | div.epigraph > blockquote > footer { font-style: normal; 146 | width: 45%; 147 | padding-left: 2.5%; 148 | padding-right: 2.5%; 149 | padding-top: 0; 150 | margin-top: 0.4455rem; 151 | margin-bottom: 3.1182rem } 152 | 153 | div.epigraph > blockquote > footer > cite { font-style: italic; } 154 | /* end chapter epigraphs styles */ 155 | 156 | blockquote p, blockquote footer{ width: 45%; 157 | padding-left: 2.5%; 158 | padding-right: 2.5%;} 159 | 160 | blockquote footer { font-size: 1.1rem; 161 | line-height: 1.78181818; 162 | margin-top: 1.78181818rem; 163 | margin-bottom: 1.78181818rem; 164 | text-align: right; 165 | } 166 | 167 | /* blockquote footer { width: 45%; 168 | text-align: right; } 169 | */ 170 | 171 | .sans { font-family: $sans-font; 172 | letter-spacing: .03em; } 173 | 174 | pre, pre code, p code, p pre code { font-family: $code-font; // removed .code 'class' since code is an actual html tag 175 | font-size: 1.2rem; // also added p code, p pre code and pre selector to account for Markdown parsing 176 | line-height: 1.71428571; // of triple backticks plus rationalized line-heights and margins 177 | margin-top: 1.71428571rem; } 178 | 179 | 180 | h1 code, h2 code, h3 code { font-size: 0.80em; } //left in for no real reason 181 | 182 | /*-- Table styling section - For Tufte-Jekyll, booktabs style is default for Markdown tables --*/ 183 | 184 | table, table.booktabs { width: auto; //making booktabs style tables the unstyled default in case someone uses Markdown styling 185 | //margin: 0 auto; 186 | border-spacing: 0px; 187 | border-top: 2px solid $border-color; 188 | border-bottom: 2px solid $border-color; } 189 | 190 | .booktabs th, th { border-bottom: 1px solid $border-color; 191 | padding: 0.65ex 0.5em 0.4ex 0.5em; 192 | font-weight: normal; 193 | //text-align: center; 194 | } 195 | 196 | th, td{ font-size: 1.2rem; 197 | line-height: 1.71428571; } 198 | 199 | .booktabs th.cmid, th { border-bottom: 1px solid lighten($border-color, 25%); } 200 | 201 | .booktabs th.nocmid { border-bottom: none; } 202 | 203 | .booktabs tbody tr:first-child td, tr:first-child td { padding-top: 0.65ex; } /* add space between thead row and tbody */ 204 | 205 | .booktabs td, td { padding-left: 0.5em; 206 | padding-right: 0.5em; 207 | text-align: left; } 208 | 209 | .booktabs caption, caption { font-size: 90%; 210 | text-align: left; 211 | width: auto; 212 | margin-left: auto; 213 | margin-right: auto; 214 | margin-top: 1ex; 215 | caption-side: top; } 216 | 217 | .booktabs tbody tr, .booktabs thead tr th.l, .booktabs td.l { text-align: left !important; } 218 | .booktabs tbody tr, .booktabs thead tr th.c, .booktabs td.c { text-align: center !important; } 219 | .booktabs tbody tr, .booktabs thead tr th.r, .booktabs td.r { text-align: right !important; } 220 | 221 | .table-caption { float:right; 222 | clear:right; 223 | margin-right: -60%; 224 | width: 50%; 225 | margin-top: 0; 226 | margin-bottom: 0; 227 | font-size: 1.0rem; 228 | line-height: 1.96; } 229 | /* -- End of Table Styling section --*/ 230 | 231 | /* Basic Layout stuff --*/ 232 | 233 | article { position: relative; 234 | padding: 1 235 | 236 | rem 0rem 2.5rem 0rem; } // reduced top and bottom padding by 50% 237 | 238 | section { padding-top: 1rem; 239 | padding-bottom: 1rem; } 240 | 241 | ul,ol { width: 45%; 242 | -webkit-padding-start: 5%; 243 | -webkit-padding-end: 5%; 244 | list-style-type: none; } 245 | 246 | //li { padding: 0.5em 0; } //vertical padding on list items screws up vertical rhythym 247 | 248 | figure, figure img.maincolumn { max-width: 55%; 249 | -webkit-margin-start: 0; 250 | -webkit-margin-end: 0; 251 | margin-bottom: 3em; } 252 | 253 | figcaption { float: right; 254 | clear: right; 255 | margin-right: -50%; 256 | margin-top: 0; 257 | margin-bottom: 0; 258 | font-size: 1.0rem; 259 | line-height: 1.6; 260 | vertical-align: baseline; 261 | position: relative; 262 | max-width: 40%; } 263 | 264 | figure.fullwidth figcaption { float: left; margin-right: 0%; margin-left: 33%; max-width: 100%; } 265 | 266 | img { max-width: 100%; } 267 | 268 | .sidenote, .marginnote { float: right; 269 | clear: right; 270 | margin-right: -60%; 271 | width: 50%; 272 | margin-top: 0; 273 | margin-bottom: 1.96rem; 274 | font-size: 1.0rem; 275 | line-height: 1.96; //changed to bring line heights into rational pattern 276 | vertical-align: baseline; 277 | position: relative; } 278 | 279 | 280 | li .sidenote, li .marginnote{ margin-right: -80%; } //added to allow for the fact that lists are indented and marginnotes and sidenotes push to right 281 | 282 | blockquote .sidenote, blockquote .marginnote { margin-right: -79% } 283 | 284 | .sidenote-number { counter-increment: sidenote-counter; } 285 | 286 | .sidenote-number:after, .sidenote:before { content: counter(sidenote-counter) " "; 287 | font-family: et-bembo-roman-old-style; 288 | color: $contrast-color; //added color 289 | position: relative; 290 | vertical-align: baseline; } 291 | 292 | .sidenote-number:after { content: counter(sidenote-counter); 293 | font-size: 1rem; 294 | top: -0.5rem; 295 | left: 0.1rem; } 296 | 297 | .sidenote:before { content: counter(sidenote-counter) ".\000a0"; // this is unicode for a non-breaking space 298 | color: $contrast-color; 299 | top: 0rem; } //removed superscripting for numerical reference in sidenote 300 | 301 | p, footer, div.table-wrapper, .MJXc-display, .MathJax { width: 55%; } 302 | 303 | div.table-wrapper, table { overflow-x: auto; } //changed all overflow values to 'auto' so scroll bars appear only as needed 304 | 305 | @media screen and (max-width: 760px) { p, footer { width: 90%; } 306 | pre code { width: 87.5%; } 307 | ul { width: 85%; } 308 | figure { max-width: 90%; } 309 | figcaption, figure.fullwidth figcaption { margin-right: 0%; 310 | max-width: none; } 311 | blockquote p, blockquote footer, div.epigraph > blockquote > footer,.MJXc-display { width: 80%; 312 | padding-left: 5%; 313 | padding-right: 5%; 314 | }} 315 | 316 | .marginnote code, .sidenote code { font-size: 1rem; } //more .code class removal 317 | 318 | pre { width: 52.5%; //, pre code, p pre code are both selectors in tufte.css - they have been removed here to fix alignment issues 319 | padding-left: 2.5%; 320 | overflow-x: auto; } 321 | 322 | .fullwidth, li.listing div{ max-width: 90%; } 323 | 324 | .full-width { .sidenote, .sidenote-number, .marginnote { display: none; } } 325 | 326 | span.newthought { font-variant: small-caps; 327 | font-size: 1.2em; 328 | letter-spacing: 0.05rem; } 329 | 330 | input.margin-toggle { display: none; } 331 | 332 | label.sidenote-number { display: inline; } 333 | 334 | label.margin-toggle:not(.sidenote-number) { display: none; } 335 | 336 | @media (max-width: 760px) { label.margin-toggle:not(.sidenote-number) { display: inline; color: $contrast-color; } 337 | .sidenote, .marginnote { display: none; } 338 | .margin-toggle:checked + .sidenote, 339 | .margin-toggle:checked + .marginnote { display: block; 340 | float: left; 341 | left: 1rem; 342 | clear: both; 343 | width: 95%; 344 | margin: 1rem 2.5%; 345 | vertical-align: baseline; 346 | position: relative; } 347 | label { cursor: pointer; } 348 | pre, pre code, p code, p pre code { width: 90%; 349 | padding: 0; } 350 | .table-caption { display: block; 351 | float: right; 352 | clear: both; 353 | width: 98%; 354 | margin-top: 1rem; 355 | margin-bottom: 0.5rem; 356 | margin-left: 1%; 357 | margin-right: 1%; 358 | vertical-align: baseline; 359 | position: relative; } 360 | div.table-wrapper, table, table.booktabs { width: 85%; } 361 | div.table-wrapper { border-right: 1px solid #efefef; } 362 | img { max-width: 100%; } 363 | figcaption.maincolumn-figure, figure.fullwidth figcaption { float:none; text-align: center;} 364 | figure.fullwidth figcaption { margin-left: 0; } 365 | } 366 | /*--- End of Basic Layout stuff from tufte.css ---*/ 367 | 368 | /* -- Jekyll specific styling --*/ 369 | //helper classes 370 | 371 | .contrast { color: $contrast-color;} 372 | .smaller { font-size: 80%;} 373 | //Nav and Footer styling area 374 | 375 | header > nav.group, body footer { 376 | width: 95%; 377 | padding-top: 2rem; 378 | } 379 | 380 | nav.group a.active:before{ content:"\0003c\000a0";} // escaped unicode for the carats and then a space on active menu links 381 | nav.group a.active:after{ content:"\000a0\0003e" ;} 382 | 383 | header > nav a{ 384 | font-size: 1.2rem; 385 | font-family: $sans-font; 386 | letter-spacing: 0.15em; 387 | text-transform: uppercase; 388 | color: $contrast-color; 389 | padding-top: 1.5rem; 390 | text-decoration: none; 391 | display: inline-block; 392 | float: left; 393 | margin-top: 0; 394 | margin-bottom: 0; 395 | padding-right: 2rem; 396 | //margin-left: 1rem; 397 | vertical-align: baseline; 398 | } 399 | header > nav a img{ 400 | height: 5rem; 401 | position: relative; 402 | max-width: 100%; 403 | top:-1.5rem; 404 | } 405 | ul.footer-links, .credits{ 406 | list-style: none; 407 | text-align: center; 408 | margin: 0 auto; 409 | } 410 | ul.footer-links li{ 411 | display: inline; 412 | padding: 0.5rem 0.25rem; 413 | } 414 | .credits{ 415 | padding: 1rem 0rem; 416 | } 417 | 418 | //change font color for credit links in footer 419 | 420 | .credits{ 421 | font-family: $sans-font; 422 | & a{ 423 | color: $contrast-color; 424 | } 425 | } 426 | 427 | // End of Nav and Footer styling area 428 | 429 | //Full width page styling stuff 430 | 431 | body.full-width, .content-listing, ul.content-listing li.listing{ width: 90%; 432 | margin-left: auto; 433 | margin-right: auto; 434 | padding: 0% 5%; 435 | 436 | } 437 | .full-width article p{ 438 | width: 90%; 439 | } 440 | 441 | 442 | h1.content-listing-header{ 443 | font-style: normal; 444 | text-transform: uppercase; 445 | letter-spacing: 0.2rem; 446 | font-size: 1.8rem; 447 | } 448 | 449 | li.listing hr{ 450 | width:100%; 451 | } 452 | .listing, .listing h3 453 | { 454 | display: inline-block; 455 | margin:0; 456 | } 457 | li.listing { 458 | margin:0; 459 | & p{ 460 | width: 100% 461 | } 462 | } 463 | 464 | 465 | li.listing:last-of-type{ 466 | border-bottom: none; 467 | margin-bottom: 1.4rem; 468 | } 469 | li.listing h3.new { 470 | text-transform: uppercase; 471 | font-style: normal; 472 | } 473 | hr.slender { 474 | border: 0; 475 | height: 1px; 476 | margin-top: 1.4rem; 477 | margin-bottom:1.4rem; 478 | background-image: -webkit-linear-gradient(left, rgba(0,0,0,0), rgba(0,0,0,0.75), rgba(0,0,0,0)); 479 | background-image: -moz-linear-gradient(left, rgba(0,0,0,0), rgba(0,0,0,0.75), rgba(0,0,0,0)); 480 | background-image: -ms-linear-gradient(left, rgba(0,0,0,0), rgba(0,0,0,0.75), rgba(0,0,0,0)); 481 | background-image: -o-linear-gradient(left, rgba(0,0,0,0), rgba(0,0,0,0.75), rgba(0,0,0,0)); 482 | } 483 | // End of front listing page stuff 484 | 485 | 486 | // Printing ands screen media queries 487 | 488 | // Does not display a print-footer for screen display 489 | @media screen{ 490 | .print-footer{ 491 | display: none; 492 | } 493 | } 494 | 495 | //printing stuff 496 | @media print { 497 | 498 | * { 499 | -webkit-transition: none !important; 500 | transition: none !important; 501 | } 502 | *, 503 | *:before, 504 | *:after { 505 | background: transparent !important; 506 | box-shadow: none !important; 507 | text-shadow: none !important; 508 | } 509 | @page { 510 | margin: 0.75in 0.5in 0.75in 0.5in; 511 | orphans:4; widows:2; 512 | } 513 | 514 | body { 515 | font-size: 12pt; 516 | 517 | } 518 | html body span.print-footer{ 519 | font-family: $sans-font; 520 | font-size: 9pt; 521 | margin-top: 22.4pt; 522 | padding-top: 4pt; 523 | border-top: 1px solid #000; 524 | } 525 | 526 | thead { 527 | display: table-header-group; 528 | } 529 | 530 | tr, 531 | img { 532 | page-break-inside: avoid; 533 | } 534 | 535 | img { 536 | max-width: 100% !important; 537 | } 538 | 539 | p, 540 | h2, 541 | h3 { 542 | orphans: 4; 543 | widows: 4; 544 | } 545 | article h2, article h2 h3, article h3, article h3 h4, article h4, article h4 h5 { 546 | page-break-after: avoid; 547 | } 548 | 549 | body header , body footer { 550 | display:none; 551 | } 552 | } 553 | 554 | 555 | /* --- Icomoon icon fonts CSS --*/ 556 | @font-face { 557 | font-family: 'icomoon'; 558 | src: url('../fonts/icomoon.eot?pmc8bw'); 559 | src: url('../fonts/icomoon.eot?pmc8bw#iefix') format('embedded-opentype'), 560 | url('../fonts/icomoon.ttf?pmc8bw') format('truetype'), 561 | url('../fonts/icomoon.woff?pmc8bw') format('woff'), 562 | url('../fonts/icomoon.svg?pmc8bw#icomoon') format('svg'); 563 | font-weight: normal; 564 | font-style: normal; 565 | font-display: block; 566 | } 567 | 568 | [class^="icon-"], [class*=" icon-"] { 569 | /* use !important to prevent issues with browser extensions that change fonts */ 570 | font-family: 'icomoon' !important; 571 | speak: none; 572 | font-style: normal; 573 | font-weight: normal; 574 | font-variant: normal; 575 | text-transform: none; 576 | line-height: 1; 577 | 578 | /* Better Font Rendering =========== */ 579 | -webkit-font-smoothing: antialiased; 580 | -moz-osx-font-smoothing: grayscale; 581 | } 582 | 583 | .icon-mail3:before { 584 | content: "\ea85"; 585 | } 586 | .icon-amazon:before { 587 | content: "\ea87"; 588 | } 589 | .icon-google2:before { 590 | content: "\ea89"; 591 | } 592 | .icon-facebook2:before { 593 | content: "\ea91"; 594 | } 595 | .icon-twitter:before { 596 | content: "\ea96"; 597 | } 598 | .icon-rss2:before { 599 | content: "\ea9c"; 600 | } 601 | .icon-youtube:before { 602 | content: "\ea9d"; 603 | } 604 | .icon-vimeo2:before { 605 | content: "\eaa1"; 606 | } 607 | .icon-lanyrd:before { 608 | content: "\eaa2"; 609 | } 610 | .icon-flickr3:before { 611 | content: "\eaa5"; 612 | } 613 | .icon-behance2:before { 614 | content: "\eaa9"; 615 | } 616 | .icon-dropbox:before { 617 | content: "\eaae"; 618 | } 619 | .icon-github:before { 620 | content: "\eab0"; 621 | } 622 | .icon-blogger2:before { 623 | content: "\eab8"; 624 | } 625 | .icon-soundcloud2:before { 626 | content: "\eac4"; 627 | } 628 | .icon-skype:before { 629 | content: "\eac5"; 630 | } 631 | .icon-reddit:before { 632 | content: "\eac6"; 633 | } 634 | .icon-linkedin:before { 635 | content: "\eac9"; 636 | } 637 | .icon-pinterest:before { 638 | content: "\ead1"; 639 | } 640 | .icon-paypal:before { 641 | content: "\ead8"; 642 | } 643 | .icon-html-five:before { 644 | content: "\eae4"; 645 | } 646 | /*-- End of Icomoon icon font section --*/ 647 | -------------------------------------------------------------------------------- /feed.xml: -------------------------------------------------------------------------------- 1 | --- 2 | layout: null 3 | nav_exclude: true 4 | --- 5 | 6 | 7 | 8 | {{ site.title | xml_escape }} 9 | {{ site.description | xml_escape }} 10 | {{ site.url }}{{ site.baseurl }}/ 11 | 12 | {{ site.time | date_to_rfc822 }} 13 | {{ site.time | date_to_rfc822 }} 14 | Jekyll v{{ jekyll.version }} 15 | {% for post in site.posts limit:10 %} 16 | 17 | {{ post.title | xml_escape }} 18 | {{ post.content | xml_escape }} 19 | {{ post.date | date_to_rfc822 }} 20 | {{ post.url | prepend: site.baseurl | prepend: site.url }} 21 | {{ post.url | prepend: site.baseurl | prepend: site.url }} 22 | {% for tag in post.tags %} 23 | {{ tag | xml_escape }} 24 | {% endfor %} 25 | {% for cat in post.categories %} 26 | {{ cat | xml_escape }} 27 | {% endfor %} 28 | 29 | {% endfor %} 30 | 31 | 32 | -------------------------------------------------------------------------------- /fonts/et-book/et-book-bold-line-figures/et-book-bold-line-figures.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clayh53/tufte-jekyll/d54bfd83aaa46f6bc8023a162637ce9c4005f62f/fonts/et-book/et-book-bold-line-figures/et-book-bold-line-figures.eot -------------------------------------------------------------------------------- /fonts/et-book/et-book-bold-line-figures/et-book-bold-line-figures.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clayh53/tufte-jekyll/d54bfd83aaa46f6bc8023a162637ce9c4005f62f/fonts/et-book/et-book-bold-line-figures/et-book-bold-line-figures.ttf -------------------------------------------------------------------------------- /fonts/et-book/et-book-bold-line-figures/et-book-bold-line-figures.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clayh53/tufte-jekyll/d54bfd83aaa46f6bc8023a162637ce9c4005f62f/fonts/et-book/et-book-bold-line-figures/et-book-bold-line-figures.woff -------------------------------------------------------------------------------- /fonts/et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clayh53/tufte-jekyll/d54bfd83aaa46f6bc8023a162637ce9c4005f62f/fonts/et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.eot -------------------------------------------------------------------------------- /fonts/et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clayh53/tufte-jekyll/d54bfd83aaa46f6bc8023a162637ce9c4005f62f/fonts/et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.ttf -------------------------------------------------------------------------------- /fonts/et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clayh53/tufte-jekyll/d54bfd83aaa46f6bc8023a162637ce9c4005f62f/fonts/et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.woff -------------------------------------------------------------------------------- /fonts/et-book/et-book-roman-line-figures/et-book-roman-line-figures.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clayh53/tufte-jekyll/d54bfd83aaa46f6bc8023a162637ce9c4005f62f/fonts/et-book/et-book-roman-line-figures/et-book-roman-line-figures.eot -------------------------------------------------------------------------------- /fonts/et-book/et-book-roman-line-figures/et-book-roman-line-figures.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clayh53/tufte-jekyll/d54bfd83aaa46f6bc8023a162637ce9c4005f62f/fonts/et-book/et-book-roman-line-figures/et-book-roman-line-figures.ttf -------------------------------------------------------------------------------- /fonts/et-book/et-book-roman-line-figures/et-book-roman-line-figures.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clayh53/tufte-jekyll/d54bfd83aaa46f6bc8023a162637ce9c4005f62f/fonts/et-book/et-book-roman-line-figures/et-book-roman-line-figures.woff -------------------------------------------------------------------------------- /fonts/et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clayh53/tufte-jekyll/d54bfd83aaa46f6bc8023a162637ce9c4005f62f/fonts/et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.eot -------------------------------------------------------------------------------- /fonts/et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clayh53/tufte-jekyll/d54bfd83aaa46f6bc8023a162637ce9c4005f62f/fonts/et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.ttf -------------------------------------------------------------------------------- /fonts/et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clayh53/tufte-jekyll/d54bfd83aaa46f6bc8023a162637ce9c4005f62f/fonts/et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.woff -------------------------------------------------------------------------------- /fonts/et-book/et-book-semi-bold-old-style-figures/et-book-semi-bold-old-style-figures.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clayh53/tufte-jekyll/d54bfd83aaa46f6bc8023a162637ce9c4005f62f/fonts/et-book/et-book-semi-bold-old-style-figures/et-book-semi-bold-old-style-figures.eot -------------------------------------------------------------------------------- /fonts/et-book/et-book-semi-bold-old-style-figures/et-book-semi-bold-old-style-figures.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clayh53/tufte-jekyll/d54bfd83aaa46f6bc8023a162637ce9c4005f62f/fonts/et-book/et-book-semi-bold-old-style-figures/et-book-semi-bold-old-style-figures.ttf -------------------------------------------------------------------------------- /fonts/et-book/et-book-semi-bold-old-style-figures/et-book-semi-bold-old-style-figures.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clayh53/tufte-jekyll/d54bfd83aaa46f6bc8023a162637ce9c4005f62f/fonts/et-book/et-book-semi-bold-old-style-figures/et-book-semi-bold-old-style-figures.woff -------------------------------------------------------------------------------- /fonts/icomoon.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clayh53/tufte-jekyll/d54bfd83aaa46f6bc8023a162637ce9c4005f62f/fonts/icomoon.eot -------------------------------------------------------------------------------- /fonts/icomoon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Generated by IcoMoon 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /fonts/icomoon.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clayh53/tufte-jekyll/d54bfd83aaa46f6bc8023a162637ce9c4005f62f/fonts/icomoon.ttf -------------------------------------------------------------------------------- /fonts/icomoon.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clayh53/tufte-jekyll/d54bfd83aaa46f6bc8023a162637ce9c4005f62f/fonts/icomoon.woff -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: full-width 3 | title: blog 4 | # Note that this index page uses a full-width layout! 5 | --- 6 | 7 |

Articles

8 |
    9 | {% for post in site.posts %} 10 |
  • 11 |
    12 |

    {{ post.title }}

    13 |
    {{ post.date | date: "%B %-d, %Y" }}
    14 |
    {{ post.excerpt }}
    15 |
  • 16 | {% endfor %} 17 |
-------------------------------------------------------------------------------- /page/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: post 3 | title: page 4 | --- 5 | {% newthought 'In this first iteration'%} of the *Tufte-Jekyll* theme, a post and a page have exactly the same layout. That means that all the typographic and structural details are identical between the two. 6 | 7 | ## Pages and Posts 8 | 9 | Jekyll provides for both pages and posts in its default configuration. I have left this as-is. 10 | 11 | ### Posts 12 | 13 | Conceptually, posts are for recurring pieces of similar content such as might be found in a typical blog entry. Post content all sits in a folder named ```_posts``` and files are created in this folder{% sidenote 1 'Yes, a page has essentially the same old shit as a post'%} that are names with a date pre-pended to the title of the post. For instance ```2105-02-20-this-is-a-post.md``` is a perfectly valid post filename. 14 | 15 | Posts will always have a section above the content itself consisting of YAML front matter, which is meta-data information about the post. Minimally, a post title must always be present for it to be processed properly. 16 | 17 | ``` 18 | --- 19 | Title: Some Title 20 | --- 21 | ## Content 22 | 23 | Markdown formatted content *here*. 24 | ``` 25 | 26 | 27 | ### Pages 28 | 29 | Pages are any HTML documents *or* Markdown documents with YAML front matter that are then converted to content. Page material is more suited to static, non-recurring types of content. Like this 30 | 31 | I am not going to re-write the Jekyll documentation. Read it and you will figure out how the site is structured. 32 | 33 | --------------------------------------------------------------------------------