Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
emacs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michael Hauspie
emacs
Commits
8de5b498
Commit
8de5b498
authored
4 months ago
by
Michael Hauspie
Browse files
Options
Downloads
Patches
Plain Diff
Add configuration for org-present
parent
c371bfe0
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
configuration.org
+423
-329
423 additions, 329 deletions
configuration.org
with
423 additions
and
329 deletions
configuration.org
+
423
−
329
View file @
8de5b498
...
@@ -66,7 +66,8 @@ Then add package repositories
...
@@ -66,7 +66,8 @@ Then add package repositories
#+BEGIN_SRC emacs-lisp
#+BEGIN_SRC emacs-lisp
(require 'package)
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
; (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
(add-to-list 'package-archives '("nongnu" . "https://elpa.nongnu.org/nongnu/") t)
(unless (fboundp 'package-activate-all) (package-initialize))
(unless (fboundp 'package-activate-all) (package-initialize))
#+END_SRC
#+END_SRC
...
@@ -314,12 +315,20 @@ Select the font I will use depending on the system
...
@@ -314,12 +315,20 @@ Select the font I will use depending on the system
#+begin_src emacs-lisp
#+begin_src emacs-lisp
(if (eq system-type 'darwin)
(if (eq system-type 'darwin)
; Font on MacOS
; Font on MacOS
(setq mh-font "Fira Code-13")
(progn
(setq mh-font-fixed "Fira Code")
(setq mh-font-variable "Marianne")
)
; Font on Other Systems (Linux actually, I do not use emacs on windows)
; Font on Other Systems (Linux actually, I do not use emacs on windows)
(setq mh-font "DejaVu Sans Mono-12")
(progn
(setq mh-font-fixed "DejaVu Sans Mono")
(setq mh-font-variable "DejaVu Sans")
)
)
)
(set-face-attribute 'default t :font mh-font )
(set-face-attribute 'default nil :font mh-font-fixed :weight 'light :height 160)
(set-frame-font mh-font nil t)
(set-face-attribute 'fixed-pitch nil :font mh-font-fixed :weight 'light :height 160)
(set-face-attribute 'variable-pitch nil :font mh-font-variable :weight 'light :height 1.3)
(set-frame-font mh-font-fixed nil t)
#+end_src
#+end_src
** Modeline
** Modeline
...
@@ -570,19 +579,103 @@ Use bullets instead of asterisks
...
@@ -570,19 +579,103 @@ Use bullets instead of asterisks
#+end_src
#+end_src
**
T
re
e sli
de
**
P
re
sentation using org mo
de
Tree slide displays an org file as /slides/
Following [[https://www.youtube.com/watch?v=SCPoF1PTZpI][this]] presentation, I start using =org-present= to make slides using =org-mode= and combine
it with =visual-fill-column= to enhance the visual look of the presentation.
#+begin_src emacs-lisp
#+begin_src emacs-lisp
(use-package org-tree-slide
:bind (:map org-mode-map
;; so that org-* face attributes are available
("<f8>" . 'org-tree-slide-mode)
(require 'org-faces)
;; What to do when starting/ending a presentation
(defun my/org-present-start ()
(visual-fill-column-mode 1)
(visual-line-mode 1)
(display-line-numbers-mode 0)
;; Hide emphasis markers on formatted text
(setq org-hide-emphasis-markers t)
;; Resize Org headings
(dolist (face '((org-level-1 . 1.2)
(org-level-2 . 1.1)
(org-level-3 . 1.05)
(org-level-4 . 1.0)
(org-level-5 . 1.1)
(org-level-6 . 1.1)
(org-level-7 . 1.1)
(org-level-8 . 1.1)))
(set-face-attribute (car face) nil :font mh-font-variable :weight 'medium :height (cdr face)))
;; Make the document title a bit bigger
(set-face-attribute 'org-document-title nil :font mh-font-variable :weight 'bold :height 1.3)
;; Make sure certain org faces use the fixed-pitch face when variable-pitch-mode is on
(set-face-attribute 'org-block nil :foreground nil :inherit 'fixed-pitch)
(set-face-attribute 'org-table nil :inherit 'fixed-pitch)
(set-face-attribute 'org-formula nil :inherit 'fixed-pitch)
(set-face-attribute 'org-code nil :inherit '(shadow fixed-pitch))
(set-face-attribute 'org-verbatim nil :inherit '(shadow fixed-pitch))
(set-face-attribute 'org-special-keyword nil :inherit '(font-lock-comment-face fixed-pitch))
(set-face-attribute 'org-meta-line nil :inherit '(font-lock-comment-face fixed-pitch))
(set-face-attribute 'org-checkbox nil :inherit 'fixed-pitch)
;; Tweak font sizes
(setq-local face-remapping-alist '((default (:height 1.5) variable-pitch)
(header-line (:height 4.0) variable-pitch)
(org-document-title (:height 1.75) org-document-title)
(org-code (:height 1.55) org-code)
(org-verbatim (:height 1.55) org-verbatim)
(org-block (:height 1.25) org-block)
(org-block-begin-line (:height 0.7) org-block)))
;; Set a blank line at top of the frame
(setq header-line-mode t)
(setq header-line-format " ")
)
)
(defun my/org-present-end ()
(visual-fill-column-mode 0)
(visual-line-mode 0)
(display-line-numbers-mode 1)
;; Reset font customizations
(setq-local face-remapping-alist nil)
;; Show emphasis markers on formatted text
(setq org-hide-emphasis-markers nil)
;; Restore Org headings
(dolist (face '((org-level-1 . 1)
(org-level-2 . 1)
(org-level-3 . 1)
(org-level-4 . 1)
(org-level-5 . 1)
(org-level-6 . 1)
(org-level-7 . 1)
(org-level-8 . 1)))
(set-face-attribute (car face) nil :font mh-font-fixed :weight 'medium :height (cdr face)))
;; Remove the blank line at top of the frame
(setq header-line-format nil)
(setq header-line-mode nil)
)
)
#+end_src
(use-package org-present
:hook (
(org-present-mode . my/org-present-start)
(org-present-mode-quit . my/org-present-end)
)
)
(use-package visual-fill-column
:custom
(visual-fill-column-width 110)
(visual-fill-column-center-text t)
)
#+end_src
** Export configuration
** Export configuration
I use =org-mode= to export to LaTeX, (beamer and article) markdown and to HTML
I use =org-mode= to export to LaTeX, (beamer and article) markdown and to HTML
...
@@ -1176,7 +1269,6 @@ This will print emacs start time as well as the count of GC calls
...
@@ -1176,7 +1269,6 @@ This will print emacs start time as well as the count of GC calls
(use-package esup
(use-package esup
:ensure t
:ensure t
;; To use MELPA Stable use ":pin mepla-stable",
;; To use MELPA Stable use ":pin mepla-stable",
:pin melpa
:commands (esup))
:commands (esup))
#+end_src
#+end_src
...
@@ -1206,3 +1298,5 @@ like an instrument/.
...
@@ -1206,3 +1298,5 @@ like an instrument/.
A [[https://blog.d46.us/advanced-emacs-startup/][guide]] on how to speed up emacs starting time
A [[https://blog.d46.us/advanced-emacs-startup/][guide]] on how to speed up emacs starting time
A great [[https://www.youtube.com/watch?v=SCPoF1PTZpI][video]] on =org-present= and how to tweak emacs font in general. It comes with a corresponding
[[https://systemcrafters.net/emacs-tips/presentations-with-org-present/][blog post]].
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment