emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Richard Lawrence <richard.lawrence@berkeley.edu>
To: emacs-orgmode@gnu.org
Cc: Xavier Garrido <xavier.garrido@gmail.com>
Subject: Re: Enumeration within environment block
Date: Sun, 18 May 2014 09:33:22 -0700	[thread overview]
Message-ID: <87egzrxd0t.fsf@berkeley.edu> (raw)
In-Reply-To: 5377B755.3030601@gmail.com

Hi Xavier,

Xavier Garrido <xavier.garrido@gmail.com> 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

  reply	other threads:[~2014-05-18 16:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-17 19:24 Enumeration within environment block Xavier Garrido
2014-05-18 16:33 ` Richard Lawrence [this message]
2014-05-19  8:21 ` Eric S Fraga

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87egzrxd0t.fsf@berkeley.edu \
    --to=richard.lawrence@berkeley.edu \
    --cc=emacs-orgmode@gnu.org \
    --cc=xavier.garrido@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).