1

I'm wondering if there are some ways to control where org-mode decides to end itemize and description environments in LaTeX export. For example, the following org-mode file:

- Likelihood methods :: missing data are latent variables, find or estimate MLE
- Imputation methods :: use $X$ to impute $Y$, then proceed as with full data
- Inverse propensity weighting (IPW) :: just use complete cases, but weight by propensity
- Likelihood methods are general and elegant, but often difficult to apply
- We will focus on the latter two methods
- Here's another bullet 
\[ 
x+y 
\]
- I want this to be in the same itemize block as the previous item

exports to

\begin{description}
\item[{Likelihood methods}] missing data are latent variables, find or estimate MLE
\item[{Imputation methods}] use \(X\) to impute \(Y\), then proceed as with full data
\item[{Inverse propensity weighting (IPW)}] just use complete cases, but weight by propensity
\item Likelihood methods are general and elegant, but often difficult to apply
\item We will focus on the latter two methods
\item Here's another bullet
\end{description}
\[ 
x+y 
\]
\begin{itemize}
\item I want this to be in the same itemize block as the previous item
\end{itemize}
  1. How can I end the description environment after the first 3 items, and then start an itemize environment after that.
  2. How can I get the display equation to be part of the item, without ending the itemize environment and then starting a new one immediately after the displayed equation. (It messes up the spacing when I do this in Beamer.)
2

Both questions hang on how Org defines plain lists, and on how they end.

A list ends after two blank lines. So, for the first question, a couple of blank lines will do.

For the second, the syntax of plain list items requires that items of the same list must have the same indention on the first line. However, your equation breaks the list's indentation, and thus creates a second list.

It is sufficient that you add the proper lines and indent the equation appropriately:

- Likelihood methods :: missing data are latent variables, find or estimate MLE
- Imputation methods :: use $X$ to impute $Y$, then proceed as with full data
- Inverse propensity weighting (IPW) :: just use complete cases, but weight by propensity


- Likelihood methods are general and elegant, but often difficult to apply
- We will focus on the latter two methods
- Here's another bullet 
  \[ 
  x+y 
  \]
- I want this to be in the same itemize block as the previous item

This exports to:

\begin{description}
\item[{Likelihood methods}] missing data are latent variables, find or estimate MLE
\item[{Imputation methods}] use \(X\) to impute \(Y\), then proceed as with full data
\item[{Inverse propensity weighting (IPW)}] just use complete cases, but weight by
propensity
\end{description}


\begin{itemize}
\item Likelihood methods are general and elegant, but often difficult to apply
\item We will focus on the latter two methods
\item Here's another bullet 
\[ 
  x+y 
  \]
\item I want this to be in the same itemize block as the previous item
\end{itemize}
3
  • Awesome -- thanks! Is there an easy way to select the equation and indent it the appropriate amount? – DavidR Nov 23 '20 at 13:59
  • 2
    Standard emacs mechanisms work: select the usual way (with the mouse or marking one end of the region and moving the other end) and then indent-rigidly (bound to C-x TAB), pressing the right arrow as many times as you want to increase the indentation. – NickD Nov 23 '20 at 14:07
  • 1
    David, Nick's advice is a good one in this case. If you are targeting only LaTeX export, you may also consider using a latex export block for some more indentation support (it must also be indented, as it's part of the list). @NickD Thanks again. – gusbrs Nov 23 '20 at 15:07

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.