emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] [beamer &/or latex export] problem with old style footnote


From: Carsten Dominik
Subject: Re: [Orgmode] [beamer &/or latex export] problem with old style footnotes
Date: Fri, 8 Jan 2010 17:47:06 +0100

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 via email to

[Prev in Thread] Current Thread [Next in Thread]