diff --git a/config.org b/config.org
index 0d3870f..17b7144 100644
--- a/config.org
+++ b/config.org
@@ -477,7 +477,7 @@ Add a couple of classes for LaTeX export.
'("article-std"
"\\documentclass{article}
[NO-DEFAULT-PACKAGES]
- \\input{$HOME/.emacs.d/header.tex} %$\n% latexbib"
+ \\input{$HOME/.emacs.d/header.tex} %$"
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}")))
@@ -507,11 +507,31 @@ General export settings:
(if (string-equal user-login-name "3055822")
(progn
(setq org-export-with-author nil)
- (setq org-latex-default-class "article-std"))
+ (setq org-latex-default-class "article-std")
+ (defun my/org-export-add-lines (output backend info)
+ "Add custom lines to the exported output."
+ (when (org-export-derived-backend-p backend 'latex)
+ (concat output "\n\n"
+ "%%% Local Variables: \n"
+ "%%% mode: latex\n"
+ "%%% TeX-master: t\n"
+ "%%% End: \n")))
+ (add-to-list 'org-export-filter-final-output-functions
+ 'my/org-export-add-lines))
(if workhours
(progn
(setq org-export-with-author nil)
- (setq org-latex-default-class "article-std"))
+ (setq org-latex-default-class "article-std")
+ (defun my/org-export-add-lines (output backend info)
+ "Add custom lines to the exported output."
+ (when (org-export-derived-backend-p backend 'latex)
+ (concat output "\n\n"
+ "%%% Local Variables: \n"
+ "%%% mode: latex\n"
+ "%%% TeX-master: t\n"
+ "%%% End: \n")))
+ (add-to-list 'org-export-filter-final-output-functions
+ 'my/org-export-add-lines))
(setq org-latex-default-class "memoir")))
(setq org-latex-compiler "xelatex"))
(setq org-html-validation-link nil)
diff --git a/header.tex b/header.tex
index e8bb6d9..10f9938 100644
--- a/header.tex
+++ b/header.tex
@@ -56,7 +56,4 @@
% Other
\usepackage{paralist}
-\usepackage{verbatim}
-
-% uncomment and expand this if there's a bibliography:
-% latexbib
\ No newline at end of file
+\usepackage{verbatim}
\ No newline at end of file
diff --git a/snippets/fundamental-mode/ficcntw b/snippets/fundamental-mode/ficcntw
deleted file mode 100644
index 026fc8a..0000000
--- a/snippets/fundamental-mode/ficcntw
+++ /dev/null
@@ -1,4 +0,0 @@
-# name: chose-not-to-warn
-# key: ficcntw
-# --
- !? $0
\ No newline at end of file
diff --git a/snippets/fundamental-mode/fice b/snippets/fundamental-mode/fice
deleted file mode 100644
index 6f3013c..0000000
--- a/snippets/fundamental-mode/fice
+++ /dev/null
@@ -1,4 +0,0 @@
-# name: explicit
-# key: fice
-# --
- X $0
\ No newline at end of file
diff --git a/snippets/fundamental-mode/ficfemslash b/snippets/fundamental-mode/ficfemslash
deleted file mode 100644
index bd7c2ad..0000000
--- a/snippets/fundamental-mode/ficfemslash
+++ /dev/null
@@ -1,4 +0,0 @@
-# name: femslash
-# key: ficfemslash
-# --
- ♀ $0
\ No newline at end of file
diff --git a/snippets/fundamental-mode/ficg b/snippets/fundamental-mode/ficg
deleted file mode 100644
index 287d46f..0000000
--- a/snippets/fundamental-mode/ficg
+++ /dev/null
@@ -1,4 +0,0 @@
-# name: general
-# key: ficg
-# --
- U $0
\ No newline at end of file
diff --git a/snippets/fundamental-mode/ficgen b/snippets/fundamental-mode/ficgen
deleted file mode 100644
index 33f4c3d..0000000
--- a/snippets/fundamental-mode/ficgen
+++ /dev/null
@@ -1,4 +0,0 @@
-# name: gen
-# key: ficgen
-# --
- ☉ $0
\ No newline at end of file
diff --git a/snippets/fundamental-mode/fichet b/snippets/fundamental-mode/fichet
deleted file mode 100644
index a234690..0000000
--- a/snippets/fundamental-mode/fichet
+++ /dev/null
@@ -1,4 +0,0 @@
-# name: het
-# key: fichet
-# --
- ⚤ $0
\ No newline at end of file
diff --git a/snippets/fundamental-mode/ficm b/snippets/fundamental-mode/ficm
deleted file mode 100644
index 0de86a4..0000000
--- a/snippets/fundamental-mode/ficm
+++ /dev/null
@@ -1,4 +0,0 @@
-# name: mature
-# key: ficm
-# --
- M $0
\ No newline at end of file
diff --git a/snippets/fundamental-mode/ficmulti b/snippets/fundamental-mode/ficmulti
deleted file mode 100644
index b4c93dc..0000000
--- a/snippets/fundamental-mode/ficmulti
+++ /dev/null
@@ -1,4 +0,0 @@
-# name: multi
-# key: ficmulti
-# --
- $0
\ No newline at end of file
diff --git a/snippets/fundamental-mode/ficother b/snippets/fundamental-mode/ficother
deleted file mode 100644
index d146940..0000000
--- a/snippets/fundamental-mode/ficother
+++ /dev/null
@@ -1,4 +0,0 @@
-# name: other
-# key: ficother
-# --
- ☿ $0
\ No newline at end of file
diff --git a/snippets/fundamental-mode/ficpraze b/snippets/fundamental-mode/ficpraze
deleted file mode 100644
index 240e8b1..0000000
--- a/snippets/fundamental-mode/ficpraze
+++ /dev/null
@@ -1,4 +0,0 @@
-# name: fic-hosted-on-praze
-# key: ficpraze
-# --
-https://tre.praze.net/fic/single/$0
\ No newline at end of file
diff --git a/snippets/fundamental-mode/ficslash b/snippets/fundamental-mode/ficslash
deleted file mode 100644
index 6de8bb4..0000000
--- a/snippets/fundamental-mode/ficslash
+++ /dev/null
@@ -1,4 +0,0 @@
-# name: slash
-# key: ficslash
-# --
- ♂ $0
\ No newline at end of file
diff --git a/snippets/fundamental-mode/fict b/snippets/fundamental-mode/fict
deleted file mode 100644
index f95c110..0000000
--- a/snippets/fundamental-mode/fict
+++ /dev/null
@@ -1,4 +0,0 @@
-# name: teen
-# key: fict
-# --
- G $0
\ No newline at end of file
diff --git a/snippets/fundamental-mode/ficwarnings b/snippets/fundamental-mode/ficwarnings
deleted file mode 100644
index ef5686c..0000000
--- a/snippets/fundamental-mode/ficwarnings
+++ /dev/null
@@ -1,4 +0,0 @@
-# name: archive-warnings
-# key: ficwarnings
-# --
- ! $0
\ No newline at end of file
diff --git a/snippets/latex-mode/cent b/snippets/latex-mode/cent
deleted file mode 100644
index bb646ed..0000000
--- a/snippets/latex-mode/cent
+++ /dev/null
@@ -1,6 +0,0 @@
-# name: centre
-# key: cent
-# --
-\begin{center}
-$0
-\end{center}
\ No newline at end of file
diff --git a/snippets/latex-mode/col b/snippets/latex-mode/col
deleted file mode 100644
index 026c629..0000000
--- a/snippets/latex-mode/col
+++ /dev/null
@@ -1,11 +0,0 @@
-# name: twocolumns
-# key: col
-# --
-\begin{columns}
- \begin{column}{0.5\textwidth}
- $0
- \end{column}
- \begin{column}{0.5\textwidth}
-
- \end{column}
-\end{columns}
\ No newline at end of file
diff --git a/snippets/latex-mode/enum b/snippets/latex-mode/enum
deleted file mode 100644
index e3bdcb9..0000000
--- a/snippets/latex-mode/enum
+++ /dev/null
@@ -1,6 +0,0 @@
-# name: enumerate
-# key: enum
-# --
-\begin{enumerate}
-\item $0
-\end{enumerate}
\ No newline at end of file
diff --git a/snippets/latex-mode/fr b/snippets/latex-mode/fr
deleted file mode 100644
index 9757bfe..0000000
--- a/snippets/latex-mode/fr
+++ /dev/null
@@ -1,7 +0,0 @@
-# name: frame
-# key: fr
-# --
-\begin{frame}
- \frametitle{$1}
- $0
-\end{frame}
\ No newline at end of file
diff --git a/snippets/latex-mode/frnt b/snippets/latex-mode/frnt
deleted file mode 100644
index 9c85c75..0000000
--- a/snippets/latex-mode/frnt
+++ /dev/null
@@ -1,6 +0,0 @@
-# name: frame-notitle
-# key: frnt
-# --
-\begin{frame}
- $0
-\end{frame}
\ No newline at end of file
diff --git a/snippets/latex-mode/grh b/snippets/latex-mode/grh
deleted file mode 100644
index 4cf4603..0000000
--- a/snippets/latex-mode/grh
+++ /dev/null
@@ -1,4 +0,0 @@
-# name: graphics-height
-# key: grh
-# --
-\includegraphics[height=0.9\textheight]{$0}
\ No newline at end of file
diff --git a/snippets/latex-mode/grw b/snippets/latex-mode/grw
deleted file mode 100644
index 3f8dbed..0000000
--- a/snippets/latex-mode/grw
+++ /dev/null
@@ -1,4 +0,0 @@
-# name: graphics-width
-# key: grw
-# --
-\includegraphics[width=\textwidth]{$0}
\ No newline at end of file
diff --git a/snippets/latex-mode/hdrs b/snippets/latex-mode/hdrs
deleted file mode 100644
index 9a1624b..0000000
--- a/snippets/latex-mode/hdrs
+++ /dev/null
@@ -1,79 +0,0 @@
-# name: latex-headers
-# key: hdrs
-# --
-\documentclass{article}
-
-% Dimensions
-\usepackage{geometry}
-\geometry{a4paper}
-
-% Text spacing
-\usepackage{microtype}
-% \setlength{\parindent}{0em}
-% \setlength{\parskip}{1em}
-\emergencystretch 3em
-\usepackage{setspace}
-% \doublespacing
-\usepackage[bottom]{footmisc}
-
-% Tables
-\usepackage{float}
-\usepackage{tablefootnote}
-\usepackage{makecell}
-\renewcommand{\cellalign}{cl}
-\usepackage{etoolbox}
-\AtBeginEnvironment{tabular}{\doublespacing}
-\usepackage{array}
-\usepackage{booktabs}
-
-% Links and URLs
-\usepackage[hyphens]{url}
-\usepackage[hidelinks]{hyperref}
-\urlstyle{tt}
-
-% Fonts
-\usepackage{mathspec}
-\setmainfont{TeX Gyre Pagella}
-\setmathfont(Digits){TeX Gyre Pagella Math}
-\setmathfont(Latin,Greek){TeX Gyre Pagella}
-% \newfontfamily\ipatext{Doulos SIL}
-% \DeclareTextFontCommand{\phontrans}{\ipatext} % wrap // and [] in \phontrans
-
-% Typographic tweaks
-\usepackage{csquotes}
-\makeatletter
- \DeclareMathSymbol{0}{\mathalpha}{\eu@DigitsArabic@symfont}{\`0}
- \DeclareMathSymbol{1}{\mathalpha}{\eu@DigitsArabic@symfont}{\`1}
- \DeclareMathSymbol{2}{\mathalpha}{\eu@DigitsArabic@symfont}{\`2}
- \DeclareMathSymbol{3}{\mathalpha}{\eu@DigitsArabic@symfont}{\`3}
- \DeclareMathSymbol{4}{\mathalpha}{\eu@DigitsArabic@symfont}{\`4}
- \DeclareMathSymbol{5}{\mathalpha}{\eu@DigitsArabic@symfont}{\`5}
- \DeclareMathSymbol{6}{\mathalpha}{\eu@DigitsArabic@symfont}{\`6}
- \DeclareMathSymbol{7}{\mathalpha}{\eu@DigitsArabic@symfont}{\`7}
- \DeclareMathSymbol{8}{\mathalpha}{\eu@DigitsArabic@symfont}{\`8}
- \DeclareMathSymbol{9}{\mathalpha}{\eu@DigitsArabic@symfont}{\`9}
-\makeatother
-
-% Language
-\usepackage{polyglossia}
-\setdefaultlanguage[variant=british]{english}
-\setotherlanguages{french} % for some reason this displays footnotes correctly?
-
-% Other
-\usepackage{paralist}
-\usepackage{verbatim}
-
-% uncomment and expand this if there's a bibliography:
-% latexbib
-
-\title{}
-\author{}
-\date{}
-
-\begin{document}
-
-\maketitle
-
-$0
-
-\end{document}
\ No newline at end of file
diff --git a/snippets/latex-mode/it b/snippets/latex-mode/it
deleted file mode 100644
index 49af440..0000000
--- a/snippets/latex-mode/it
+++ /dev/null
@@ -1,4 +0,0 @@
-# name: item
-# key: it
-# --
-\item
\ No newline at end of file
diff --git a/snippets/latex-mode/item b/snippets/latex-mode/item
deleted file mode 100644
index a65b4b7..0000000
--- a/snippets/latex-mode/item
+++ /dev/null
@@ -1,6 +0,0 @@
-# name: itemize
-# key: item
-# --
-\begin{itemize}
-\item $0
-\end{itemize}
\ No newline at end of file
diff --git a/snippets/latex-mode/latexbib b/snippets/latex-mode/latexbib
deleted file mode 100644
index 2fb69d0..0000000
--- a/snippets/latex-mode/latexbib
+++ /dev/null
@@ -1,85 +0,0 @@
-# name: latex-bibsetup
-# key: latexbib
-# --
-%
-\usepackage[style=authoryear-ibid,alldates=long,giveninits=true,dashed=false,labeldate=year,mergedate=maximum,maxbibnames=10,ibidpage=true,uniquename=false]{biblatex}
-
-\renewbibmacro*{volume+number+eid}{ % puts issue number in brackets
- \printfield{volume}
- \printfield{number}
- \setunit{\addcomma\space}
- \printfield{eid}}
-\DeclareFieldFormat[article]{number}{\mkbibparens{#1}}
-
-\renewbibmacro{in:}{ % gets rid of In for journal articles
- \ifentrytype{article}
- {}
- {\printtext{\bibstring{in}\intitlepunct}}}
-
-\DefineBibliographyStrings{english}{ % changes visited on to accessed
-urlseen={Accessed},
-}
-
-\DeclareFieldFormat[article]{pages}{#1} % gets rid of pp. for journal articles
-\DeclareNameAlias{sortname}{family-given} % stops 2nd author being listed first last
-\renewcommand*{\intitlepunct}{\space} % deletes colon after In
-\AtEveryBibitem{\uspunctuation} % fixes full stop placement
-
-\renewcommand*{\postnotedelim}{\addcolon} % replaces p. in text with colons
-\DeclareFieldFormat{postnote}{#1}
-\DeclareFieldFormat{multipostnote}{#1}
-
-\DeclareFieldFormat{origdate}{\mkbibbrackets{#1}} % year first published
-\renewbibmacro*{cite:labeldate+extradate}{%
- \iffieldundef{origyear}
- {}
- {\printorigdate
- \setunit{\addspace}}%
- \iffieldundef{labelyear}
- {}
- {\printtext[bibhyperref]{\printlabeldateextra}}}
-
-\DeclareCiteCommand{\citeorigyear}
- {\boolfalse{citetracker}%
- \boolfalse{pagetracker}%
- \usebibmacro{prenote}}
- {\printfield{origyear}}
- {\multicitedelim}
- {\usebibmacro{postnote}}
-
-\renewbibmacro*{date+extradate}{%
- \iffieldundef{origyear}
- {}
- {\printorigdate
- \setunit{\addspace}}%
- \iffieldundef{labelyear}
- {}
- {\printtext[parens]{%
- \iflabeldateisdate
- {\printdateextra}
- {\printlabeldateextra}}}}
-
-\renewbibmacro*{begentry}{% % adds short author in square brackets where applicable
- \ifnameundef{shortauthor}
- {}
- {\bibopenbracket\printnames{shortauthor}%
- \bibclosebracket\space}}
-
-\DefineBibliographyExtras{english}{% % D M Y format in bibliography
- \protected\def\mkbibdatelong#1#2#3{%
- \iffieldundef{#3}
- {}
- {\stripzeros{\thefield{#3}}%
- \iffieldundef{#2}{}{\nobreakspace}}%
- \iffieldundef{#2}
- {}
- {\mkbibmonth{\thefield{#2}}%
- \iffieldundef{#1}{}{\space}}%
- \stripzeros{\thefield{#1}}}%
-}
-
-\bibliography{`(with-temp-buffer
- (insert-file-contents "~/Documents/drive/admin/emacs/bibpath")
- (buffer-string))`}
-
-$0
\ No newline at end of file
diff --git a/snippets/latex-mode/metro b/snippets/latex-mode/metro
deleted file mode 100644
index b7535c5..0000000
--- a/snippets/latex-mode/metro
+++ /dev/null
@@ -1,31 +0,0 @@
-# name: latex-metropolis
-# key: metro
-# --
-\documentclass{beamer}
-
-\usetheme[numbering=fraction,progressbar=foot]{metropolis}
-\usefonttheme{professionalfonts}
-\usepackage{mathspec}
-\setsansfont[BoldFont={Fira Sans},
-Numbers={OldStyle}]{Fira Sans Light}
-\setmathsfont(Digits)[Numbers={Lining, Proportional}]{Fira Sans Light}
-\metroset{block=fill}
-
-% uncomment and expand this if there's a bibliography:
-% latexbib
-
-\title{$1}
-\author{$2}
-\date{$3}
-
-\begin{document}
-
-\frame{\titlepage}
-
-$0
-
-% \begin{frame}[allowframebreaks]
-% \printbibliography
-% \end{frame}
-
-\end{document}
\ No newline at end of file
diff --git a/snippets/latex-mode/source b/snippets/latex-mode/source
deleted file mode 100644
index cfb9bb3..0000000
--- a/snippets/latex-mode/source
+++ /dev/null
@@ -1,6 +0,0 @@
-# name: source
-# key: source
-# --
-\begin{flushright}
- \scriptsize\cite[$2]{$1}
-\end{flushright}$0
\ No newline at end of file
diff --git a/snippets/org-mode/article b/snippets/org-mode/article
new file mode 100644
index 0000000..b09de6e
--- /dev/null
+++ b/snippets/org-mode/article
@@ -0,0 +1,10 @@
+# name: article
+# key: article
+# --
+#+TITLE: ${1}
+#+LATEX_HEADER: \input{\$HOME/Documents/drive/admin/emacs/latexbib.tex} %\$
+
+$0
+
+@@latex:\printbibliography[title=References]@@
+
diff --git a/snippets/org-mode/artsec b/snippets/org-mode/artsec
new file mode 100644
index 0000000..e770d89
--- /dev/null
+++ b/snippets/org-mode/artsec
@@ -0,0 +1,8 @@
+# name: artsec
+# key: artsec
+# --
+
+* ${1:Section title}
+** plan :noexport:
+$0
+** text :ignore:
diff --git a/snippets/org-mode/ficlink b/snippets/org-mode/ficlink
deleted file mode 100644
index 45b453a..0000000
--- a/snippets/org-mode/ficlink
+++ /dev/null
@@ -1,4 +0,0 @@
-# name: fanfiction-link
-# key: ficlink
-# --
-@@html:$2$3 $4
@@$0
\ No newline at end of file
diff --git a/snippets/fundamental-mode/apostrophe b/snippets/text-mode/apostrophe
similarity index 100%
rename from snippets/fundamental-mode/apostrophe
rename to snippets/text-mode/apostrophe
diff --git a/snippets/text-mode/oe b/snippets/text-mode/oe
new file mode 100644
index 0000000..23c7e43
--- /dev/null
+++ b/snippets/text-mode/oe
@@ -0,0 +1,5 @@
+# -*- mode: snippet -*-
+# name: oe
+# key: oe
+# --
+œ
\ No newline at end of file
diff --git a/snippets/web-mode/bbox b/snippets/web-mode/bbox
deleted file mode 100644
index dc3e2a7..0000000
--- a/snippets/web-mode/bbox
+++ /dev/null
@@ -1,8 +0,0 @@
-# name: border-box
-# key: bbox
-# --
-*, *::before, *::after {
- box-sizing: border-box;
-}
-
-$0
\ No newline at end of file
diff --git a/snippets/web-mode/ficlink b/snippets/web-mode/ficlink
deleted file mode 100644
index c86883a..0000000
--- a/snippets/web-mode/ficlink
+++ /dev/null
@@ -1,4 +0,0 @@
-# name: fanfiction-link
-# key: ficlink
-# --
-$2$3 $4
$0
\ No newline at end of file