Skip to content

MooersLab/manuscriptInOrg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Version License: MIT

Manuscript template in org-mode for the first submission

Background

The first submission of a research paper for peer review can be in a generic format as a PDF. The advantage of a plain generic template is that it can be submitted to many different journals.

This is an org-mode variant of the main.tex file in the MooersLab/manuscriptInLaTeX repo. This template is for people who prefer to write research papers in org-mode because they do a lot of their other work in org-mode and do not want to switch to working in LaTeX. They would rather spend all day in org-mode; it is that fun to use. Org supports easy shuffling and other manipulations of document subtrees, very easy table generation, and literate programming. You can also integrate manuscript writing with time management via org-agenda and knowledge management via org-roam more efficiently by staying in org-mode. These features are beyond what is readily possible in LaTeX without using extra packages.

If you are already a strong LaTeX user, there is plenty of tweaking of the preamble of this template that you can do to add your favorite packages and settings. Org-mode recognizes many LaTeX commands directly. LaTeX code can also be utilized inside of code blocks that can be evaluated on the fly. See the org-mode manual.

#+name: hello-world
#+BEGIN_SRC latex
\LaTeX code
#+END_SRC

Sample title page

Screenshot 2024-08-18 at 6 40 00 AM

Sample second page

Screenshot 2024-08-22 at 4 00 55 PM

Default Features

  • Line numbers.
  • Block paragraphs. Reset the indent on the line \setlength{\parindent}{0pt} if you indents.
  • No numbering of the sections. This is suppressed in a org-mode setting in the header (i.e., num:\nil). Remove this setting to apply section numbering.
  • Blank lines between paragraphs. This is set by the line \usepackage{parskip} in the preamble.
  • Narrow margins to conserve paper in drafts. Edit the line \usepackage[letterpaper, total={6.75in, 9in}]{geometry} to change the margin width.
  • Single-spaced abstract.
  • Double-spaced main text.
  • Wrapping of sentences written one per line for sane version control.
  • Helvetica font.
  • Page numbers in the upper right-hand corner.
  • No page number on the first page.
  • The LaTeX header is in a drawer so you do not have to look at it when working in Emacs.
  • Comments are now in GUIDANCE drawers that can be closed with Shift-TAB in org-mode to reduce clutter. The contents of these drawers are not printed on export to PDF.

Installation

  1. Git clone the repo git clone https://github.com/MooersLab/manuscriptInOrg.git.
  2. Copy main.org to your project folder.
  3. Load main.org file in Emacs via the File pulldown menu or C-x C-f.
  4. Edit the file to customize to your manuscript.
  5. Edit the paths to your global.bib file and your image files.
  6. Enter C-c C-e l o to compile and open the resulting PDF in your default PDF viewer.

Compiling takes several seconds on a 2018 MacBook Pro with 32 GB of RAM. Org-mode is built into recent versions of Emacs. The main.org file will be compiled into the final PDF without any configuration. Try emacs -Q main.org and then enter C-c C-e l o. The PDF will open in your default PDF viewer.

Assumptions

  1. LaTeX is installed with all of the required style files. However, my installation was missing the break cities.sty file. I installed this with the sudo port install texlive-bibtex-extra command.
  2. You will use the LaTeX cite command and let LaTeX handle the generation of the literature cited section. This package citar, helm-bibtex, ivy-bibtex, or the like can help find the right citekey from inside Emacs.
  3. You can edit org-mode files in other text editors. Many text editors support syntax highlighting for org-mode. VS Code has a package that provides additional support. To get the most out of utilizing org-mode, it is best to utilize it inside of Emacs. Org-mode is now built into GNU Emacs. You can utilize org-mode without any configuration of the init.el file. You can achieve the same effect by starting your current Emacs with the -Q flag, which skips reading your init.el file. The editing and building of a init.el file to extend the features of Emacs can be an activity trap. Frustration associated with errors late during the editing of this file led to Emacs having a reputation for being difficult to master.

Postscript Oct 10, 2022

My approach was developed independently of another solution found here.

Postscript May 16, 2023

I had upgraded my operating system to Ventura, but I had not properly migrated my MacPorts. I found that I was missing the breakcities.sty file.

Related sites

Note that latex-emacs profile has functions for converting LaTex lists into org-markdown lists.

Update history

Version Changes Date
Version 0.2 Added badges, funding, and update table. 2024 May 21
Version 0.3 Updated main.org so it can compile without configuration from an init.el file. 2024 August 18
Version 0.4 Fixed issues with preamble. Put comments in drawers. 2024 August 22
Version 0.5 Put preamble in a drawer. 2024 August 26
Version 0.6 Put GUIDANCE drawers under subheadings with noexport tag. 2024 August 26
Version 0.7 Add urlx package to allow linebreaks in urls. 2024 August 27

Sources of funding

  • NIH: R01 CA242845
  • NIH: R01 AI088011
  • NIH: P30 CA225520 (PI: R. Mannel)
  • NIH: P20 GM103640 and P30 GM145423 (PI: A. West)