[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] [ANN] Changes to lists
From: |
Eric S Fraga |
Subject: |
Re: [Orgmode] [ANN] Changes to lists |
Date: |
Sun, 06 Feb 2011 15:34:21 +0000 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) |
Nicolas Goaziou <address@hidden> writes:
[...]
> Normally, lists should not pay attention to anything inside blocks so
> I highly doubt it is related to indentation of code.
The on-going saga of lists and blocks! Sorry about this...
Attached is a simple org file which includes latex, html and babel
source code blocks:
# -*- coding: utf-8; -*-
#+TITLE: examplebug.org
#+AUTHOR: Eric S Fraga
#+EMAIL: address@hidden
#+OPTIONS: H:3 num:nil toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
#+OPTIONS: TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil tags:nil
#+latex_header: \usepackage{tikz}
* latex code block within list
1. I have a list
2. with several items
3. and then one of them includes some latex:
#+begin_latex
\begin{tikzpicture}[x=2cm,y=2cm]
\draw [red] (0,0) -- (2,2);
\end{tikzpicture}
#+end_latex
4. subsequent list items start a new list
5. if we include some html
#+begin_html
<img src="mip.png" alt="Mixed integer programming">
#+end_html
6. that works fine.
7. if we include a babel code block
#+begin_src octave :exports code :var x=20
3*x+5
#+end_src
#+results:
: 65
8. that also works just fine.
The latter two do not cause any problems with an
enumerated list; the first does unfortunately. I've attached the
resulting latex file as well.
% Created 2011-02-06 Sun 15:29
\documentclass{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{fixltx2e}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{float}
\usepackage{wrapfig}
\usepackage{soul}
\usepackage{textcomp}
\usepackage{marvosym}
\usepackage[integrals]{wasysym}
\usepackage{latexsym}
\usepackage{amssymb}
\usepackage{hyperref}
\tolerance=1000
\usepackage{xcolor}
\usepackage{listings}
\usepackage{amsmath}
\usepackage{tikz}
\providecommand{\alert}[1]{\textbf{#1}}
\begin{document}
\title{examplebug.org}
\author{Eric S Fraga}
\date{06 February 2011}
\maketitle
\section*{latex code block within list}
\label{sec-1}
\begin{enumerate}
\item I have a list
\item with several items
\item and then one of them includes some latex:
\end{enumerate}
\begin{tikzpicture}[x=2cm,y=2cm]
\draw [red] (0,0) -- (2,2);
\end{tikzpicture}
\begin{enumerate}
\item subsequent list items start a new list
\item if we include some html
\item that works fine.
\item if we include a babel code block
\lstset{language=octave}
\begin{lstlisting}
3*x+5
\end{lstlisting}
\item that also works just fine.
\end{enumerate}
\end{document}
Any suggestions? I cannot see why latex, html and babel should be
handled any differently... I guess I could move from using begin_latex
to "begin_src latex" instead?
Thanks,
eric
--
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.4 (release_7.4.317.gca220.dirty)