From f3dea30b868a53cb0584342f6609e74ba328fa7d Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Tue, 11 Dec 2018 22:47:58 +0100 Subject: [PATCH] add a minimal config for emacs Otherwise org-ref doesn't work which leads to broken references --- general/thesis.el | 36 ++++++++++++++++++++++++++++++++++++ projekthandbuch/Makefile | 2 +- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 general/thesis.el diff --git a/general/thesis.el b/general/thesis.el new file mode 100644 index 0000000..d5a2f80 --- /dev/null +++ b/general/thesis.el @@ -0,0 +1,36 @@ +;; Added by Package.el. This must come before configurations of +;; installed packages. Don't delete this line. If you don't want it, +;; just comment it out by adding a semicolon to the start of the line. +;; You may delete these explanatory comments. +(package-initialize) +(setq vc-follow-symlinks t);; always follow symlinks + +;; keep customize settings in their own file +(setq custom-file "~/.emacs.d/custom.el") +(when (file-exists-p custom-file) + (load custom-file)) + +(require 'org) + +(add-to-list 'package-archives + '("melpa" . "https://melpa.org/packages/")) +(when (< emacs-major-version 24) + ;; For important compatibility libraries like cl-lib + (add-to-list 'package-archives + '("gnu" . "https://elpa.gnu.org/packages/"))) + +(unless (package-installed-p 'use-package) + (package-refresh-contents) + (package-install 'use-package)) + +(require 'use-package) +(use-package use-package-ensure-system-package + :ensure t) + +(use-package org-ref + :ensure t + :after org + :init + (setq org-ref-completion-library 'org-ref-ivy-cite) + :config + (setq org-ref-default-citation-link "footcite")) diff --git a/projekthandbuch/Makefile b/projekthandbuch/Makefile index 86ca8de..a94b251 100644 --- a/projekthandbuch/Makefile +++ b/projekthandbuch/Makefile @@ -68,5 +68,5 @@ pictures/%.svg: pictures/%.puml java -jar ~/bin/plantuml.jar -tsvg $< projekthandbuch.tex: projekthandbuch.org - emacs -l ~/.emacs.d/init.el --batch \ + emacs -l general/thesis.el --batch \ --eval="(progn (find-file \"projekthandbuch.org\") (org-latex-export-to-latex nil nil nil t))"