[-- 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
Patch 700 (http://patchwork.newartisans.com/patch/700/) is now "Accepted". Maintainer comment: none This relates to the following submission: http://mid.gmane.org/%3CAANLkTi%3DbFiJvyJZy4vsEvP%2BbMDastWXSB6u72LDPLVqs%40mail.gmail.com%3E Here is the original message containing the patch: > Content-Type: text/plain; charset="utf-8" > MIME-Version: 1.0 > Content-Transfer-Encoding: 7bit > Subject: [O] Fix html export of footnotes with lists, tables, quotes, etc. > Date: Fri, 18 Mar 2011 16:52:05 -0000 > From: Puneeth Chaganti <punchagan@gmail.com> > X-Patchwork-Id: 700 > Message-Id: <AANLkTi=bFiJvyJZy4vsEvP+bMDastWXSB6u72LDPLVqs@mail.gmail.com> > To: emacs-orgmode <emacs-orgmode@gnu.org> > > Hi, > > Attached is a patch that allows having lists, tables, blockquotes and > other org blocks in footnotes. Source code blocks still don't work. > > > 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) >
On Wed, Mar 23, 2011 at 7:38 PM, Bastien Guerry <bzg@altern.org> wrote:
> Patch 700 (http://patchwork.newartisans.com/patch/700/) is now "Accepted".
Thanks.
But, it looks like the commit message doesn't get into patchwork or is
it that Bastien changed my bad commit message? My commit message also
mentioned that src code blocks don't work, and it possibly because of
new lines being inserted. Bastien, did you remove it because it was
irrelevant?
If the commit message was changed because, Bastien didn't notice it,
can someone tell me the right way to send patches? I just want to
reduce Bastien's trouble and this is leading to duplication of work,
as well.
Thanks,
Puneeth
Hi Puneeth, Puneeth Chaganti <punchagan@gmail.com> writes: > But, it looks like the commit message doesn't get into patchwork or is > it that Bastien changed my bad commit message? My commit message also > mentioned that src code blocks don't work, and it possibly because of > new lines being inserted. Your commit message went to the patchwork and I cleaned it up, yes. > Bastien, did you remove it because it was irrelevant? I probably should have kept this information, sorry. I prefered to have a commit message saying what the commit does and not what it does not -- thinking another commit will come soon and complete it. > If the commit message was changed because, Bastien didn't notice it, > can someone tell me the right way to send patches? I noticed it, don't worry :) > I just want to reduce Bastien's trouble and this is leading to > duplication of work, as well. Thanks a lot for that -- the best way to send patches/commits to the list is by using the command "git send-email". Otherwise, the message of the email is taken as the commit message by patchwork, and that I need to reedit a bit. But any other way is okay too, as long as I have the information. Best, -- Bastien
Hi Bastien, On Wed, Mar 23, 2011 at 8:00 PM, Bastien <bzg@altern.org> wrote: > Hi Puneeth, > > Puneeth Chaganti <punchagan@gmail.com> writes: > >> But, it looks like the commit message doesn't get into patchwork or is >> it that Bastien changed my bad commit message? My commit message also >> mentioned that src code blocks don't work, and it possibly because of >> new lines being inserted. > > Your commit message went to the patchwork and I cleaned it up, yes. Okay. >> Bastien, did you remove it because it was irrelevant? > > I probably should have kept this information, sorry. I prefered to > have a commit message saying what the commit does and not what it does > not -- thinking another commit will come soon and complete it. It's alright. I didn't have the time to look into it. But now I'm motivated to look into it. ;) >> If the commit message was changed because, Bastien didn't notice it, >> can someone tell me the right way to send patches? > > I noticed it, don't worry :) Okay. :) >> I just want to reduce Bastien's trouble and this is leading to >> duplication of work, as well. > > Thanks a lot for that -- the best way to send patches/commits to the > list is by using the command "git send-email". Otherwise, the message > of the email is taken as the commit message by patchwork, and that I > need to reedit a bit. But any other way is okay too, as long as I have > the information. Ok. I am behind a proxy and not very sure how to get this working. Will look into this again, hopefully, this time with some success. Thanks, Puneeth
Puneeth
> Attached is a patch that allows having lists, tables, blockquotes and
> other org blocks in footnotes. Source code blocks still don't work.
>
Would you mind posting an example test case that covers all the above
cases. I am trying to merge my branch with the most recent changes in
the master. I would like to make sure that I break nothing when my
changes gets merged to the master.
Jambunathan K.
[-- Attachment #1: Type: text/plain, Size: 664 bytes --] Hi Jambunathan, Sorry for the delayed response, but here is a test case that covers the above cases. On Sun, Mar 27, 2011 at 4:28 PM, Jambunathan K <kjambunathan@gmail.com> wrote: > > Puneeth > >> Attached is a patch that allows having lists, tables, blockquotes and >> other org blocks in footnotes. Source code blocks still don't work. >> > > Would you mind posting an example test case that covers all the above > cases. I am trying to merge my branch with the most recent changes in > the master. I would like to make sure that I break nothing when my > changes gets merged to the master. > > Jambunathan K. > > > -- Puneeth [-- Attachment #2: footnotes.org --] [-- Type: application/octet-stream, Size: 416 bytes --] #+TITLE: Example * First This is a footnote [fn:table] with a table and this is a footnote with a list [fn:list] * Second Finally a footnote with a Quote [fn:quote] [fn:quote] I love this quote #+begin_quote If humans could mate with software, I'd have org-mode's babies. #+end_quote [fn:table] Here's a table | a | b | |-----+-----| | one | two | [fn:list] And below is a list - R - python - elisp
>
> On Sun, Mar 27, 2011 at 4:28 PM, Jambunathan K <kjambunathan@gmail.com> wrote:
>>
>> Puneeth
>>
>>> Attached is a patch that allows having lists, tables, blockquotes and
>>> other org blocks in footnotes. Source code blocks still don't work.
>> Would you mind posting an example test case that covers all the above
>> cases. I am trying to merge my branch with the most recent changes in
>> the master. I would like to make sure that I break nothing when my
>> changes gets merged to the master.
>>
> Hi Jambunathan,
>
> Sorry for the delayed response, but here is a test case that covers
> the above cases.
I have added your org sample to my test.org file. org-parse.el & Co
seems DTRT even without a fix.
During the verification process, I discovered that having a Table in a
Footnote section is "forbidden" by atleast OpenOffice i.e., While
creating the footnote definition, "Insert" of "Tables" is greyed out in
the UI.
I am not sure what the OpenDocument spec says about having Tables in
Footnotes.
Anyways that is where things stand wrt tables in footnotes. This is for
the sake of public record.
Jambunathan K.
--