3

I have noticed there is a big gap between the elements of a list when exporting to PDF. Is there a way to modify it?

4

PDF export is done by exporting the org mode document to LaTeX and then processing the LaTeX document to PDF. There is nothing on the org mode side to control that spacing but org mode does provide mechanisms to influence what LaTeX to produce: the downside is that you have to know some LaTeX to do that.

For example, there is a LaTeX package called enumitem that allows you to pass options to the itemize environment and change its appearance. One such option is noitemsep which squishes list items together as much as possible. See this page for more details.

There are two things that you need to do in your org mode file to take advantage of that: 1) make sure that the enumitem package is loaded when your LaTeX file is processed by adding a \usepackage{enumitem} using the org mode #+LATEX_HEADER: construct; 2) make sure that the itemize environment gets a noitemsep option by using the #+ATTR_LATEX: :options construct. More details on these can be found on the org mode manual: see the LaTeX Export section and the following subsections: LaTeX header and sectioning structure and Plain lists in LaTeX.

Here's an example:

#+LATEX_HEADER: \usepackage{enumitem}

* Tasty Pudding
** Ingredients
#+ATTR_LATEX: :options [noitemsep]
- Milk
- Sugar
- Eggs
- Flavorings
** Process
1. Mix the eggs and sugar
2. Heat up the milk and flavorings
3. Temper the milk into the egg mixture
4. Cook the pudding
** Description
It's my favorite pudding

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.