Emacs Org-mode

Table of Contents

1 Publishing with org-mode

Emacs org-mode is a tool for working with structured text. It covers what Markdown does but also has a lot of other features..

[jkitchin72:online]

Project setup

To work with org-mode publishing you can use projects. See org-publish-project-alist.

HTML Export

Styling and layout

There are some themes available for producing orgmode exports. [fniessen85:online]

2 Tree navigation

Default key binding M-x Description
  org-promote/demote-subtree Moves a subtree up and down the hierarchy of nodes.

3 Performing citation, references and exporting

org-ref

Using org-ref only requires two things:

  1. Put bibliography followed by a colon followed by the name of your .bib-file somewhere in your org-mode file.
  2. Make sure that your org-ref-bibliography-entry-format matches the format of your BibTeX entries.
bibliography:orgmode.bib

You may use M-x org-ref-helm-insert-cite-link to insert citations, there are more ways though.

Exporting to HTML

org-ref-bibliography-entry-format is a variable defined in ‘org-ref-core.el’. Its value is shown below.

Documentation: String to format an entry. Just the reference, no numbering at the beginning, et c. see the ‘org-ref-reftex-format-citation’ docstring for the escape codes.

You can customize this variable.

Value: (("article" . "%a, %t, <i>%j</i>, <b>%v(%n)</b>, %p (%y). <a href=\"%U\">link</a>. <a href=\"http://dx.doi.org/%D\">doi</a>.")
 ("book" . "%a, %t, %u (%y).")
 ("techreport" . "%a, %t, %i, %u (%y).")
 ("proceedings" . "%e, %t in %S, %u (%y).")
 ("inproceedings" . "%a, %t, %p, in %b, edited by %e, %u (%y)")
 ("misc" . "%a</a>, %t, <a href=\"%U\">%U</a>, %N")
 ("online" . "%a, %t, <a href=\"%U\">%U</a>, %N, %Y"))

Bibliography

4 Appendix A

Org-mode config. examples

org-publish-project-alist

(setq org-publish-project-alist
      (list
       `("orgmode-on-github"
         :base-directory "~/Dropbox/notes"
         :base-extension "org"
         :publishing-directory "~/git/jmn.github.io"
         :publishing-function org-html-publish-to-html
         :completion-function ((lambda (x) (let ((fromF "~/git/jmn.github.io/orgmode.html")
                                            (toF "~/git/jmn.github.io/org.html"))
                                        (when (file-exists-p fromF)
                                          (rename-file fromF toF t)
                                          (message "Made a file ~/git/jmn.github.io/org.html")
                                          ))
                                 ))
         :html-extension "html"
         :recursive nil
         :include ("orgmode.org")
         :exclude "\\.org$"

         )
       `("emacs-notes"
         :base-directory "~/git/notes/"
         :base-extension "org"
         :publishing-directory "~/git/jmn.github.io"
         :recursive nil
         :publishing-function org-html-publish-to-html
         :include ("jmn.org" "emacs.org")
         :exclude "\\.org$"
         )
       )
      )

Author: jmn

Created: 2016-12-07 Wed 04:43

Validate