• Stars
    star
    490
  • Rank 89,811 (Top 2 %)
  • Language
    Emacs Lisp
  • Created over 5 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Writing a Ph.D. thesis with Org Mode

Org-thesis

Introduction

This repository contains the skeleton of a Ph.D. thesis written in Org Mode. It does not aim to be an authoritative guide on writing thesis with Org Mode, i.e., it only represents the solution that I found most convenient within the time frame of my Ph.D.

The goal of this setup was to allow the seamless inclusion of research chapters into the thesis without having to modify the included files at all. In other words, chapters can live as standalone repositories with completely different export settings. In other words, this setup separates content from form and allows content to move freely between the thesis and a chapter. In order to achieve that, the setup relies on intermediate and possibly advanced Org features such as:

  • Usage of org-local variables through #+BIND
  • Usage of #+INCLUDE and multiple #+SETUPFILE
  • Advanced usage of #+INCLUDE for partial file inclusion
  • Usage of org-macros
  • Reference management with org-ref
  • References to equations via the \label and eqref combo from org-ref
  • Aesthetical changes to the export engine such as table improvements
  • Multiple documented #+LATEX_HEADER
  • Extensive usage of the ox-extra :ignore: tag
  • Selective use of the #+EXCLUDE_TAGS to power-up the #+INCLUDE mechanism
  • Use of ox-latex properties such as ALT_TITLE and UNNUMBERED to modify the TOC
  • Seamless usage of latex environments via Org mode blocks
  • Definition of new #+LATEX_CLASS for the Org export
  • The usage of COMMENT blocks for personal notes (differs from :noexport:!)
  • Inclusion of a pretty much pure LaTeX title page into the Org document
  • Export of src blocks with highlighting via minted all natively from Org Mode
  • Showcase of the usage of figures and their captions
  • Showcase on how to define new latex environments and access them from Org
  • A series of documented commonly used LaTeX tricks in the setupfile

To see how an example of what the final pdf exports could look like check out both the thesis pdf under ./thesis/thesis.pdf and an individual manuscript as a standalone under ./research-chapter/manuscript.pdf. Notice how the same content from the same file is used in both pdf exports and end up with completely different formatting.

Mandatory Screenshots

Example Org file with content to be exported:

screenshots/org-example.png

Content exported to thesis:

screenshots/thesis-example.png

Same content but exported as manuscript:

screenshots/manuscript-example.png

Installation & Requirements

You will need at least Emacs 26 and Org 9.2 for this to work because it relies on Org’s #+INCLUDE derivative, which is broken for files containing relative paths and links in earlier versions. You will also need a recent version of LaTeX. Details on my LaTeX setup are described in the ./latex-setup.org file in the root of this repository. The information was extracted automatically using scimax-latex.el. Information about scimax-latex is also described in the end of the latex setup file. You will also need org-ref for links to equations and citations to work as expected. And to compile the thesis as is you’d require the mimosis latex class. It’ll probably work if you change class, but YMMV.

Usage

More usage details can be found under this blog post. For more information, feel free to open an issue.

Possible improvements

Repository maybe tied to my class choices?

The setup files and LaTeX classes seen here are those that I use. It’d be nice to have a more minimalistic example that didn’t require such dependencies.

Bibliography management

Currently the bibliography management is not properly modular. I use Zotero for bibliography management and I have Zotero export a master file for the thesis and individual files for each chapter. It works well, but I cannot simply include a new chapter into the thesis without first adapting Zotero as well

Manual management of lines to skip

For each included file, I skip LaTeX derivatives by constraining the number of lines to be included. This is manual work and couple probably be improved.

More Repositories

1

writefreely.el

*Frictionless* blogging with Org Mode. No setup required.
Emacs Lisp
85
star
2

awesome-mri

Awesome Magnetic Resonance Imaging (MRI)
34
star
3

mr-sequence-diagrams

Draw MR Sequence Diagrams for LaTeX / MetaPost
33
star
4

scimax-layer

Attempt to bring some of Scimax' functionality to Spacemacs
Emacs Lisp
12
star
5

dac2bids

Create a BIDS structure for a DICOM folder.
Python
9
star
6

org-beamerposter

A template for Org Mode beamerposter export.
TeX
5
star
7

neuroimaging-scripts

Miscellaneous fMRI scripts
Shell
3
star
8

recon-all-lite

A minimal reimplementation of FreeSurfer's recon-all script.
Python
3
star
9

tfm

Compute temporal functional modes (or atlas based temporal ICA) from functional MRI data.
Python
3
star
10

love-experiments

Experimental stimulus presentation software using LÖVE
Lua
3
star
11

fslx

A simple and intuitive wrapper for FSL tools.
Shell
3
star
12

mrtoolkit-recon

Tutorial exercises on MR Image Reconstruction and Parallel Imaging
CSS
2
star
13

fluctus

Python
2
star
14

nilearn-cli

Convenient command line tools for nilearn
Python
2
star
15

dicom-mode

An Emacs minor mode to deal with DICOM images.
Emacs Lisp
2
star
16

apple-music.el

Search through the apple music catalog from within Emacs
Emacs Lisp
2
star
17

org-mode

Emacs Org-mode
Emacs Lisp
2
star
18

dangom

1
star
19

luxinema

Grab schedule of the LUX cinema
Python
1
star
20

mrtoolkit-contrast

Tutorial exercises on MR Image Contrast
CSS
1
star
21

sfs

Signal Fluctuation Sensitivity
Python
1
star
22

yani

yet another neuroimaging (yani) package
Python
1
star
23

ica-yac

Yet Another Classifier for ICA
Python
1
star
24

read-it-later

1
star
25

org-dual-document

Example on how to use an org-document for two different purposes.
1
star
26

ME-ICA

Multi-echo ICA
Python
1
star
27

what-is-this-face-called

Find out the name of the face at point.
Emacs Lisp
1
star
28

d3-timeseries

Hackish plot of timeseries with a pulsar-like look
JavaScript
1
star
29

SICP

Solutions to SICP exercises.
Scheme
1
star
30

org-mode-padline

Emacs Org Mode
Emacs Lisp
1
star
31

icicle-tree-melodic

Icicle tree to visualize the variance explained by each IC component, as output from MELODIC.
Python
1
star
32

sample-dicom

Repository with a single anonymous dicom available for testing purposes.
1
star