summaryrefslogtreecommitdiffstats
path: root/init.el
diff options
context:
space:
mode:
Diffstat (limited to 'init.el')
-rw-r--r--init.el75
1 files changed, 74 insertions, 1 deletions
diff --git a/init.el b/init.el
index 671988d..dfb226a 100644
--- a/init.el
+++ b/init.el
@@ -1224,7 +1224,9 @@ https://yannherklotz.com"))
(merlin-command "ocamlmerlin"))
(use-package citeproc
- :ensure t)
+ :ensure t
+ :custom
+ (org-cite-csl-styles-dir (expand-file-name "styles" "~/projects")))
(use-package org-super-agenda
:ensure t
@@ -1285,6 +1287,77 @@ https://yannherklotz.com"))
(use-package lua-mode
:ensure t)
+(use-package ox-context
+ :init
+ (unless (package-installed-p 'ox-context)
+ (package-install-file (expand-file-name "packages/ox-context" user-emacs-directory)))
+ :config
+ (add-to-list 'org-context-snippets-alist '("ymh-abstract" . "\\definestartstop
+ [abstract]
+ [before={\\midaligned{\\bf Abstract}
+ \\startnarrower[2*middle]},
+ after={\\stopnarrower
+ \\blank[big]}]"))
+ (add-to-list 'org-context-snippets-alist '("ymh-colours" . "\\definecolor[red] [darkred]
+\\definecolor[green] [darkgreen]
+\\definecolor[blue] [darkblue]
+\\definecolor[yellow] [darkyellow]
+\\definecolor[magenta][darkmagenta]
+\\definecolor[cyan] [darkcyan]
+
+\\definecolor[maincolor] [darkcyan]
+\\definecolor[extracolor][darkmagenta]
+
+\\setuptyping
+ [color=extracolor]
+\\setuptype
+ [color=extracolor]
+
+\\setuphead [chapter] [color=maincolor]
+\\setuphead [section] [color=maincolor]
+\\setuphead [subsection] [color=maincolor]
+\\setuphead [subsubsection][color=maincolor]"))
+ (add-to-list 'org-context-snippets-alist '("ymh-fonts" . "\\definefontfeature[default]
+ [mode=node,kern=yes,
+ liga=yes,tlig=yes,dlig=yes,hlig=no,calt=yes,
+ ccmp=yes,language=dflt,
+ protrusion=quality,
+ expansion=quality]
+
+%\\definefontfeature[default][default][protrusion=quality,expansion=quality]
+\\setupalign[hz,hanging,lesshyphenation,verytolerant]
+\\setupbodyfont[libertinus,12pt]"))
+ (add-to-list 'org-context-snippets-alist '("ymh-bib" . "\\usebtxdefinitions[aps]
+\\setupbtx[default:cite][alternative=authoryear]"))
+ (add-to-list 'org-context-snippets-alist '("ymh-interaction" . "\\setupinteraction[
+ color=maincolor,
+ contrastcolor=maincolor,
+ openaction=ToggleViewer,
+ focus=height,
+ click=yes,
+ style=\\rm,
+]"))
+ (add-to-list 'org-context-snippets-alist '("ymh-titleframed" . "\\defineframed
+ [titlepageframed]
+ [frame=off,align=middle]"))
+ (add-to-list 'org-context-snippets-alist '("ymh-first-noheader" . "\\definelayout[1][header=0px]
+\\definelayout[2][reset]"))
+ (add-to-list 'org-context-inner-templates-alist '("ymh-article" . "\\startalignment[middle]
+ \\dontleavehmode \\titlepageframed[foregroundstyle=\\ss\\bfd\\setupinterlinespace]
+ {\\documentvariable{metadata:title}} \\par
+ \\dontleavehmode \\titlepageframed[foregroundstyle=\\ss\\rmb\\setupinterlinespace]
+ {\\documentvariable{metadata:author}} \\par
+\\stopalignment
+
+%t
+%f
+%c
+%a
+%i
+%b
+%o"))
+ (add-to-list 'org-context-presets-alist '("ymh-article" . (:literal "\\usemodule[art-01]" :template "ymh-article" :snippets ("ymh-abstract" "ymh-colours" "ymh-fonts" "ymh-bib" "ymh-interaction" "ymh-titleframed" "ymh-first-noheader")))))
+
(setq gc-cons-threshold (* 1024 1024 10))
(setq custom-file (expand-file-name "custom.el" user-emacs-directory))