From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kaushal Modi Subject: Re: Help with writing plain list followed by description list [ox-latex] Date: Tue, 15 Mar 2016 23:25:54 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113ce682a33959052e221444 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47106) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ag26V-0005HG-Gn for emacs-orgmode@gnu.org; Tue, 15 Mar 2016 23:26:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ag26U-0006uz-CD for emacs-orgmode@gnu.org; Tue, 15 Mar 2016 23:26:35 -0400 Received: from mail-oi0-x22a.google.com ([2607:f8b0:4003:c06::22a]:35499) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ag26U-0006uv-5K for emacs-orgmode@gnu.org; Tue, 15 Mar 2016 23:26:34 -0400 Received: by mail-oi0-x22a.google.com with SMTP id c203so29098904oia.2 for ; Tue, 15 Mar 2016 20:26:34 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-org list --001a113ce682a33959052e221444 Content-Type: text/plain; charset=UTF-8 Ah, found the solution after I RTFM :) *C-h i g (org) Plain lists* "A list ends whenever every item has ended, which means before any line less or equally indented than items at top level. It also ends before two blank lines(5)." Here's the solution: ============================================================== * Good (with 2 blank lines) - Plain list item - Description :: Description list became part of plain list here! ============================================================== -- Kaushal Modi On Tue, Mar 15, 2016 at 11:15 PM, Kaushal Modi wrote: > Hi, > > I need help on generating a latex export correctly for the case where a > description list has to immediately follow a plain list. > > Below is a MWE that demonstrates the problem and here is a screenshot of > the generated PDF ( http://i.imgur.com/FEjN099.png ). Note how the > Description list item looks under "Bad" section (generated using org) vs > "Good" section (generated using latex code directly). > > ============================================================== > > * Bad > - Plain list item > - Description :: Description list became part of plain list here! > ----- > Above does not work because org exports it to \LaTeX as below. > #+BEGIN_EXAMPLE > \section{Bad} > \label{sec:orgheadline1} > \begin{itemize} > \item Plain list item > \item[{Description}] Description list became part of plain list here! > \end{itemize} > #+END_EXAMPLE > ----- > Note that the description list item comes *before* =\end{itemize}=. > > *How do I tell org to end the =itemize= block at the last plain list item > and begin =description= block before the first description list item?* > > -- OR -- > > *What should I write in org to generate the below?* > > ----- > #+BEGIN_EXPORT latex > \section{Good} > \label{sec:orgheadline2} > \begin{itemize} > \item Plain list item > \end{itemize} > \begin{description} > \item[{Description}] This looks fine because I have moved the description > list out of the plain list. > \end{description} > #+END_EXPORT > ----- > > ============================================================== > > > > > > -- > Kaushal Modi > --001a113ce682a33959052e221444 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Ah, found the solution after I RTFM :)

= C-h i g=C2=A0(org) Plain lists

"A= list ends whenever every item has ended, which means before any
= line less or equally indented than items at top level.=C2=A0 It also ends
before two blank lines(5)."

Here's the solution:

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
* Good (with = 2 blank lines)
- Plain list item


- Description :: Description list became part of plain lis= t here!
=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D


<= br>--
Kaushal Modi

On Tue, Mar 15, 2016 at 11:15 PM, Kaushal Mo= di <kaushal.modi@gmail.com> wrote:
Hi,

I need help on gene= rating a latex export correctly for the case where a description list has t= o immediately follow a plain list.

Below is a MWE = that demonstrates the problem and here is a screenshot of the generated PDF= ( http://i.im= gur.com/FEjN099.png ). Note how the Description list item looks under &= quot;Bad" section (generated using org) vs "Good" section (g= enerated using latex code directly).

=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D

* Bad
- Pl= ain list item
- Description :: Description list became part of pl= ain list here!
-----
Above does not work because org ex= ports it to \LaTeX as below.
#+BEGIN_EXAMPLE
\section{B= ad}
\label{sec:orgheadline1}
\begin{itemize}
= \item Plain list item
\item[{Description}] Description list becam= e part of plain list here!
\end{itemize}
#+END_EXAMPLE<= /div>
-----
Note that the description list item comes *before= * =3D\end{itemize}=3D.

*How do I tell org to end t= he =3Ditemize=3D block at the last plain list item and begin =3Ddescription= =3D block before the first description list item?*

-- OR --

*What should I write in org to generate = the below?*

-----
#+BEGIN_EXPORT latex
\section{Good}
\label{sec:orgheadline2}
\begin= {itemize}
\item Plain list item
\end{itemize}
\begin{description}
\item[{Description}] This looks fine because= I have moved the description list out of the plain list.
\end{de= scription}
#+END_EXPORT
-----

=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

<= br>



--Kaushal Modi

--001a113ce682a33959052e221444--