From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: [beamer &/or latex export] problem with old style footnotes Date: Fri, 8 Jan 2010 17:47:06 +0100 Message-ID: References: <87637ezth2.wl%ucecesf@ucl.ac.uk> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NTIzk-0005hI-6n for emacs-orgmode@gnu.org; Fri, 08 Jan 2010 12:51:32 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NTIzf-0005eQ-Af for emacs-orgmode@gnu.org; Fri, 08 Jan 2010 12:51:31 -0500 Received: from [199.232.76.173] (port=56029 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NTIzf-0005eJ-0j for emacs-orgmode@gnu.org; Fri, 08 Jan 2010 12:51:27 -0500 Received: from ey-out-1920.google.com ([74.125.78.145]:27604) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NTIze-0004Hu-Fn for emacs-orgmode@gnu.org; Fri, 08 Jan 2010 12:51:26 -0500 Received: by ey-out-1920.google.com with SMTP id 4so3038951eyg.34 for ; Fri, 08 Jan 2010 09:51:22 -0800 (PST) In-Reply-To: <87637ezth2.wl%ucecesf@ucl.ac.uk> 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: Eric S Fraga Cc: org-mode mailing list 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)