From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richard Lawrence Subject: Re: Enumeration within environment block Date: Sun, 18 May 2014 09:33:22 -0700 Message-ID: <87egzrxd0t.fsf@berkeley.edu> References: <5377B755.3030601@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53598) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wm4Ht-0007PN-HV for emacs-orgmode@gnu.org; Sun, 18 May 2014 12:50:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wm4Hn-0006tW-6z for emacs-orgmode@gnu.org; Sun, 18 May 2014 12:50:13 -0400 Received: from plane.gmane.org ([80.91.229.3]:53474) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wm4Hn-0006qf-0F for emacs-orgmode@gnu.org; Sun, 18 May 2014 12:50:07 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Wm43D-0005lx-Og for emacs-orgmode@gnu.org; Sun, 18 May 2014 18:35:03 +0200 Received: from c-67-164-45-159.hsd1.ca.comcast.net ([67.164.45.159]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 18 May 2014 18:35:03 +0200 Received: from richard.lawrence by c-67-164-45-159.hsd1.ca.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 18 May 2014 18:35:03 +0200 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-orgmode@gnu.org Cc: Xavier Garrido Hi Xavier, Xavier Garrido writes: > The problem is that the enumeration number gets lost either in the > =enumerate= env. in LaTeX or the =ol= tags in html and thus question > restart to number 1 every time I have a BEGIN_QUESTION/END_QUESTION > block. Is there a way to solve that issue or at least to force the > item number ? (for instance, in LaTeX I can write \item[1],\item[2] > and in html I can set the =ol= start value). I don't have any real advice for HTML (CSS counters??) but there are some solutions that exist in the LaTeX world for cumulative numbering like this. The solutions I am most familiar with are the linguex[1], gb4e[2], and philex[3] packages. (These are packages for linguists, who often need a running set of examples with text in between -- though they also have linguistics-specific stuff that you probably don't need.) There is also the enumitem[4] package. I don't have much experience with this but it may work for you. I wrote a custom exporter for Org that adds support for exporting Org lists to the numbered example environments used by linguex and gb4e. It is called ox-linguistics[5] and is posted on Github. If you like the solution provided by linguex or gb4e at the LaTeX level, this would allow you to access it from Org, without having to write embedded LaTeX. It also lets you refer back to examples (questions, in your case) using Org targets and links. ox-linguistics is still alpha-quality and I may make some significant changes to it soon, but I have been using it for a while now to compile my dissertation, and it's been meeting my needs pretty well. Let me know what you think. [1] http://www.ctan.org/pkg/linguex [2] http://www.ctan.org/pkg/gb4e [3] http://www.ctan.org/pkg/philex [4] http://www.ctan.org/pkg/enumitem [5] https://github.com/wyleyr/ox-linguistics -- Best, Richard