Skip to content

Instantly share code, notes, and snippets.

@p3palazzo
Last active November 23, 2022 17:22
Show Gist options
  • Save p3palazzo/a452c6915b27358b8f6665ae733c682a to your computer and use it in GitHub Desktop.
Save p3palazzo/a452c6915b27358b8f6665ae733c682a to your computer and use it in GitHub Desktop.
Specs for a course or research project website with Jekyll, Pandoc, Reveal.js, and Tufte-Pandoc
Specs for a course website with Jekyll, Jekyll Scholar, Pandoc, Reveal.js, and
Tufte-Pandoc
Some assumptions:
- Bibliography is at `_bibliography/references.bib` (Jekyll Scholar default)
- Pandoc templates and reference files at `_lib`
- Language-dependent `_metadata.yaml` and `_crossref.yaml` at repo root
- Reveal.js slides `file.md` are exported as `file/index.html` and the
reveal.js submodule is in the same directory as `file/`, wherever that is.
data-dir : "_lib"
fail-if-warnings : false
file-scope : true
self-contained : true
filters:
- pandoc-crossref
- citeproc
reference-links : true
# Call this defaults file from the Jekyll _config.yaml as:
# pandoc:
# extensions:
# - defaults: "_spec/html.yaml"
from : "markdown+tex_math_single_backslash"
data-dir : "_lib"
email-obfuscation: references
fail-if-warnings: false
file-scope : true
filters:
- pandoc-crossref
- citeproc
- pandoc-sidenote
html-math-method:
method: mathjax
metadata-file: "_data/metadata.yaml"
resource-path:
- .
- "_data"
- "_spec"
shift-heading-level-by: 1
toc-depth: 2
# This is very specific and may not work for every case.
# Consider thinning down and, for example, creating a font package.
from : "markdown+raw_tex"
to : "latex"
bibliography : "_data/biblio.yaml"
cite-method : "citeproc"
data-dir : "_lib"
fail-if-warnings: false
file-scope : true
filters:
- pandoc-crossref
- citeproc
metadata-file: "_data/metadata.yaml"
metadata:
secnumdepth : 2
papersize : a4
number-sections : true
pdf-engine : xelatex
standalone : true
template : "_lib/default.latex"
variables:
documentclass : article
fontsize: 12pt
header-includes: |
\usepackage[p,osf]{ebgaramond}
\usepackage{academicons}
\usepackage{multicol}
\setlength{\columnsep}{15pt}
\usepackage{csquotes}
\usepackage[overload]{textcase}
\let\oldsc\textsc
\renewcommand{\textsc}[1]{\oldsc{\MakeLowercase{#1}}}
\usepackage{titling}
\pretitle{\begin{center}\Huge\normalfont}
\posttitle{\end{center}\vspace{2em}}
\usepackage{titlesec,titletoc}
\titleformat{\section}[hang]{\normalfont\Large\itshape}{\thesection}{1em}{}[]
\titleformat{\subsection}[hang]{\normalfont\large\itshape}{}{1em}{}[]
\titleformat{\paragraph}[runin]{\normalfont\scshape}{}{0pt}{}[]
\titlespacing{\paragraph}{0pt}{1em}{0.5ex}
\usepackage{enumitem}
\setlist{font=\normalfont\scshape}
\setlist[itemize,1]{label=$›$}
\usepackage{fancyhdr}
indent: true
papersize: a4
secnumdepth: 2
# This is very specific and may not work for every case.
# Consider thinning down and, for example, creating a font package.
from : "markdown+raw_tex"
to : "latex"
bibliography : "_bibliography/references.bib"
cite-method : "citeproc"
data-dir : "_lib"
fail-if-warnings: false
file-scope : true
filters:
- pandoc-crossref
- citeproc
metadata-file: "_metadata.yaml"
metadata:
secnumdepth : 2
papersize : a4
number-sections : true
pdf-engine : xelatex
resource-path:
- .
- "_csl"
- "_spec"
standalone : true
variables:
documentclass : scrartcl
fontsize: 11pt
header-includes:
- \usepackage{academicons}
- \usepackage{scrletter}
- \usepackage{multicol}
- \setlength{\columnsep}{15pt}
- \usepackage{csquotes}
- \usepackage[overload]{textcase}
- \setkomafont{title}{\sffamily}
- \RedeclareSectionCommand[font={\rmfamily\normalfont\large\scshape\MakeLowercase}]{paragraph}
include-before:
- \let\oldsc\textsc
- \renewcommand{\textsc}[1]{\oldsc{\MakeLowercase{#1}}}
- \setkomafont{backaddress}{\rmfamily}
- \setkomafont{descriptionlabel}{\rmfamily\normalfont}
- \setkomafont{lettersubject}{\rmfamily\normalfont}
- \setkomavar{backaddress}{Pedro P. Palazzo | \textsc{FAU}–UnB | \textsc{ICC} Norte \textsc{ASS}–585/9 | Brasília \textsc{DF} 70910–900}
- \setkomavar{fromname}{Pedro P. Palazzo}
- \setkomavar{fromemail}[]{[email protected] | http://labeurbe.unb.br}
- \setkomavar{fromlogo}{\XeTeXglyph \XeTeXglyphindex "ass_completa_CONT" \relax}
- \setkomavar{fromphone}[]{+55 61 31 07 74 49}
- |
\setkomavar{signature}{%
\\
Pedro P. Palazzo%
}
- |
\setkomavar{fromaddress}{%
Professor Associado (Associate Professor)\\
Laboratório de Estudos da Urbe (LabeUrbe)\\
Faculdade de Arquitetura e Urbanismo%
}
- |
\setkomavar{firstfoot}{%
\small{FAU/THAU/PP/2021}
\hfill
\small{\thepage}
}
polyglossia-otherlangs:
- name: english
- name: french
- name: german
- name: italian
- name: latin
- name: spanish
ccsLabelSep : " – "
tableTemplate: $$t$$
figureTemplate: $$t$$
subfigureTemplate: $$t$$. $$ccs$$
subfigureChildTemplate:
# Assumes the slide presentation will be generated in
# a subfolder and reveal.js is loaded as a submodule at
# the website root.
# Makes use of my css-slides/revealjs.scss gist.
from : "markdown+tex_math_single_backslash"
to : "revealjs"
bibliography : "_data/biblio.yaml"
data-dir : "_lib"
email-obfuscation: references
fail-if-warnings: false
file-scope : true
filters:
- pandoc-crossref
- citeproc
metadata-file : "_data/metadata-revealjs.yaml"
slide-level : 2
standalone : true
toc-depth : 1
variables:
backgroundTransition: 'slide'
controls : true
hash : true
hashOneBasedIndex: true
progress : true
revealjs-url : "../reveal.js"
width : 1920
height : 1080
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment