emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] Fix html export of footnotes with lists, tables, quotes, etc.
@ 2011-03-18 11:52 Puneeth Chaganti
  2011-03-23 14:08 ` [Accepted] " Bastien Guerry
  2011-03-27 10:58 ` [PATCH] " Jambunathan K
  0 siblings, 2 replies; 8+ messages in thread
From: Puneeth Chaganti @ 2011-03-18 11:52 UTC (permalink / raw)
  To: emacs-orgmode

[-- 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


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-07-10 16:03 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-18 11:52 [PATCH] Fix html export of footnotes with lists, tables, quotes, etc Puneeth Chaganti
2011-03-23 14:08 ` [Accepted] " 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

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).