phd-thesis/build.el
2024-01-16 14:51:35 +01:00

33 lines
1.3 KiB
EmacsLisp
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

;;; build.el --- Build book.pdf non-interactively -*- lexical-binding: t -*-
;;; Commentary:
;;; This is used to build my PhD thesis from scripts (e.g. to create a diffed version).
;;; Code:
(package-initialize)
(require 'org)
(require 'oc-csl)
(require 'ox)
(setq org-latex-classes '(("book"
"\\documentclass[]{scrbook}"
("\\chapter{%s}" . "\\addchap{%s}")
("\\section{%s}" . "\\addsec{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}")))
org-latex-src-block-backend 'minted
org-latex-prefer-user-labels t
org-latex-toc-command "\\frontmatter\n\\addchap{Table of Contents}\n\\label{chap:toc}\n\\listoftoc*{toc}\n\n")
(add-to-list
'org-export-smart-quotes-alist
'("en-gb" (primary-opening :utf-8 "" :html "“" :latex "``" :texinfo "``")
(primary-closing :utf-8 "" :html "”" :latex "''" :texinfo "''")
(secondary-opening :utf-8 "" :html "‘" :latex "`" :texinfo "`")
(secondary-closing :utf-8 "" :html "’" :latex "'" :texinfo "'")
(apostrophe :utf-8 "" :html "’")))
(find-file "book.org")
(org-latex-export-to-latex)
(provide 'build)
;;; build.el ends here