Skip to content

Instantly share code, notes, and snippets.

View gtuckerkellogg's full-sized avatar

Greg Tucker-Kellogg gtuckerkellogg

View GitHub Profile
\documentclass[a4paper,10pt]{article}
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage {ifluatex}
\ifluatex
\usepackage {fontspec}
\fi
\usepackage[letterspace=500]{microtype}
\begin{document}
\begin{minipage}{3.7cm}
(setq org-latex-classes
`(("memoir-article"
(,@ (concat "\\documentclass[11pt,article,oneside,a4paper,x11names]{memoir}\n"
"% -- DEFAULT PACKAGES \n[DEFAULT-PACKAGES]\n"
"% -- PACKAGES \n[PACKAGES]\n"
"% -- EXTRA \n[EXTRA]\n"
"\\counterwithout{section}{chapter}\n"
))
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")

(defun my/org-export-ignoreheadings-hook (backend) “My backend aware export preprocess hook.” (save-excursion (let* ((tag “ignoreheading”)) (org-map-entries (lambda () (delete-region (point-at-bol) (point-at-eol))) (concat “:” tag “:”))) ))

(setq org-export-before-processing-hook ‘my/org-export-ignoreheadings-hook)

(org-add-link-type “TERM” nil (lambda (path desc format) (cond ((eq format ‘html) path ) ((eq format ‘latex) (format “%s\nomenclature{%s}{%s}” desc path desc)))))

@gtuckerkellogg
gtuckerkellogg / List of abbrevs in NUS thesis
Last active November 15, 2016 22:34
List of abbreviations in NUS thesis
%% If you want to include a list of abbreviations, uncomment the
%% following and put it somewhere in your preamble, like thesis-settings.tex.
\makeatletter
\@ifpackageloaded{nomencl}{}{\RequirePackage[refpage]{nomencl}}
\renewcommand{\nomname}{List of Abbreviations}
\makenomenclature%
\renewcommand{\pagedeclaration}[1]{~(page~#1)}
\makeatother
@gtuckerkellogg
gtuckerkellogg / *Org Src gtk.el
Last active November 15, 2016 22:33
Org mode caption export filter
(defun my-org-beamer-caption (contents backend info)
"Org export filter to allow use of #+CAPTION: keywords in
beamer org export, by removing floats using the \\captionof*
macro. Requires use of the caption package "
(when (eq backend 'beamer)
(replace-regexp-in-string
"\\\\caption\{" "\\\\captionof*{figure}{"
(replace-regexp-in-string
"\\\\end\{figure\}" "%"
(replace-regexp-in-string "\\\\begin\{figure\}" "%" contents)))))
(defn svg-cell [] [:rect {:x 20 :y 20 :width 50 :height 40 :fill "black"}]
#_[:g
[:text {:text-anchor "middle" :alignment-baseline "middle"
:x 25 :y 20 :font-size 20 :font-family "Verdana" :fill
"black" } "fo"]
])
@gtuckerkellogg
gtuckerkellogg / hunspell problem
Created November 22, 2016 07:39
hunspell throws errors when combining en_GB and en_MED
gtk@gtk-office
[~] hunspell -d en_US
Hunspell 1.3.3
adenocarcinoma
& adenocarcinoma 5 0: carcinoma, carcinogenic, carcinogen, architectonics, taxonomically
gtk@gtk-office
[~] hunspell -d en_US,en_MED
Hunspell 1.3.3
@gtuckerkellogg
gtuckerkellogg / patchwork-magick.R
Last active February 13, 2019 09:31
a patchwork of images and ggplot output
if (!('patchwork' %in% rownames(installed.packages()))) {
devtools::install_github('thomasp85/patchwork')
}
if (!('magick' %in% rownames(installed.packages()))) {
install.packages('magick')
}
if (!('cowplot' %in% rownames(installed.packages()))) {

My sister Louise Kellogg was a leading geophysicist specialising in geodynamics: the study of how movement deep in the interior of the earth drives surface phenomena like the movement of the crust via plate tectonics. She discovered new structures deep in the earth's mantle, new connections between geophysics and geochemistry, and consequences of deep earth phenomena evident at the earth's surface. She built rich and useful mathematical and computational models to interrogate geodynamic processes. She was also devoted to equity and inclusion at all levels of science, and led by example. A very incomplete picture of her scientific contributions is on her Wikipedia page, her faculty page at UC Davis is here, a memorial page is here, and collected remembrances are here.

Louise occasiona