emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Puneeth Chaganti <punchagan@gmail.com>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: [PATCH] Fix html export of footnotes with lists, tables, quotes, etc.
Date: Fri, 18 Mar 2011 17:22:05 +0530	[thread overview]
Message-ID: <AANLkTi=bFiJvyJZy4vsEvP+bMDastWXSB6u72LDPLVqs@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 157 bytes --]

Hi,

Attached is a patch that allows having lists, tables, blockquotes and
other org blocks in footnotes.  Source code blocks still don't work.

-- 
Puneeth

[-- Attachment #2: 0001-Fix-html-export-of-footnotes-with-lists-tables-quote.txt --]
[-- Type: text/plain, Size: 1320 bytes --]

From 33eb1aaca6b5f5b862207d8edec3c0e9599b7464 Mon Sep 17 00:00:00 2001
From: Puneeth Chaganti <punchagan@gmail.com>
Date: Fri, 18 Mar 2011 17:10:11 +0530
Subject: [PATCH] Fix html export of footnotes with lists, tables, quotes, etc.

* lisp/org-html.el: (org-export-as-html): Change the regexp that
  searches for footnotes before adding them to the html footnotes
  section.

Code blocks still don't work.  Something in their exporting,
changes things (probably new lines being inserted).  This needs
to be looked into.
---
 lisp/org-html.el |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/lisp/org-html.el b/lisp/org-html.el
index c6f26b5..11ef9ef 100644
--- a/lisp/org-html.el
+++ b/lisp/org-html.el
@@ -1690,9 +1690,12 @@ lang=\"%s\" xml:lang=\"%s\">
 
       (save-excursion
 	(goto-char (point-min))
-	(while (re-search-forward "<p class=\"footnote\">[^\000]*?\\(</p>\\|\\'\\)" nil t)
-	  (push (match-string 0) footnotes)
-	  (replace-match "" t t)))
+	(while (re-search-forward 
+		"\\(\\(<p class=\"footnote\">\\)[^\000]*?\\)\\(\\(\\2\\)\\|\\'\\)" 
+		nil t)
+	  (push (match-string 1) footnotes)
+	  (replace-match "\\4" t nil)
+	  (goto-char (match-beginning 0))))
       (when footnotes
 	(insert (format org-export-html-footnotes-section
 			(nth 4 lang-words)
-- 
1.7.4.1


             reply	other threads:[~2011-03-18 11:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-18 11:52 Puneeth Chaganti [this message]
2011-03-23 14:08 ` [Accepted] Fix html export of footnotes with lists, tables, quotes, etc Bastien Guerry
2011-03-23 14:21   ` Puneeth Chaganti
2011-03-23 14:30     ` Bastien
2011-03-23 14:37       ` Puneeth Chaganti
2011-03-27 10:58 ` [PATCH] " Jambunathan K
2011-03-29  9:20   ` Puneeth Chaganti
2011-07-10 16:03     ` Jambunathan K

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='AANLkTi=bFiJvyJZy4vsEvP+bMDastWXSB6u72LDPLVqs@mail.gmail.com' \
    --to=punchagan@gmail.com \
    --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).