| by Arround The Web | No comments

The org-mode LaTeX exporter: LaTeX for non-TEXers

The org-mode LaTeX exporter: LaTeX for non-TEXers

By: Pedro A. Aranda Gutiérrez

This article shows how to configure and use the org-mode provided by Emacs to produce pretty documents. org is a multi-purpose structured text file format and Emacs can translate it to LaTeX files which, in turn, can be translated into pretty PDF documents, taking advantage of all the typesetting facilities provided by LaTeX. This is a compendium of tricks evolved out of the experience of working with Emacs, org-mode and LaTeX.

1 Introduction

I got exposed to Emacs in the 1990’s when I used Unix mainframes and VT220 terminals for work. At the beginning, it was just my programmer’s editor and when I got used to it, I looked for ports to use at home. Initially a dream, it became a reality, first with a port[10] and them, when I installed my first Linux (from a floppy-disk set). Much later, I started to be exposed to LaTeX. It wasn’t until I was working on my PhD that I fully understood its potential when my Office suite collapsed on a last minute template change for a conference. It took me less time to install the full texlive distribution, export my paper to LaTeX, clean up the result and change the template than to fix the original document after changing the template. What I have always liked in LaTeXis that what you write is what you mean. The use of tags is a minor inconvenience for me.

The next step in what you write is what you mean path after LaTeXwas org-mode. Initially a hint from my PhD advisor as a nice way to produce slides, it took me some time to realize its full potential both for presentations and documents. org-mode is included in the stock Emacs code.

You can always be in the forefront and get the most recent public version of org-mode from the repositories, but a fairly recent version of Emacs guarantees a nice, up-to-date feature set in org-mode. In my case I use an Emacs 28.0.9x, a pre-release of the next stable Emacs which I compile myself once a week, both on Ubuntu 20.04 and macOS. If you want to produce a nice PDF file from org-mode, you rely on its LaTeXexporter and use a TEX distribution like texlive in Linux or MacTeX in macOS for typesetting and output generation.

To prove my case, I keep this article in an org file that I use to explore org mode features. It is a living demo of how nicely you can write things using org-mode and then generate PDFs using LaTeX. My main sources of inspiration are the org-mode documentation[8] and an oldish Cookbook[4] and all those moments where I’m working on a document and feel that something is missing.

Share Button

Source: Linux Journal - The Original Magazine of the Linux Community

Leave a Reply