rc

Add font back to init.el

Author
Maarten Vangeneugden
Date
Sept. 15, 2024, 2:48 p.m.
Hash
6e9bcb8f2a30814fe1e1409aa5ef202808ab2517
Parent
d93eb8152afaa2ecd6b361c6b887a0531d272e4f
Modified file
init.el

init.el

5 additions and 3 deletions.

View changes Hide changes
1
1
;; Copyright © 2018-2022 Maarten Vangeneugden
2
2
;; Author: Maarten Vangeneugden <contact_me@maartenv.be>
3
3
;; URL: https://maartenv.be
4
4
;;
5
5
;; Welcome to Ghent Emacs.
6
6
;;
7
7
;; This is the configuration file for Ghent Emacs, a GNU Emacs derivative
8
8
;; developed in the city of Ghent, Belgium, by a student of Engineering
9
9
;; Informatics at Ghent University.
10
10
;;
11
11
;; License: GPLv3+
12
12
13
13
;; USAGE:
14
14
;; This configuration file uses the use-package declaration, that means the
15
15
;; settings are a bit different from what you'd normally do in a GNU Emacs
16
16
;; init.el file. Consult https://github.com/jwiegley/use-package for info on how
17
17
;; to correctly write package configuration.
18
18
19
19
(eval-when-compile
20
20
  (require 'use-package))
21
21
;(require 'diminish)                ;; if you use :diminish
22
22
(require 'bind-key)                ;; if you use any :bind variant
23
23
24
24
(custom-set-variables
25
25
 ;; custom-set-variables was added by Custom.
26
26
 ;; If you edit it by hand, you could mess it up, so be careful.
27
27
 ;; Your init file should contain only one such instance.
28
28
 ;; If there is more than one, they won't work right.
29
29
 '(custom-safe-themes
30
30
   '("763bf89898a06b03f7b65fbc29857a1c292e4350246093702fdbd6c4e46e2cf0" "78e6be576f4a526d212d5f9a8798e5706990216e9be10174e3f3b015b8662e27" "d9646b131c4aa37f01f909fbdd5a9099389518eb68f25277ed19ba99adeb7279" "8b58ef2d23b6d164988a607ee153fd2fa35ee33efc394281b1028c2797ddeebb" "f9aede508e587fe21bcfc0a85e1ec7d27312d9587e686a6f5afdbb0d220eab50" "83ae405e25a0a81f2840bfe5daf481f74df0ddb687f317b5e005aa61261126e9" "c433c87bd4b64b8ba9890e8ed64597ea0f8eb0396f4c9a9e01bd20a04d15d358" "a24c5b3c12d147da6cef80938dca1223b7c7f70f2f382b26308eba014dc4833a" "732b807b0543855541743429c9979ebfb363e27ec91e82f463c91e68c772f6e3" "a2cde79e4cc8dc9a03e7d9a42fabf8928720d420034b66aecc5b665bbf05d4e9" "8aebf25556399b58091e533e455dd50a6a9cba958cc4ebb0aab175863c25b9a4" "bd7b7c5df1174796deefce5debc2d976b264585d51852c962362be83932873d9" default))
31
31
 '(inhibit-startup-screen t)
32
32
 '(package-selected-packages
33
33
   '(company-fuzzy web-mode use-package undo-tree srefactor spacemacs-theme spaceline solarized-theme rainbow-delimiters pretty-mode page-break-lines monokai-theme helm general evil dashboard dante company-ycmd company-flx company-anaconda clang-format auto-package-update auctex a))
34
34
 '(spaceline-inflation 1 t nil "Customized with use-package spaceline")
35
35
 '(spaceline-toggle-buffer-size-off nil t nil "Customized with use-package spaceline"))
36
-
;(custom-set-faces
+
36
 '(warning-suppress-types '((comp))))
+
37
;(custom-set-faces
37
38
 ;; custom-set-faces was added by Custom.
38
39
 ;; If you edit it by hand, you could mess it up, so be careful.
39
40
 ;; Your init file should contain only one such instance.
40
41
 ;; If there is more than one, they won't work right.
41
42
 ;'(default ((((class color) (min-colors 89)) (:foreground "#ffffff" :background "#263238")))))
42
43
43
44
;; To get rid of those FUCKING ANNOYING BACKUP FILES FUCKING HELL DUDE
44
45
(setq backup-directory-alist '(("." . "~/.emacs.d/backup"))
45
46
  backup-by-copying t    ; Don't delink hardlinks
46
47
  version-control t      ; Use version numbers on backups
47
48
  delete-old-versions t  ; Automatically delete excess backups
48
49
  kept-new-versions 20   ; how many of the newest versions to keep
49
50
  kept-old-versions 5    ; and how many of the old
50
51
  )
51
52
;; And yes I copied it from SO, suck it: https://stackoverflow.com/questions/2680389/how-to-remove-all-files-ending-with-made-by-emacs
52
53
53
54
;; Disables the use of tabs, replaces them with spaces
54
55
(setq-default indent-tabs-mode nil)
55
56
56
57
;; Activate UTF-8 throughout Ghent Emacs
57
58
(prefer-coding-system 'utf-8)
58
59
(set-default-coding-systems 'utf-8)
59
60
(set-terminal-coding-system 'utf-8)
60
61
(set-keyboard-coding-system 'utf-8)
61
62
(setq x-select-request-type '(UTF8_STRING COMPOUND_TEXT TEXT STRING))
62
63
63
64
;; Line numbering config
64
65
(global-display-line-numbers-mode)
65
66
(setq display-line-numbers-mode t)
66
67
(setq display-line-numbers-widen t)
67
68
(setq display-line-numbers-type 'relative)
68
69
(setq display-line-numbers-current-absolute t)
69
70
70
71
(setq mouse-wheel-scroll-amount '(1 ((shift) . 1)))
71
72
(setq scroll-step 1)
72
73
(setq scroll-margin 10) ;; Keeps 10 lines above and down always visible if still left
73
74
74
75
;; Enable line breaks in all modes at column 80
75
76
(setq-default auto-fill-function 'do-auto-fill)
76
77
(setq-default fill-column 80)
77
78
78
79
(setq ring-bell-function 'ignore) ;; Disables the FUCKING ANNOYING BEEPS HOLY SHIT
79
80
80
81
;; Setup packages
81
82
;(package-initialize)
82
83
(require 'package)
83
84
(setq package-enable-at-startup nil)
84
85
(add-to-list 'package-archives '("org" . "https://orgmode.org/elpa/"))
85
86
(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/"))
86
87
(unless (package-installed-p 'use-package)
87
88
  (package-refresh-contents)
88
89
(package-install 'use-package))
89
90
90
91
91
92
92
93
93
94
;; Next two lines allow foregoing :ensure t on all packages
94
95
;; :ensure t simply makes sure that, if a package isn't installed on this
95
96
;; machine, it's automatically fetched and installed.
96
97
;; This doesn't keep packages up-to-date, cfr. auto-package-update for that
97
98
(require 'use-package-ensure)
98
99
(setq use-package-always-ensure t)
99
100
100
101
;; Package for automatic updating of all the other packages
101
102
(use-package auto-package-update
102
103
  :config
103
104
  (setq auto-package-update-delete-old-versions t)
104
105
  (setq auto-package-update-hide-results t)
105
106
  (auto-package-update-maybe))
106
107
107
108
;; Easier keybindings so we can do more lazy loading
108
109
(use-package general
109
110
  :config
110
111
  (general-create-definer my-leader-def
111
112
	;; :prefix my-leader
112
113
	:prefix "SPC")
113
114
  (general-create-definer local-leader-def
114
115
	;; :prefix local-leader
115
116
	:prefix ","))
116
117
117
118
(use-package dashboard
118
119
  :init
119
120
  (setq dashboard-banner-logo-title "") ; It's nicer to just not have a title text.
120
121
  (setq dashboard-startup-banner "~/ghent-emacs.png")
121
122
  :config
122
123
  (dashboard-setup-startup-hook))
123
124
124
125
;; AUCTeX configuration
125
126
;; Partly inspired by https://piotr.is/2010/emacs-as-the-ultimate-latex-editor/
126
127
;;;;(use-package auctex
127
128
  ;;:init
128
129
  ;;(setq TeX-auto-save t)
129
130
  ;;(setq TeX-parse-self t)
130
131
  ;;(setq Tex-save-query nil)
131
132
  ;;)
132
133
133
134
;; Updates all packages automatically
134
135
(use-package auto-package-update
135
136
  :config
136
137
  (setq auto-package-update-delete-old-versions t)
137
138
  (setq auto-package-update-hide-results t)
138
139
  (auto-package-update-maybe))
139
140
140
141
;; UI settings
141
142
(tool-bar-mode -1)
142
143
(menu-bar-mode -1)
143
144
(toggle-scroll-bar -1)
144
145
145
146
;; Tabs and width
146
147
(setq-default tab-width 4)
147
148
(setq-default c-basic-offset 4)
148
149
149
150
(use-package spaceline
150
151
    :init
151
152
    (setq frame-char-height 35)
152
153
    (setq powerline-height 35)
153
154
    :custom
154
155
     (spaceline-toggle-buffer-size-off)
155
156
     ;(setq powerline-height 21)
156
157
  (spaceline-inflation 1)
157
158
  (powerline-default-separator 'slant)
158
159
  :config
159
160
  (spaceline-spacemacs-theme)
160
161
  (setq spaceline-highlight-face-func 'spaceline-highlight-face-evil-state)) 
161
162
162
163
163
164
(use-package monokai-theme
164
165
    :config
165
166
    (load-theme 'monokai t)
166
167
    (setq monokai-variable-pitch-mode t))
167
168
;; When using solarized as theme, put in :config
168
169
;; (setq x-underline-at-descent-line t)
169
170
;; Which will block an ugly line being drawn trhough the modeline.
170
171
171
172
;(add-hook 'org-mode-hook '(lambda () (setq fill-column 80)))
172
173
;(add-hook 'org-mode-hook 'auto-fill-mode)
173
174
;; (Programming) languages
174
175
175
176
176
177
177
178
(use-package dante
178
179
  :after haskell-mode
179
180
  :commands 'dante-mode
180
181
  :init
181
182
  (add-hook 'haskell-mode-hook 'dante-mode)
182
183
  (add-hook 'haskell-mode-hook 'flycheck-mode))
183
184
184
185
    
185
186
;; HTML/CSS/Django
186
187
(use-package web-mode
187
188
  :mode "\\.html?\\.djhtml\\'"
188
189
  :init
189
190
  (add-to-list 'auto-mode-alist '("\\.djhtml\\'" . web-mode))
190
191
  (setq web-mode-markup-indent-offset 4)
191
192
  (setq web-mode-css-indent-offset 4)
192
193
  (setq web-mode-code-indent-offset 4)
193
194
  ;(setq web-mode-engines-alist
194
195
;	'(("django"    . "\\.html\\"))) ;; FIXME this doesn't work yet. IDK why.
195
196
  :custom ;; Next lines disable all the automatic completion stuff that I didn't explicitely ask for
196
197
  (web-mode-enable-auto-pairing nil)
197
198
  (web-mode-enable-auto-closing nil)
198
199
  (web-mode-enable-auto-expanding nil)
199
200
  (web-mode-enable-auto-opening nil)
200
201
  (web-mode-enable-auto-quoting nil))
201
202
202
203
203
204
;;(use-package ycmd-mode
204
205
  ;;:ensure ycmd
205
206
  ;;;:hook (after-init . global-ycmd-mode)
206
207
  ;;:hook (haskell-mode elisp-mode python-mode c-mode c++-mode) ; Add the modes of the languages where YCM
207
208
                                      ;;; needs to kick in
208
209
  ;;:init
209
210
  ;;; Old paths
210
211
  ;;;(set-variable 'ycmd-server-command `("/usr/bin/python" ,(file-truename "/usr/share/vim/vimfiles/third_party/ycmd/ycmd/")))
211
212
  ;;;(set-variable 'ycmd-global-config "/home/simba/.emacs.d/lang/ycm_conf.py")
212
213
  ;;(set-variable 'ycmd-server-command `("python" ,(file-truename "~/ycmd/ycmd")))
213
214
  ;;(set-variable 'ycmd-global-config (file-truename "~/Repositories/rc/.ycm_extra_conf.py"))
214
215
  ;;(set-variable 'ycmd-global-modes 'all) ; Activates YCMD in 'all' major modes,
215
216
                                        ;;; not only those in ycmd-file-type-map
216
217
  ;;;(set-variable 'ycmd-extra-conf-whitelist '("/home/jorrit/Dev/*"))
217
218
  ;;:config
218
219
  ;;(setq url-show-status nil)  ; Makes those FUCKING annoying messages SHUT THE HELL UP
219
220
  ;;(setq request-message-level -1)
220
221
  
221
222
  ;;(use-package flycheck-ycmd
222
223
	;;:ensure t
223
224
	;;:commands (flycheck-ycmd-setup)
224
225
	;;:hook (ycmd-mode . flycheck-ycmd-setup)
225
226
	;;:init
226
227
	;;(setq flycheck-clang-language-standard "c++11")
227
228
	;;(when (not (display-graphic-p))
228
229
      ;;(setq flycheck-indication-mode nil))))
229
230
230
231
(use-package company
231
232
 :hook (after-init . global-company-mode)
232
233
 :init
233
234
 (company-tng-configure-default)  ; Use <TAB> to scroll in completion options
234
235
 (setq company-minimum-prefix-length 2)
235
236
 (setq company-idle-delay 0.0))
236
237
 ;:config
237
238
 ;;(use-package company-ycmd-mode
238
239
	;;:ensure company-ycmd
239
240
	;;:commands (company-ycmd-setup)
240
241
	;;:hook (ycmd-mode . company-ycmd-setup))
241
242
 ;;(use-package company-flx
242
243
              ;;:ensure t
243
244
              ;;:config
244
245
              ;;(company-flx-mode +1)))
245
246
;;
246
247
(use-package company-fuzzy
247
248
  :hook (company-mode . company-fuzzy-mode)
248
249
  :init
249
250
  (setq company-fuzzy-sorting-backend 'flx
250
251
        company-fuzzy-prefix-on-top nil
251
252
        company-fuzzy-history-backends '(company-yasnippet)
252
253
        company-fuzzy-trigger-symbols '("." "->" "<" "\"" "'" "@")))
253
254
254
255
(global-company-fuzzy-mode 1)
255
256
256
257
(use-package clang-format
257
258
  :general
258
259
  (local-leader-def
259
260
   :states 'normal
260
261
   :modes '(c-mode-map c++-mode-map)
261
262
   "b" '(:ignore t :which-key "clang")
262
263
   "bf" 'clang-format-buffer)
263
264
  :init
264
265
  (setq-default clang-format-style "{BasedOnStyle: llvm, IndentWidth: 4}"))
265
266
266
267
;; eViL-mode
267
268
(use-package evil
268
269
  :hook (after-init . evil-mode)
269
270
  :bind (:map evil-normal-state-map ;; Scrolls over lines correctly
270
271
              ("j" . evil-next-visual-line)
271
272
              ("k" . evil-previous-visual-line))
272
273
  :general
273
274
  (my-leader-def
274
275
	:states 'normal
275
276
    "b" '(:ignore t :which-key "buffer")
276
277
    "g" '(:ignore t :which-key "magit")
277
278
    "f" '(:ignore t :which-key "files")
278
279
	"bk" 'kill-this-buffer
279
280
	"bd" 'kill-other-buffers
280
281
	"bh" 'switch-to-home-buffer
281
282
	"br" 'revert-buffer
282
283
	"h" 'split-window-vertically
283
284
	"v" 'split-window-horizontally)
284
285
  (local-leader-def
285
286
	:states 'normal
286
287
    ;; General lang options
287
288
	"c" 'compile)
288
289
  :init
289
290
  (setq evil-find-skip-newlines t) ;; Allows f/F/t/T to search beyond CR/LF
290
291
  (setq evil-set-undo-system 'undo-tree) ;; Sets EViL up to use undo (after a
291
292
  ;; weird 2020 patch)
292
293
  (setq evil-want-C-u-scroll t)) ;; Activates c-u scroll to above.
293
294
294
295
;; About smooth-scrolling: I'd normally just use some variables for scrolling
295
296
;; but they all fail with org-mode. This package fixes everything that's wrong for me.
296
297
;(use-package smooth-scrolling
297
298
   ;:config
298
299
   ;(smooth-scrolling-mode 1))
299
300
300
301
(use-package org
301
302
  :pin "org"
302
303
  ; FIXME This causes some errors with bind-keys or what have you. Commented
303
304
  ; until it is fixed.
304
305
  ;:bind (:bind-keymap
305
306
  ;        ("C-c x" . org-todo-state-map)
306
307
  ;       :map org-todo-state-map
307
308
  ;        ("x" . #'(lambda nil (interactive) (org-todo "CANCELLED")))
308
309
  ;        ("d" . #'(lambda nil (interactive) (org-todo "DONE")))
309
310
  ;        ("f" . #'(lambda nil (interactive) (org-todo "DEFERRED")))
310
311
  ;        ("l" . #'(lambda nil (interactive) (org-todo "DELEGATED")))
311
312
  ;        ("s" . #'(lambda nil (interactive) (org-todo "STARTED")))
312
313
  ;        ("w" . #'(lambda nil (interactive) (org-todo "WAITING"))))
313
314
;         :map org-mode-map
314
315
;          ("C-c x" . org-todo-state-map))
315
316
   :init
316
317
  (define-key mode-specific-map [?a] 'org-agenda)
317
318
  :custom
318
319
  ;; Because I use XeLaTeX (it's objectively better), some variables need to be
319
320
  ;; set so org-mode knows what to call.
320
321
321
322
  ;; Okay, so you cán export asynchronous so compiling your PDF doesn't lock up
322
323
  ;; the editor completely, but for one reason or another, you MUST set the
323
324
  ;; async-debug to nil. Otherwise it will constantly "exit abnormally" without
324
325
  ;; reason. This fixes it, who knows why.
325
326
  (org-export-async-debug nil)
326
327
  
327
328
  (org-latex-compiler 'xelatex)  ; Makes sure the XeLaTeX compiler is used
328
329
  
329
330
  ; Tells Org to use dvisvgm because dvipng does not support XeLaTeX's output format
330
331
  (org-preview-latex-default-process 'dvisvgm)
331
332
  
332
333
  ; This edits the preview process so it works correctly with XeLaTeX.
333
334
  ; Changes: 
334
335
  ; - "latex" to "xelatex" 
335
336
  ; - Added the "-no-pdf" flag so it prints an XDV file instead of PDF.
336
337
  ; - change input type from dvi to xdv
337
338
  ; - Only leave the dvisvgm option because I don't need the others
338
339
  (org-preview-latex-process-alist
339
340
   (quote
340
341
    ((dvisvgm :programs
341
342
              ("xelatex" "dvisvgm")
342
343
              :description "dvi > svg" :message "you need to install the programs: xelatex and dvisvgm." :use-xcolor t :image-input-type "xdv" :image-output-type "svg" :image-size-adjust
343
344
              (1.7 . 1.5)
344
345
              :latex-compiler
345
346
              ("xelatex -interaction nonstopmode -no-pdf -output-directory %o %f")
346
347
              :image-converter
347
348
              ("dvisvgm %f -n -b min -c %S -o %O")))))
348
349
349
350
  ;; Sets the formatting options. I only changed :scale to 1.6, but I don't know
350
351
  ;; how to change only thát, so for now I'm configuring the entire variable
351
352
  (org-format-latex-options (quote
352
353
   (:foreground default :background default :scale 1.6 :html-foreground "Black" :html-background "Transparent" :html-scale 1.0 :matchers
353
354
             ("begin" "$1" "$" "$$" "\\(" "\\["))))
354
355
    
355
356
  ;; Sets the directory in which the preview fragments are stored to the /tmp
356
357
  ;; folder. Otherwise it clutters up the folder in which the source resides
357
358
  ;; with what are essentially cache files.
358
359
  (org-preview-latex-image-directory "/tmp/ltximg/")
359
360
  
360
361
  ;; Following customizations are in regard to org-agenda configuration.
361
362
  (org-agenda-files (quote ("~/shared/planning/planning.org")))
362
363
  (org-default-notes-file "~/shared/planning/notes.org")
363
364
  (org-agenda-span 62)
364
365
  (org-deadline-warning-days 14)
365
366
  (org-agenda-show-all-dates t)
366
367
  (org-agenda-skip-deadline-if-done t)
367
368
  (org-agenda-skip-scheduled-if-done t)
368
369
  (org-agenda-start-on-weekday nil)
369
370
  (org-reverse-note-order t)
370
371
  (org-fast-tag-selection-single-key (quote expert))
371
372
  (org-agenda-custom-commands
372
373
    (quote (("d" todo "DELEGATED" nil)
373
374
      ("c" todo "DONE|DEFERRED|CANCELED" nil)
374
375
      ("w" todo "WAITING" nil)
375
376
      ("W" agenda "" ((org-agenda-ndays 21)))
376
377
      ("A" agenda ""
377
378
        ((org-agenda-skip-function
378
379
          (lambda nil
379
380
      (org-agenda-skip-entry-if (quote notregexp) "\\=.*\\[#A\\]")))
380
381
        (org-agenda-ndays 1)
381
382
        (org-agenda-overriding-header "Today's Priority #A tasks: ")))
382
383
      ("u" alltodo ""
383
384
        ((org-agenda-skip-function
384
385
          (lambda nil
385
386
      (org-agenda-skip-entry-if (quote scheduled) (quote deadline)
386
387
              (quote regexp) "\n]+>")))
387
388
        (org-agenda-overriding-header "Unscheduled TODO entries: "))))))
388
389
  (org-capture-store-without-prompt t)
389
390
  (org-capture-templates
390
391
    (quote ((116 "* TODO %?\n  %u" "~/Repositories/private/org/planning.org" "Tasks")
391
392
      (110 "* %u %?" "~/Repositories/private/org/notes.org" "Notes"))))
392
393
  (capture-annotation-functions (quote (org-capture-annotation)))
393
394
  (capture-handler-functions (quote (org-capture-handler))))
394
395
395
396
  ;:general
396
397
  ;(local-leader-def
397
398
  ;  :states 'normal
398
399
  ;  :keymaps 'org-mode-map
399
400
;	"e" 'org-export-dispatch
400
401
;	"x" 'org-table-export
401
402
;	"." 'org-time-stamp
402
403
;	"t" 'org-twbs-export-to-html
403
404
;	"s" 'org-schedule
404
405
;	"d" 'org-deadline
405
406
;	"'" 'org-edit-special)
406
407
;  :config
407
408
;  ;; log todo items with timestamp
408
409
;  (setq org-log-done 'time))
409
410
410
411
(use-package helm
411
412
  :hook (after-init . helm-mode)
412
413
  :commands (helm-autoresize-mode)
413
414
  :init
414
415
  ;; (defvar helm-google-suggest-use-curl-p)
415
416
  (defvar helm-ff-search-library-in-sexp)
416
417
  (defvar helm-echo-input-in-header-line)
417
418
  (defvar helm-ff-file-name-history-use-recentf)
418
419
  :general
419
420
  (general-define-key
420
421
   "M-x" 'helm-M-x
421
422
   "M-:" 'helm-eval-expression
422
423
   "C-c h" 'helm-command-prefix)
423
424
  (general-define-key
424
425
   :keymaps 'helm-map
425
426
   "<tab>" 'helm-execute-persistent-action
426
427
   "C-i" 'helm-execute-persistent-action
427
428
   "C-z" 'helm-select-action)
428
429
  (my-leader-def
429
430
	:states 'normal
430
431
	"bb" 'helm-buffers-list
431
432
	"ff" 'helm-find-files
432
433
	"p" 'helm-show-kill-ring)
433
434
  :config
434
435
  (setq helm-split-window-inside-p           t ; open helm buffer inside current window, not occupy whole other window
435
436
	helm-move-to-line-cycle-in-source     t ; move to end or beginning of source when reaching top or bottom of source.
436
437
	helm-ff-search-library-in-sexp        t ; search for library in `require' and `declare-function' sexp.
437
438
	helm-scroll-amount                    8 ; scroll 8 lines other window using m-<next>/m-<prior>
438
439
	helm-ff-file-name-history-use-recentf t
439
440
	helm-echo-input-in-header-line t)
440
441
441
442
  ;; hide some autogenerated files from helm
442
443
  (setq helm-ff-skip-boring-files t)
443
444
  ;; (add-to-list 'helm-boring-file-regexp-list "\\~$")
444
445
  
445
446
  (setq helm-autoresize-max-height 0)
446
447
  (setq helm-autoresize-min-height 20)
447
448
  (helm-autoresize-mode 1))
448
449
449
450
450
451
(use-package rainbow-delimiters
451
452
  :hook (prog-mode . rainbow-delimiters-mode))
452
453
453
454
+
455
454
456
;; Settings for having an LaTeX beamer class export tool
455
457
(unless (boundp 'org-export-latex-classes)
456
458
(setq org-export-latex-classes nil))
457
459
(add-to-list 'org-export-latex-classes
458
460
;; beamer class, for presentations
459
461
'("beamer"
460
462
    "\\documentclass[11pt]{beamer}\n
461
463
    \\mode<{{{beamermode}}}>\n
462
464
    \\usetheme{{{{beamertheme}}}}\n
463
465
    \\usecolortheme{{{{beamercolortheme}}}}\n
464
466
    \\beamertemplateballitem\n
465
467
    \\setbeameroption{show notes}
466
468
    \\usepackage[utf8]{inputenc}\n
467
469
    \\usepackage[T1]{fontenc}\n
468
470
    \\usepackage{hyperref}\n
469
471
    \\usepackage{color}
470
472
    \\usepackage{listings}
471
473
    \\lstset{numbers=none,language=[ISO]C++,tabsize=4,
472
474
frame=single,
473
475
basicstyle=\\small,
474
476
showspaces=false,showstringspaces=false,
475
477
showtabs=false,
476
478
keywordstyle=\\color{blue}\\bfseries,
477
479
commentstyle=\\color{red},
478
480
}\n
479
481
    \\usepackage{verbatim}\n
480
482
    \\institute{{{{beamerinstitute}}}}\n          
481
483
    \\subject{{{{beamersubject}}}}\n"
482
484
483
485
    ("\\section{%s}" . "\\section*{%s}")
484
486
485
487
    ("\\begin{frame}[fragile]\\frametitle{%s}"
486
488
    "\\end{frame}"
487
489
    "\\begin{frame}[fragile]\\frametitle{%s}"
488
490
    "\\end{frame}")))
489
491
490
492
;; Adds a letter class, for formal letters
491
493
492
494
(add-to-list 'org-export-latex-classes
493
495
494
496
'("letter"
495
497
    "\\documentclass[11pt]{letter}\n
496
498
    \\usepackage[utf8]{inputenc}\n
497
499
    \\usepackage[T1]{fontenc}\n
498
500
    \\usepackage{color}"
499
501
500
502
    ("\\section{%s}" . "\\section*{%s}")
501
503
    ("\\subsection{%s}" . "\\subsection*{%s}")
502
504
    ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
503
505
    ("\\paragraph{%s}" . "\\paragraph*{%s}")
504
506
    ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
505
507
506
508
507
509
(custom-set-faces
508
510
 ;; custom-set-faces was added by Custom.
509
511
 ;; If you edit it by hand, you could mess it up, so be careful.
510
512
 ;; Your init file should contain only one such instance.
511
513
 ;; If there is more than one, they won't work right.
512
514
 )
513
-
+
515
514
516
515
517
;; This is to fix the retarded scrolling behaviour in Emacs as much as possible:
516
518
(setq redisplay-dont-pause t
517
519
  scroll-margin 1
518
520
  scroll-step 1
519
521
  scroll-conservatively 10000
520
522
  scroll-preserve-screen-position 1)
521
523
;; Stops Emacs from accelerating my scroll:
522
524
(setq mouse-wheel-progressive-speed nil)
523
525
;; Makes scrolling do 5 lines at a time, otherwise it's pretty slow
524
526
(setq mouse-wheel-scroll-amount '(5))
525
-
+
527