-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.el
124 lines (107 loc) · 4.68 KB
/
init.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
(server-start)
; Maple editing mode
(autoload 'maplev-mode "maplev" "Maple editing mode" t)
(setq
auto-mode-alist (cons (cons (concat "\\." (regexp-opt '("mpl" "tst" "mm" "mi" "input") t)
"$")
'maplev-mode)
auto-mode-alist)
maplev-copyright-owner "Behzad Samadi" ; this is for applying copyrights to Maple code you create
maplev-default-release "17"
maplev-executable-alist
'(
("17" . ("/home/bsamadi/maple17/bin/maple" nil "/home/bsamadi/maple17/bin/mint")))
maplev-mint-query nil
maplev-description-quote-char ?\"
)
; Frame
(setq default-frame-alist (append (list
'(width . 100) ; Width set to 100 characters
'(height . 57)) ; Height set to 57 lines
default-frame-alist))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(default ((t (:foreground "white" :background "DarkSlateGray"))))
'(font-lock-comment-face ((t (:foreground "green2"))))
'(font-lock-doc-string-face ((t (:foreground "Coral"))) t)
'(font-lock-function-name-face ((t (:foreground "yellow"))))
'(font-lock-keyword-face ((t (:foreground "aquamarine"))))
'(font-lock-preprocessor-face ((t (:italic nil :foreground "CornFlowerBlue"))))
'(font-lock-reference-face ((t (:foreground "DodgerBlue"))))
'(font-lock-string-face ((t (:foreground "Coral"))))
'(font-lock-type-face ((t (:foreground "#9290ff"))))
'(font-lock-variable-name-face ((t (:foreground "orange"))))
'(isearch ((t (:foreground "black" :background "yellow"))))
'(list-mode-item-selected ((t (:background "gray68"))) t)
'(paren-match ((t (:background "darkseagreen4"))) t)
'(show-paren-match-face ((((class color)) (:foreground "black" :background "yellow"))) t)
'(show-paren-mismatch-face ((((class color)) (:foreground "white" :background "red"))) t)
'(widget-field-face ((((class grayscale color) (background light)) (:background "DarkBlue"))) t))
;; to set the cursor color
(set-cursor-color "green")
; AUCTeX
(package-initialize)
(require 'tex)
; Org Mode
(find-file "/host/Behzad/notes.org")
(setq-default TeX-master t)
;; Org Model and RefTeX
(defun org-mode-reftex-search ()
;;jump to the notes for the paper pointed to at from reftex search
(interactive)
(org-open-link-from-string (format "[[notes:%s]]" (reftex-citation t))))
(defun org-mode-reftex-setup ()
(load-library "reftex")
(and (buffer-file-name) (file-exists-p (buffer-file-name))
(progn
;enable auto-revert-mode to update reftex when bibtex file changes on disk
(global-auto-revert-mode t)
(reftex-parse-all)
;add a custom reftex cite format to insert links
(reftex-set-cite-format
'((?b . "[[bib:%l][%l-bib]]")
(?p . "[[papers:%l][%l-paper]]")
(?n . "** %t\n:PROPERTIES:\n:Custom_ID: %l\n:END:\t[[papers:%l][%l-paper]]\t[[bib:%l][%l-bib]]\t[[biblist:%l][%l-biblist]]")
(?t . "%t")
(?h . "** %t\n:PROPERTIES:\n:Custom_ID: %l\n:END:\n[[papers:%l][%l-paper]]\t[[bib:%l][%l-bib]]\t[[notes:%l][%l-note]]")))))
(define-key org-mode-map (kbd "C-c )") 'reftex-citation)
(define-key org-mode-map (kbd "C-c (") 'org-mode-reftex-search))
(add-hook 'org-mode-hook 'org-mode-reftex-setup)
;; Org Model and LaTeX
(unless (boundp 'org-latex-classes)
(setq org-latex-classes nil))
;;; article
(add-to-list 'org-latex-classes
'("article"
"\\documentclass{article}
[NO-DEFAULT-PACKAGES]"
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
)
;;; amsbook
(add-to-list 'org-latex-classes
'("amsbook"
"\\documentclass{amsbook}
[NO-DEFAULT-PACKAGES]"
("\\chapter{%s}" . "\\chapter*{%s}")
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
)
(setq org-latex-pdf-process
'("pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"
"bibtex %b"
"pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"
"pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"))
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(TeX-PDF-mode t)
'(cua-mode t nil (cua-base))
'(inhibit-startup-screen t))