Skip to content

Instantly share code, notes, and snippets.

% Options for packages loaded elsewhere
\PassOptionsToPackage{unicode}{hyperref}
\PassOptionsToPackage{hyphens}{url}
\documentclass[
ignorenonframetext,
]{beamer}
\newif\ifbibliography
\usepackage{pgfpages}
\setbeamertemplate{caption}[numbered]
\setbeamertemplate{caption label separator}{: }
@twsh
twsh / letter.latex
Last active October 10, 2024 22:01
Pandoc template for a letter with the LaTeX letter class
$-- Template for letters, targeting Pandoc 3.1.3
% Options for packages loaded elsewhere
\PassOptionsToPackage{unicode$for(hyperrefoptions)$,$hyperrefoptions$$endfor$}{hyperref}
\PassOptionsToPackage{hyphens}{url}
$if(colorlinks)$
\PassOptionsToPackage{dvipsnames,svgnames,x11names}{xcolor}
$endif$
$if(CJKmainfont)$
\PassOptionsToPackage{space}{xeCJK}
$endif$
@twsh
twsh / scrlttr2.latex
Created June 6, 2024 12:30
The template from https://github.com/JensErat/pandoc-scrlttr2 updated for Pandoc 3.1.3
% Options for packages loaded elsewhere
\PassOptionsToPackage{unicode$for(hyperrefoptions)$,$hyperrefoptions$$endfor$}{hyperref}
\PassOptionsToPackage{hyphens}{url}
$if(colorlinks)$
\PassOptionsToPackage{dvipsnames,svgnames,x11names}{xcolor}
$endif$
$if(CJKmainfont)$
\PassOptionsToPackage{space}{xeCJK}
$endif$
%
@twsh
twsh / scrlttr2.latex
Created June 15, 2023 15:44
The template from https://github.com/JensErat/pandoc-scrlttr2 updated for Pandoc 2.17.1.1
% Options for packages loaded elsewhere
\PassOptionsToPackage{unicode$for(hyperrefoptions)$,$hyperrefoptions$$endfor$}{hyperref}
\PassOptionsToPackage{hyphens}{url}
$if(colorlinks)$
\PassOptionsToPackage{dvipsnames,svgnames,x11names}{xcolor}
$endif$
$if(CJKmainfont)$
\PassOptionsToPackage{space}{xeCJK}
$endif$
%
import re
import sys
# open and read the first argument
with open(sys.argv[1], "r") as in_file:
bibliography = in_file.read()
# Make sets of the citekeys found in the file, and of the entries
# The self_keys regex matches an upper or lower case cite, citep, citeyear, citeauthor,
# citeyearpar, and then anything between that and the first bracket