• Stars
    star
    311
  • Rank 134,521 (Top 3 %)
  • Language
    CSS
  • Created about 8 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Starter files for using Pandoc Markdown with Tufte CSS

Tufte Pandoc CSS

Starter files for using Pandoc Markdown with Tufte CSS

This project aims to provide a standard set of project starter files for working with Pandoc and Tufte CSS. It features:

  • extra CSS styles for things like tables and syntax highlighted code
  • tweaks to the CSS to get HTML produced by Pandoc to play nicely with Tufte CSS
  • an optional Solarized light color scheme for code blocks
  • a modular separation of these components--you can select which you want
  • an HTML5 template file that sets up the document the way Tufte CSS expects
  • support for lots of Pandoc markdown features, including
    • footnotes as side notes
    • footnotes as margin notes
    • metadata like title, subtitle, date, and author
    • LaTeX using MathJax or KaTeX

Apart from projects like Tufte CSS & Pandoc, the main project that enables this project is pandoc-sidenote, a project which converts Pandoc Markdown-style footnotes ([^1]) into side notes.

Looking to use this with Jekyll?

You might be interested in Tufte Pandoc Jekyll, which wraps the files distributed here into a Jekyll gem-based theme.

Looking for the same features, but a different look?

You might be interested in Pandoc Markdown CSS Theme, a theme with much of the same features as this theme, but with a more easily customizable look.

Table of Contents

Background

If you haven't already, I encourage you to explore the projects that have been built on top of here:

  • Pandoc - a universal document converter
  • Tufte CSS - style your webpage like Edward Tufte's handouts
  • pandoc-sidenote - convert Pandoc Markdown-style footnotes into sidenotes

Installation

Dependencies

This project is always tested relative to:

  • the most recent master commit of tufte-css.
  • the latest release version of pandoc

In particular, you'll need at least Pandoc version 2.0.

This project is meant to be a set of starter files for your next project. What that ultimately means is that you should use these files however your heart sees fit. In practice, here are some tips for some things you may want to do to get set up.

First, install pandoc-sidenote to your PATH.

  • This lets pandoc compile footnotes into sidenotes.
  • Instructions are on the pandoc-sidenote homepage.

Second, download tufte.css and the et-book/ font folder.

  • Head over to tufte-css to download these.
  • You should be able to work with any version of Tufte CSS, assuming things haven't changed too much.
  • If things don't seem to be working, try using the version stashed in the tufte-css/ folder in this repo (it's a submodule).

Third, there are a number of static files you can download and place where you see fit:

  • tufte.html5
    • This is an HTML5 compatible template for use with Pandoc's --template flag.
    • It sets up the document structure in a way Tufte CSS expects.
  • pandoc.css
    • This CSS file has styles for things like sections, author & date information, highlighted code blocks, and tables.
  • pandoc-solarized.css (optional)
    • This sets up highlighted code blocks to use the Solarized Light color theme
  • tufte-extra.css (optional)
    • This makes some "personal preference" tweaks to Tufte CSS. It is NOT required.

Finally, you'll want the Makefile.

  • The Makefile usage is explained below.

Usage

The best way to learn to use this project is to read the documentation--both online and in the source code. You'll probably want to look through things in this order

  1. The re-implementation of the Tufte CSS homepage in Pandoc Markdown
  • Remember to read the source!
  1. The Tufte Pandoc CSS homepage, which documents the additional features specific to this project.
  • Remember to read the source!
  1. The included [Makefile], which compiles *.md files into *.html files using pandoc with the correct options.
  2. The Pandoc homepage. Not everything you see here will work with this project, but if you think something should work that doesn't, open an issue.
    • You'll probably want to just skim this... it's lengthy!

Once you have an understanding of what Markdown features are available, you can use the Makefile to compile your Markdown files.

For example, this is how we build the homepage for this site:

make docs/index.md

and here's how we build all the site files:

make docs
make

Assuming you've laid out your directory identically to this repo, you can pass the name of any *.md file to convert it into an appropriately named *.html file.

make my-pandoc-markdown-file.md

License

MIT License

More Repositories

1

vim-as-an-ide

Workshop on how to use Vim Plugins.
Vim Script
1,952
star
2

pandoc-starter

📄 My pandoc markdown templates and makefiles
TeX
525
star
3

as-tree

Print a list of paths as a tree of paths 🌳
Rust
454
star
4

git-heatmap

📊 Display a heatmap for oft-edited files
Shell
292
star
5

vim-superman

Read Unix man pages faster than a speeding bullet!
Vim Script
190
star
6

pandoc-markdown-css-theme

CSS files and a template for using Pandoc to generate standalone HTML files
CSS
155
star
7

pandoc-sidenote

Convert Pandoc Markdown-style footnotes into sidenotes
Haskell
136
star
8

dotfiles

My personal collection of configuration files.
Shell
122
star
9

vim-better-sml

🎉 Enjoy writing SML within Vim
Vim Script
101
star
10

tufte-pandoc-jekyll

A Jekyll theme for using Tufte CSS with Jekyll + Pandoc
SCSS
66
star
11

git-madge

🚀 Git-aware madge wrapper
Shell
65
star
12

hpstr-theme

A Medium-like Octopress theme based on the HPSTR Jekyll theme.
CSS
63
star
13

tunemachine

🎶 A time machine for your Spotify tunes!
CoffeeScript
62
star
14

calz

📆 A natural language alternative to Unix 'cal'
Haskell
59
star
15

bask

😎 Bask in the convenience of a task runner for bash
Shell
58
star
16

vim-github-hub

A Vim filetype plugin for github/hub ⚡
Vim Script
49
star
17

latex-solarized

Provides three LaTeX packages for using the Solarized theme in LaTeX code listings.
TeX
29
star
18

stargaze

⭐ Gaze at repos you've starred
Shell
20
star
19

resume

My resume, written in XeTeX.
TeX
14
star
20

latex-hw-template

LaTeX template useful for formatting homework assignments
TeX
13
star
21

blog

an Octopress blog by Jake Zimmerman
Liquid
13
star
22

cmu-latex-hw-template

A LaTeX template for homework assignments, used widely at CMU.
TeX
12
star
23

pandoc-markdown-jekyll-theme

CSS
10
star
24

viewjrnl

Shell script to group jrnl entries by date and add color.
Shell
7
star
25

bin

My collection of personal scripts. They're not documented and often break. Ask if you have questions.
Shell
7
star
26

talks

💬 Slides and descriptions for talks I've given
TeX
6
star
27

starter-zshrc

You should really consider switching to zsh!
Shell
6
star
28

multi-sub

Substitute a pattern with a replacement on specific lines
OCaml
6
star
29

vim-ispc

Vim syntax highlighting for ISPC.
Vim Script
6
star
30

barchart

📊 Print a bar chart from the command line
Rust
5
star
31

ragel-bison-parser-sandbox

A small parser for the lambda calculus in C++ using Bazel, Ragel, and Bison
C++
5
star
32

cmd-queue

A simple queueing service for CMU students.
CoffeeScript
5
star
33

diff-locs

List the file locations involved in a diff
Haskell
5
star
34

smlnj-viscomp-example

An example of how to use SML/NJ's Visible Compiler APIs
Standard ML
4
star
35

symbol

🔨 A build tool for Standard ML
Shell
4
star
36

stlc-infer

A small interpretter for the simply typed lambda calculus, with type inference
Haskell
4
star
37

multi-grep

Search for a pattern on specific lines
Standard ML
3
star
38

tsim

A Turing machine simulator in SML
Standard ML
3
star
39

rust-lc-interp

Toy interpreter for the lambda calculus to explore Rust
Rust
2
star
40

auditors-webhook

Post commit review using Auditors
CoffeeScript
2
star
41

jez.github.io

A collection of my projects, contact info, and life.
CSS
2
star
42

google-apps-cmu-login

Bare bone demo of how to use Google OAuth2 with Python Social Auth in Django to authenticate by Andrew account.
Python
2
star
43

collate

Command line filter for collating the top and bottom halves of a file
Haskell
1
star
44

awkward-bun

Python
1
star
45

marauder

CSS
1
star
46

spacer

Blank macOS app to take up space
Rust
1
star
47

thoughts

A collection of some essays and longer-form writings.
CSS
1
star
48

flac-post-tag

Generate "post tag system" traces
Haskell
1
star
49

language-communities-on-github

TeX
1
star
50

th-portfolios

Simple app to coordinate uploading and downloading of resumes and profile information at TartanHacks 2014
JavaScript
1
star
51

as-tree-cpp

Print a list of paths as a tree of paths 🌳
Starlark
1
star
52

penndot-dash

A dashboard I designed for one of my class projects
1
star
53

homebrew-formulae

A Homebrew tap for my personal CLI tools
Ruby
1
star
54

JBooks

Java
1
star
55

jquery-lab

Simple game demo in jQuery to demonstrate some principles of frontend development.
JavaScript
1
star
56

vim-sorbet

Vim Script
1
star
57

collate-rs

Rust
1
star