mirror of
https://github.com/willemml/dotfiles.nix.git
synced 2025-04-15 04:37:21 +00:00
gnuplot
This commit is contained in:
parent
b17429a47e
commit
b50199a4e9
1 changed files with 214 additions and 178 deletions
152
emacs.nix
152
emacs.nix
|
@ -396,23 +396,23 @@ in {
|
||||||
'';
|
'';
|
||||||
init = ''
|
init = ''
|
||||||
; -*-emacs-lisp-*-
|
; -*-emacs-lisp-*-
|
||||||
(defvar my/org-dir "~/Documents/org/")
|
(defvar my/org-dir "~/Documents/org/")
|
||||||
|
|
||||||
(require 'oc)
|
(require 'oc)
|
||||||
(require 'oc-basic)
|
(require 'oc-basic)
|
||||||
(require 'oc-csl)
|
(require 'oc-csl)
|
||||||
(require 'oc-natbib)
|
(require 'oc-natbib)
|
||||||
(require 'ox-latex)
|
(require 'ox-latex)
|
||||||
|
|
||||||
(setq org-src-window-setup 'current-window)
|
(setq org-src-window-setup 'current-window)
|
||||||
(setq org-confirm-babel-evaluate nil)
|
(setq org-confirm-babel-evaluate nil)
|
||||||
(setq org-src-fontify-natively t)
|
(setq org-src-fontify-natively t)
|
||||||
(setq org-src-tab-acts-natively t)
|
(setq org-src-tab-acts-natively t)
|
||||||
(setq org-src-preserve-indentation t)
|
(setq org-src-preserve-indentation t)
|
||||||
|
|
||||||
(setq org-export-with-tags nil)
|
(setq org-export-with-tags nil)
|
||||||
|
|
||||||
(setq org-publish-project-alist
|
(setq org-publish-project-alist
|
||||||
'(("root"
|
'(("root"
|
||||||
:base-directory (expand-file-name my/org-dir)
|
:base-directory (expand-file-name my/org-dir)
|
||||||
:publishing-function org-html-publish-to-html
|
:publishing-function org-html-publish-to-html
|
||||||
|
@ -424,39 +424,39 @@ in {
|
||||||
:with-toc t
|
:with-toc t
|
||||||
:time-stamp-file nil)))
|
:time-stamp-file nil)))
|
||||||
|
|
||||||
;; Configure HTML export
|
;; Configure HTML export
|
||||||
(setq org-html-validation-link nil)
|
(setq org-html-validation-link nil)
|
||||||
(setq org-html-head-include-scripts nil)
|
(setq org-html-head-include-scripts nil)
|
||||||
(setq org-html-head-include-default-style nil)
|
(setq org-html-head-include-default-style nil)
|
||||||
(setq org-html-head "<link rel=\"stylesheet\" href=\"https://cdn.simplecss.org/simple.min.css\" />")
|
(setq org-html-head "<link rel=\"stylesheet\" href=\"https://cdn.simplecss.org/simple.min.css\" />")
|
||||||
(setq org-html-section)
|
(setq org-html-section)
|
||||||
|
|
||||||
(setq bibtex-completion-notes-path (expand-file-name "notes.org" my/org-dir))
|
(setq bibtex-completion-notes-path (expand-file-name "notes.org" my/org-dir))
|
||||||
|
|
||||||
(setq org-cite-global-bibliography '("~/Documents/org/zotero.bib"))
|
(setq org-cite-global-bibliography '("~/Documents/org/zotero.bib"))
|
||||||
|
|
||||||
(setq org-cite-export-processors '((t basic)))
|
(setq org-cite-export-processors '((t basic)))
|
||||||
|
|
||||||
(setq org-cite-follow-processor 'ivy-bibtex-org-cite-follow)
|
(setq org-cite-follow-processor 'ivy-bibtex-org-cite-follow)
|
||||||
|
|
||||||
(setq org-cite-csl-styles-dir "~/Zotero/styles")
|
(setq org-cite-csl-styles-dir "~/Zotero/styles")
|
||||||
|
|
||||||
(setq bibtex-completion-pdf-open-function
|
(setq bibtex-completion-pdf-open-function
|
||||||
(lambda (fpath)
|
(lambda (fpath)
|
||||||
(call-process "open" nil 0 nil "-a" "/Applications/Preview.app" fpath)))
|
(call-process "open" nil 0 nil "-a" "/Applications/Preview.app" fpath)))
|
||||||
|
|
||||||
(defun org-export-latex-no-toc (depth)
|
(defun org-export-latex-no-toc (depth)
|
||||||
(when depth
|
(when depth
|
||||||
(format "%% Org-mode is exporting headings to %s levels.\n"
|
(format "%% Org-mode is exporting headings to %s levels.\n"
|
||||||
depth)))
|
depth)))
|
||||||
(setq org-export-latex-format-toc-function 'org-export-latex-no-toc)
|
(setq org-export-latex-format-toc-function 'org-export-latex-no-toc)
|
||||||
|
|
||||||
(setq org-latex-pdf-process
|
(setq org-latex-pdf-process
|
||||||
'("latexmk -pdflatex='pdflatex -interaction nonstopmode' -pdf -bibtex -f %f"))
|
'("latexmk -pdflatex='pdflatex -interaction nonstopmode' -pdf -bibtex -f %f"))
|
||||||
|
|
||||||
(add-to-list 'exec-path "/Users/willem/.nix-profile/bin")
|
(add-to-list 'exec-path "/Users/willem/.nix-profile/bin")
|
||||||
|
|
||||||
(add-to-list 'org-latex-classes
|
(add-to-list 'org-latex-classes
|
||||||
'("apa6"
|
'("apa6"
|
||||||
"\\documentclass{apa6}"
|
"\\documentclass{apa6}"
|
||||||
("\\section{%s}" . "\\section*{%s}")
|
("\\section{%s}" . "\\section*{%s}")
|
||||||
|
@ -465,7 +465,7 @@ in {
|
||||||
("\\paragraph{%s}" . "\\paragraph*{%s}")
|
("\\paragraph{%s}" . "\\paragraph*{%s}")
|
||||||
("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
|
("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
|
||||||
|
|
||||||
(add-to-list 'org-latex-classes
|
(add-to-list 'org-latex-classes
|
||||||
'("mla"
|
'("mla"
|
||||||
"\\documentclass{mla}"
|
"\\documentclass{mla}"
|
||||||
("\\section{%s}" . "\\section*{%s}")
|
("\\section{%s}" . "\\section*{%s}")
|
||||||
|
@ -495,6 +495,21 @@ in {
|
||||||
|
|
||||||
htmlize.enable = true;
|
htmlize.enable = true;
|
||||||
|
|
||||||
|
gnuplot = {
|
||||||
|
enable = true;
|
||||||
|
init = ''
|
||||||
|
(require 'gnuplot)
|
||||||
|
|
||||||
|
(autoload 'gnuplot-mode "gnuplot" "Gnuplot major mode" t)
|
||||||
|
(autoload 'gnuplot-make-buffer "gnuplot" "open a buffer in gnuplot-mode" t)
|
||||||
|
(setq auto-mode-alist (append '(("\\.gp$" . gnuplot-mode)) auto-mode-alist))
|
||||||
|
|
||||||
|
(require 'gnuplot-context)
|
||||||
|
'';
|
||||||
|
|
||||||
|
extraPackages = [ pkgs.gnuplot ];
|
||||||
|
};
|
||||||
|
|
||||||
org-contrib.enable = true;
|
org-contrib.enable = true;
|
||||||
|
|
||||||
plantuml-mode = {
|
plantuml-mode = {
|
||||||
|
@ -534,6 +549,11 @@ in {
|
||||||
after = [ "org" ];
|
after = [ "org" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ob-gnuplot = {
|
||||||
|
enable = true;
|
||||||
|
after = [ "org" ];
|
||||||
|
};
|
||||||
|
|
||||||
ob-matlab = {
|
ob-matlab = {
|
||||||
enable = true;
|
enable = true;
|
||||||
after = [ "org" ];
|
after = [ "org" ];
|
||||||
|
@ -541,9 +561,9 @@ in {
|
||||||
init = ''
|
init = ''
|
||||||
; -*-emacs-lisp-*-
|
; -*-emacs-lisp-*-
|
||||||
|
|
||||||
(setq org-babel-octave-shell-command "${pkgs.octave}/bin/octave -q")
|
(setq org-babel-octave-shell-command "${pkgs.octave}/bin/octave -q")
|
||||||
(setq org-babel-matlab-shell-command "~/Applications/MATLAB_R2022b.app/bin/matlab -nosplash")
|
(setq org-babel-matlab-shell-command "~/Applications/MATLAB_R2022b.app/bin/matlab -nosplash")
|
||||||
'';
|
'';
|
||||||
|
|
||||||
extraPackages = [ pkgs.octave pkgs.texinfo4 ];
|
extraPackages = [ pkgs.octave pkgs.texinfo4 ];
|
||||||
};
|
};
|
||||||
|
@ -566,23 +586,39 @@ in {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
auctex = {
|
latex = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
package = epkgs: epkgs.auctex;
|
||||||
|
hook = [''
|
||||||
|
(LaTeX-mode
|
||||||
|
. (lambda ()
|
||||||
|
(turn-on-reftex)))
|
||||||
|
''];
|
||||||
init = ''
|
init = ''
|
||||||
; -*-emacs-lisp-*-
|
(setq TeX-PDF-mode t
|
||||||
(setq TeX-auto-save t)
|
TeX-auto-save t
|
||||||
(setq TeX-parse-self t)
|
TeX-parse-self t)
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
company-math = {
|
company-math = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
after = [ "company" ];
|
||||||
|
|
||||||
init = ''
|
init = ''
|
||||||
; -*-emacs-lisp-*-
|
; -*-emacs-lisp-*-
|
||||||
(add-to-list 'company-backends 'company-math-symbols-unicode)
|
(add-to-list 'company-backends 'company-math-symbols-unicode)
|
||||||
'';
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
cdlatex = {
|
||||||
|
enable = true;
|
||||||
|
after = [ "latex" ];
|
||||||
|
init = ''
|
||||||
|
(add-hook 'LaTeX-mode-hook #'turn-on-cdlatex)
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
org-download = {
|
org-download = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -602,15 +638,15 @@ in {
|
||||||
enable = true;
|
enable = true;
|
||||||
init = ''
|
init = ''
|
||||||
; -*-emacs-lisp-*-
|
; -*-emacs-lisp-*-
|
||||||
;; ivy-bibtex requires ivy's `ivy--regex-ignore-order` regex builder, which
|
;; ivy-bibtex requires ivy's `ivy--regex-ignore-order` regex builder, which
|
||||||
;; ignores the order of regexp tokens when searching for matching candidates.
|
;; ignores the order of regexp tokens when searching for matching candidates.
|
||||||
(setq ivy-re-builders-alist
|
(setq ivy-re-builders-alist
|
||||||
'((ivy-bibtex . ivy--regex-ignore-order)
|
'((ivy-bibtex . ivy--regex-ignore-order)
|
||||||
(t . ivy--regex-plus)))
|
(t . ivy--regex-plus)))
|
||||||
|
|
||||||
(setq ivy-bibtex-bibliography '("~/Documents/org/zotero.bib"))
|
(setq ivy-bibtex-bibliography '("~/Documents/org/zotero.bib"))
|
||||||
(setq reftex-default-bibliography '("~/Documents/org/zotero.bib"))
|
(setq reftex-default-bibliography '("~/Documents/org/zotero.bib"))
|
||||||
(setq bibtex-completion-pdf-field "file")
|
(setq bibtex-completion-pdf-field "file")
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -619,16 +655,16 @@ in {
|
||||||
|
|
||||||
init = ''
|
init = ''
|
||||||
; -*-emacs-lisp-*-
|
; -*-emacs-lisp-*-
|
||||||
(setq org-ref-insert-cite-function
|
(setq org-ref-insert-cite-function
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(org-cite-insert nil)))
|
(org-cite-insert nil)))
|
||||||
|
|
||||||
(setq org-ref-default-bibliography "~/Documents/org/zotero.bib")
|
(setq org-ref-default-bibliography "~/Documents/org/zotero.bib")
|
||||||
|
|
||||||
(setq bibtex-completion-bibliography '("~/Documents/org/zotero.bib"))
|
(setq bibtex-completion-bibliography '("~/Documents/org/zotero.bib"))
|
||||||
|
|
||||||
(require 'org-ref)
|
(require 'org-ref)
|
||||||
(require 'org-ref-ivy)
|
(require 'org-ref-ivy)
|
||||||
'';
|
'';
|
||||||
|
|
||||||
bindLocal.org-mode-map = { "C-c ]" = "org-ref-insert-link"; };
|
bindLocal.org-mode-map = { "C-c ]" = "org-ref-insert-link"; };
|
||||||
|
@ -641,9 +677,9 @@ in {
|
||||||
|
|
||||||
init = ''
|
init = ''
|
||||||
; -*-emacs-lisp-*-
|
; -*-emacs-lisp-*-
|
||||||
(setq-default pdf-view-display-size 'fit-width)
|
(setq-default pdf-view-display-size 'fit-width)
|
||||||
|
|
||||||
(setq pdf-annot-activate-created-annotations t)
|
(setq pdf-annot-activate-created-annotations t)
|
||||||
'';
|
'';
|
||||||
|
|
||||||
extraPackages = [ pkgs.poppler pkgs.automake ];
|
extraPackages = [ pkgs.poppler pkgs.automake ];
|
||||||
|
@ -679,10 +715,10 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
meow = {
|
meow = {
|
||||||
enable = true;
|
enable = false;
|
||||||
init = ''
|
init = ''
|
||||||
; -*-emacs-lisp-*-
|
; -*-emacs-lisp-*-
|
||||||
(defun meow-setup ()
|
(defun meow-setup ()
|
||||||
(setq meow-cheatsheet-layout meow-cheatsheet-layout-colemak)
|
(setq meow-cheatsheet-layout meow-cheatsheet-layout-colemak)
|
||||||
(meow-motion-overwrite-define-key
|
(meow-motion-overwrite-define-key
|
||||||
;; Use e to move up, n to move down.
|
;; Use e to move up, n to move down.
|
||||||
|
@ -764,7 +800,7 @@ in {
|
||||||
'("'" . repeat)
|
'("'" . repeat)
|
||||||
'("<escape>" . ignore)))
|
'("<escape>" . ignore)))
|
||||||
|
|
||||||
(meow-setup)
|
(meow-setup)
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue