How can I use org-mode to write LaTeX for scientific journals?

I write most texts using org-mode now, and I often use it to create a PDF file through LaTeX (xelatex, specifically). But now I want to use it to write scientific articles, and magazines often want me to use a certain style. This includes a .cls file, which is quite simple using the org-latex classes, but quite often they require a certain setting, following \ begin {document} (i.e. a specific abstract section, funky author and affiliate, etc. etc., and I donโ€™t see how to do it, that is, I am now doing this in the # + begin / end_latex section, but I need to completely rewrite this if I switch the style.

I understand that at some point I probably need to tinker with LaTeX code, but I would like to minimize this game as little as possible, and I would like to be able to switch from one magazine to another with minimal fuss and save my source in org-mode as much as possible.

+5
source share
3 answers

See clause 3 at http://kitchingroup.cheme.cmu.edu/blog/2014/08/08/What-we-are-using-org-mode-for/

There is a list of documents that we wrote in org-mode and exported to LaTeX. We probably have 8 more from this position.

In SI, you can find the org source embedded in the PDF, and here: Spencer D. Miller, Vladimir V. Pushkarev, Andrew J. Gellman and John R. Kitchin, Modeling Temperature Programmed Oxygen Desorption on Pt (111). The use of decaying desorption barriers using DFT with dependent properties, topics in Catalysis, 57 (1), 106-117 (2013). http://link.springer.com/article/10.1007%2Fs11244-013-0166-3 you can even find a built-in manuscript.

You can also check https://github.com/jkitchin/org-ref for citation management and https://github.com/jkitchin/jmax/blob/master/ox-manuscript.el for our export.

+7
source

Depending on the amount of latex polishing you need to make it easier, just add some things to your org file and use a little babel directly. Here is a snippet of what the beginning of one of my files might look like. Some of them are there because I will also have R code for statistical analysis in the org file, in order to have a more reproducible workflow:

# -*- mode: org; org-export-babel-evaluate: nil -*- #+Title: This is my title #+Author: An Author, Another Author, and Last Author #+Options: toc:nil ':t *:nil -:nil ::nil <:nil ^:t author:td:t H:5 |:t #+Property: header-args:R :session *myarticlessection* :results output :exports both :cache yes #+Latex_Class: article #+Latex_Class_Options: [12pt] #+Latex_Header: \usepackage{amsmath} #+Latex_Header: \usepackage[T1]{fontenc} #+Latex_Header: \usepackage{mathptmx} #+Latex_Header_Extra: \linespread{1.5} #+LATEX_HEADER: \usepackage[citestyle=authoryear-icomp,bibstyle=authoryear, hyperref=true,backref=true,maxcitenames=3,url=true,backend=biber,natbib=true] {biblatex} #+Latex_header: \addbibresource{myarticles.bib} #+BEGIN_SRC latex :results output \begin{abstract} Here is where I put the abstract. \end{abstract} #+END_SRC #+RESULTS: #+BEGIN_LaTeX \begin{abstract} And this is where it ended up after evaluating the babel block. \end{abstract} #+END_LaTeX 
+1
source

I used org-mode to write several documents, including my Ph.D. It really helped me keep track of open issues, priorities, annotations, etc.

I use a small custom converter that reads a .org file and exports parts of it to a .tex file. Please note that the "normal" text in org-mode (including headings, text, priorities, keywords, etc.) is not exported, but only the material between the #BEGIN_LaTeX and #END_LaTeX tags. Thus, you can create annotations as you wish, which will not be displayed in the published text.

0
source

Source: https://habr.com/ru/post/1237853/


All Articles