Emacs config

I have upgraded my emacs-config to make it easer for others to use it. It can be downloaded from my gitlab repo. I will include a file setting everything up, but it is of course still possible to do everything manual, or just be inspired by the configs. It is still work in progress and you use it on your own risk,

Making presentations in org-mode

A couple of years ago I stoped using graphical interface such as libreoffice to do my presentations. Instead I used Latex and Beamer. The reason is that I work much faster if I don’t have to consider how it looks, but can concentrate on the content. On this website you can find some of my presentations here.

Recently though I found out about ox-reveal and reveal.js. I will from now on do my presentation using these instead. The reason is that it is just so easy, and the presentations is OK. It is futher easy to use gitlab or similiar to produce the presentaion on the internet.

You have to download the ox-reveal package from github. You mave have to install org-mode from elpa as well. If so follow the instruction. Be especially careful with not having org-mode on any buffer open when you do the installation.

After downloading ex-reveal put the .el-file somewhere and make a load path to it in you init-file. I made a directory in my .emacs.d-directory and put in the following code.

(add-to-list 'load-path "~/.emacs.d/ox-reveal")

Then you have to require ox-reveal

(require 'ox-reveal)

After you have done this you need to point to the path to reveal.js. In my init-file it looks like this.

(setq org-reveal-root "file:///home/dala0001/.reveal.js")

There are several themes built in reveal.js. Go to your reveal.js, css and theme. To use them just put the following code into your org-mode-file:


…where beige is the theme.

When you are done with your presentation you export it as an HTML using C-c-e R B. You can then use the html-file when doing the actual presentation.

You can further put it on the internet. The easiest way to do this is to use gitlab, github or similar. If so it is a good idea to use the reveal root (the css that is on the internet). Just put the following into you org-mode-file:

#+REVEAL_ROOT: https://cdn.jsdelivr.net/reveal.js/3.0.0/


org-mode is a program related to Emacs, which is just fantastic. It’s an easy and customizable program — like most of the emacs programs are. So what is the point with org-mode? Well, I use org-mode mostly for taking notes, keeping track on tasks and organizing/structuring text work, such as articles, evaluation of courses and preparation for classes or supervision of students. I would’t claim to be an expert — I am rather a newbie. But I really like the program, and is in fact using it more and more. It is easy to use. Org-mode will open when opening .org-files, or through M-x org-mode.

Markdown is a practical tool


Markdown is a simplified way of writing HTML-code. I have not engaged myself especially much in markdown. Yes, I have heard about, especially in relation to RStuido. However, I don’t use RStudio, except when I am teaching. And to be honest, it is here I find most use of Markdown. For example, in a couple of weeks I will be teaching on a module to a course on Criminology. The module I will be teaching on is about statistical methods. In the module we use R statistics. Good to know is that the students are not experienced with methods, and using R and writing codes can be overwellming. I have had this module two times now, so I know by fact that it works. But for some students it is of course hard and frustrating to write code — especially if not done that before. Which is the case for most of the students.

So one Saturday I sat down and started to learn Markdown. As I have said in previous posts I use Emacs. But in this case I actually started by using RStudio, since evertyhing is already set up. In Emacs additional packages must be installed.

One of the best features of Markdown is the possibility to use code boxes (of course also available in HTML). For example like this:

wd <- read_sav("data_file.sav")

Another very good feature (works very well when using RStudio) is the possbility to run the r code and get the output presented in the document. Markdown is also available in WordPress. Here I have used wp-markdown.