# Any science book written in org-mode?

I am thinking to write a physics book in org-mode. Although there are many open-source science books written in LaTeX to figure out its work-flow (and its source) I couldn't find any science book written in org-mode. It is better alternative writing than in LaTeX for science books?

• Not necessarely a book, but checkout: github.com/jkitchin/pycse. Here's an html version: kitchingroup.cheme.cmu.edu/pycse/pycse.html – dangom Aug 18 '17 at 9:46
• I just finished writing an academic paper mostly in org-mode. I had to tweak some stuff in LaTeX at the end for special journal formatting, and I had issues with links to a separate document. Otherwise I think it was much easier to write in org-mode for content. – salotz Aug 24 '17 at 15:36
• @salotz, is there a link for your paper with "org-mode" source? – ofenerci Aug 24 '17 at 16:29
• Normally when I write any LaTeX document I just write in orgmode first and tweak the exported LaTeX a bit in the end. Plain orgmode would seem a bit too limited for all the formatting options and packages. – xji Aug 28 '17 at 13:06
• I will post the DOI that will include it. Also will have an analysis notebook. The problem with just writing in org-mode and tweaking in the end is that if you end up wanting to change the content you want to do so in the org-mode document, and then have to redo all the latex tweaking or create your own custom latex exporter. Also all the labels are garbled in the latex output. – salotz Oct 19 '17 at 20:26

I wrote an academic paper mostly in org-mode. The published paper is here https://pubs.acs.org/doi/abs/10.1021/jacs.7b08572.

And the repo I used to make it is hosted here with the main org-mode source here: https://gitlab.com/salotz/Lotz2017sEHTPPUUnbinding/blob/master/paper/paper.org

As others have commented you will likely have to export to LaTeX to do some tweaks for the particular journal. But I drafted the entire contents of the paper using org-mode.

I think the main advantage in writing in org-mode is that you can be more focused on generating the content instead of typography, which I feel is the case with LaTeX. The nesting/folding implementation of headings in org-mode is really good and allows you to work on large documents (anything larger than can fit on your screen at once) very easily.

That said if you are collaborating or requesting edits from others most people will not know org-mode (or use emacs) and be instantly annoyed that you aren't using LaTeX. If you are very good at LaTeX and not distracted by all the extra verbose markup then I don't know that org-mode is right for you. Or if your document relies heavily on advanced typographic formatting

In addition to org-mode I used a number of emacs extensions that made adding citations a breeze:

• helm-bibtex
• org-ref (particularly the org-ref-extract-bibtex-* commands to generate a bibtex file)

Although, LaTeX modes in emacs have basically the same functionality.

I would also suggest a few conventions and tricks that helped along the way, that probably help with LaTeX as well.

When drafting I wrote each sentence on a single line separated by a blank line and paragraphs separated by two lines. This makes your diffs focused without flagging a whole big paragraph as a change (since source code diffs are line-based and not sentence based). Normally when I am writing prose (or code with support for this function) I compulsively use M-q to keep the lines within the fill column limit (80 characters usually), however this breaks the sentence per line convention and makes diffs almost useless. To solve this use visual-fill-column-mode (to set number of columns to show text in) and visual-line-mode (to stop line breaks within words) when editing.

Also I don't see pandoc mentioned here but it is definitely worth a mention. As it might be better at outputting LaTeX or PDFs in different situations than the builtin org-mode functions.

• Naive Q, but cant you embed the more complex/unsupported raw latex in the org-mode doc rather than "tweak" it later? – RichieHH Feb 7 at 10:56
• Yes for the body of the text. I did have some issues with the preamble though. I don't know if there was any hard fundamental problem or I just never figured it out. – salotz Feb 7 at 18:14
• I've written several Org-only papers with 0 tweaks to the LaTeX - the journal accepts them. See github.com/mankoff/ice_discharge – mankoff Feb 7 at 21:07

The book 'Modeling materials using density functional' by John Kitchin is written in orgmode: http://kitchingroup.cheme.cmu.edu/dft-book/dft.html

This is an example of book written in Org-mode, with a comprehensive tutorial: https://procomun.wordpress.com/2014/03/10/book-available-for-preorder/