From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Elston Subject: Re: latex enumeration issue Date: Wed, 03 Feb 2010 12:41:38 -0800 Message-ID: <4B69DF82.70407@comcast.net> References: <4B68A26A.3030509@comcast.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ncm2s-0000lq-4R for emacs-orgmode@gnu.org; Wed, 03 Feb 2010 15:41:54 -0500 Received: from [199.232.76.173] (port=41261 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ncm2r-0000la-RB for emacs-orgmode@gnu.org; Wed, 03 Feb 2010 15:41:53 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Ncm2p-0005zV-9M for emacs-orgmode@gnu.org; Wed, 03 Feb 2010 15:41:53 -0500 Received: from qmta06.westchester.pa.mail.comcast.net ([76.96.62.56]:51344) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Ncm2o-0005zI-QR for emacs-orgmode@gnu.org; Wed, 03 Feb 2010 15:41:51 -0500 In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Carsten Dominik Cc: org-mode emacs-orgmode Hi Carsten, Thanks for the reply. My responses are below: On 2/3/2010 2:34 AM, Carsten Dominik wrote: > Hi Mark, > > On Feb 2, 2010, at 11:08 PM, Mark Elston wrote: > >> A year ago Flavio de Souza asked a question about latex enumerations >> that is similar to a problem I now have. The answer given then was a >> workaround that doesn't apply in my case. >> >> This stems from my project of using a single file to maintain source >> for generating my class notes *and* student handouts for my classes. >> This allows me to take advantage of the common outline and common >> text while specifying text that should go into only one or the other >> document. >> >> I manage to do this by something like: >> >> * Common heading >> >> Some common text >> >> ** A common subheading >> >> More common text >> >> *** :handouts: >> Something for handouts only >> >> *** :both: >> More common text >> >> *** :notes: >> My class notes text >> >> *** :both: >> More common text >> >> >> I have a makefile which creates a temporary .org file by >> prepending a specific header on this file for each type of >> output (handouts or notes), exporting to a latex file, running >> a perl script to remove any (sub)+sections with just the >> tags in them, and running pdflatex to generate the output. >> >> So far, so good. >> >> However, I ran into a problem with enumerations. Sometimes I >> have enumerations in my original org file which are separated by >> the 'empty' sectioning commands. This ends the enumeration and >> the next enumerated item starts a new one. The result is a set >> of enumerations with a single element in it. I get something >> like: >> >> 1. Blah >> >> handout-specific text >> >> 1. More Blah >> >> etc. These should really have been 1, 2, etc. > > > I don't understand. Why is the text "handout-specific text" still there? > Do you need it between the items? Yes (see below). I have in each of these items something I want as part of the handouts and some additional info I want to include for myself. > Do you want to make it part of the > item (indentation would solve this). It will always be a part of the item, otherwise I would have made it a footnote or left it to after the enumeration. Unfortunately, indentation doesn't solve this. My example above was a little shy on details, sorry. If I have a file with: ------------------------------------ #+EXPORT_EXCLUDE_TAGS: notes * Common Heading Common Text 1) Blah ** :handouts: handout-specific text ** :notes: note-specific text ** :both: 2) More Blah ** :handouts: handout-specific text ** :notes: note-specific text ** :both: 3) Even more... ------------------------------------ After I export to latex and post process with my perl script I have the following for the body of my document: ------------------------------------ \section{Common Heading} \label{sec-1} Common Text \begin{enumerate} \item Blah \end{enumerate} handout-specific text \begin{enumerate} \item More Blah \end{enumerate} handout-specific text \begin{enumerate} \item Even more\ldots{} \end{enumerate} ------------------------------------ This is because the 'empty' placeholder headings (tags-only) interrupt the enumeration processing for each item, effectively ending it and causing the insertion of the \end{enumeration}. So each item is in it's own enumeration and the number restarts from 1 with each item. > >> >> The only workaround I have so far is to make all these items lists >> instead of enumerations. This works OK but they would make much more >> sense as enumerations. > > > How does this help? > It eliminates the numbers and uses only list marks instead. That way I don't have to worry about incorrect numbering of enumerations. Unfortunately, the text between items is still not indented properly since it appears outside the list environment. It is not ideal but it is something I can live with if I have to. Mark