emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <carsten.dominik@gmail.com>
To: Eric S Fraga <e.fraga@ucl.ac.uk>
Cc: org-mode mailing list <emacs-orgmode@gnu.org>
Subject: Re: [beamer &/or latex export] problem with old style footnotes
Date: Fri, 8 Jan 2010 17:47:06 +0100	[thread overview]
Message-ID: <B9E38634-BA8D-4AB4-9C87-320D511ADBCB@gmail.com> (raw)
In-Reply-To: <87637ezth2.wl%ucecesf@ucl.ac.uk>

Hi Eric,

On Jan 7, 2010, at 12:47 AM, Eric S Fraga wrote:

> Carsten,
>
> In latex, I often use a simple \begin{itemize} with labelled items,  
> as in
>
> \begin{itemize}
> \item [3] This will be labelled with 3 instead of a bullet
> \item [$\checkmark$] This will have a checkmark in lieu of the bullet
> \end{itemize}
>
> In org-mode, with beamer mode, I can do this except for the cases
> where the replacement text is just a number as org-mode seems to treat
> this as a footnote.  I have fninline set in the startup as well as
> org-footnote-define-inline set to t globally but the export still
> treats these old style footnotes as footnotes.


Hmm, this is not an easy thing.  The syntax you are using is entirely
LaTeX specific, so it will fail in other export backends.
Therefore I am hesitating to put this in as a standard feature.

If you want to have this, you could do the following.  It installs
a function into the export process that will protect such item
bullets from further processing.  The regexp looks quite
complex - this is only because there are 5 different
types of bullets and we also must make sure that a level
1 headline will not be mistaken for a plain list item.
What this really does is finding square brackets at
the beginning of an item, and adding a text property to prevent
further processing.

Hope that does what you need.

- Carsten

---------------------------------------------------------------------------

(defun protect-item-bullets ()
   (goto-char (point-min))
   (while (re-search-forward
	  "\\([ \t]*\\([-+]\\|\\([0-9]+[.)]\\)\\)\\|[ \t]+\\*\\) +\\(\\[[^] 
[\n]+\\] \\)" nil t)
     (put-text-property (match-beginning 4) (match-end 4) 'org- 
protected t)))

(add-hook 'org-export-preprocess-hook 'protect-item-bullets)

  reply	other threads:[~2010-01-08 17:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-06 23:47 [beamer &/or latex export] problem with old style footnotes Eric S Fraga
2010-01-08 16:47 ` Carsten Dominik [this message]
2010-01-08 19:27   ` 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=B9E38634-BA8D-4AB4-9C87-320D511ADBCB@gmail.com \
    --to=carsten.dominik@gmail.com \
    --cc=e.fraga@ucl.ac.uk \
    --cc=emacs-orgmode@gnu.org \
    /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).