Re: [O] [PATCH][ANN] org-html/org-odt

2011-05-02 Thread Jambunathan K

Matt

Thanks for trying out the new exporter(s) and sharing your feedback.

 I've been doing a bit of testing and have found that html export fails
 on the following headline:

 --8---cut here---start-8---
 * STARTED Alembert, Preliminary Discourse to the Encyclopedia of Diderot 
 :read:BIB:NEXT:
   :LOGBOOK:
   CLOCK: [2011-04-24 Sun 17:28]--[2011-04-24 Sun 17:54] =  0:26
   CLOCK: [2011-04-23 Sat 15:33]--[2011-04-23 Sat 16:00] =  0:27
   CLOCK: [2011-04-21 Thu 21:01]--[2011-04-21 Thu 21:37] =  0:36
   :END:
  [2011-04-21 Thu 21:01]
 --8---cut here---end---8---

 I've attached the backtrace.



 Debugger entered--Lisp error: (args-out-of-range #(Alembert,
 Preliminary Discourse to the Encyclopedia of Diderot 0 62 (target
 sec-1 fontified t org-category test)) 64 77)
   match-string(1 #(Alembert, Preliminary Discourse to the
 Encyclopedia of Diderot 0 62 (target sec-1 fontified t org-category
 test)))
   (setq txt (replace-match  t nil txt) tags (match-string 1 txt))
   (progn (setq txt (replace-match  t nil txt) tags (match-string 1 txt)))
   (if (string-match (org-re [ ]+:\\([[:alnum:]_@:]+\\):[ ]*$) txt)
 (progn (setq txt (replace-match  t nil txt) tags (match-string 1
 txt
   (when (string-match (org-re [ ]+:\\([[:alnum:]_@:]+\\):[ ]*$) txt)
 (setq txt (replace-match  t nil txt) tags (match-string 1 txt)))

I wasn't able to reproduce this crash locally. May be it has something
to do with your personal settings. I have pushed a fix based on some
reasonable assessment ... Let me know if the problem persists.

 Another comment. The warning about MathJax seemed a bit dire:
 MathJax not supported. Falling back to dvipng

 I assume this means that the odt exporter does not support MathJax. The
 way it is currently worded might make the user think that his/her system
 is lacking something.

I have made the warning more friendly.

 I'm finding that the odt exporter leaves a lot of xml buffers open, even
 after the tmp files they point to are gone. Would there be a way to
 clean up these buffers?

Makeshift xml buffers are now killed on successful export.

Jambunathan K.



Re: [O] [PATCH][ANN] org-html/org-odt

2011-05-01 Thread Matt Lundin
Hi Jambunathan,

Jambunathan K kjambunat...@gmail.com writes:

[...]

 I am not sure if (and when) my changes would get formally integrated.

 I can commit non-trivial effort cycles for bug fixing  integration for
 maybe next 3 weeks. Further down the road, as a maintainer of
 org-odt.el, I am willing to entertain bug and feature requests. However
 it is quite possible that I might turn quirky and less-responsive.

Thanks again for all the work you've done on this exporter! Both the odt
and html output look very good. I plan to throw some more complex
documents at the backends soon.

I've been doing a bit of testing and have found that html export fails
on the following headline:

--8---cut here---start-8---
* STARTED Alembert, Preliminary Discourse to the Encyclopedia of Diderot 
:read:BIB:NEXT:
  :LOGBOOK:
  CLOCK: [2011-04-24 Sun 17:28]--[2011-04-24 Sun 17:54] =  0:26
  CLOCK: [2011-04-23 Sat 15:33]--[2011-04-23 Sat 16:00] =  0:27
  CLOCK: [2011-04-21 Thu 21:01]--[2011-04-21 Thu 21:37] =  0:36
  :END:
 [2011-04-21 Thu 21:01]
--8---cut here---end---8---

I've attached the backtrace.

Another comment. The warning about MathJax seemed a bit dire:

MathJax not supported. Falling back to dvipng

I assume this means that the odt exporter does not support MathJax. The
way it is currently worded might make the user think that his/her system
is lacking something.

Best,
Matt

Debugger entered--Lisp error: (args-out-of-range #(Alembert, Preliminary 
Discourse to the Encyclopedia of Diderot 0 62 (target sec-1 fontified t 
org-category test)) 64 77)
  match-string(1 #(Alembert, Preliminary Discourse to the Encyclopedia of 
Diderot 0 62 (target sec-1 fontified t org-category test)))
  (setq txt (replace-match  t nil txt) tags (match-string 1 txt))
  (progn (setq txt (replace-match  t nil txt) tags (match-string 1 txt)))
  (if (string-match (org-re [  ]+:\\([[:alnum:]_@:]+\\):[  ]*$) txt) 
(progn (setq txt (replace-match  t nil txt) tags (match-string 1 txt
  (when (string-match (org-re []+:\\([[:alnum:]_@:]+\\):[  ]*$) 
txt) (setq txt (replace-match  t nil txt) tags (match-string 1 txt)))
  (let ((txt (save-match-data (org-html-expand (org-export-cleanup-toc-line 
(match-string 3 line) (todo (and org-export-mark-todo-in-toc (or (and 
(match-beginning 2) (not (member ... org-done-keywords))) (and (= level 
umax-toc) (org-search-todo-below line lines level) tags) (while 
(string-match org-any-target-regexp line) (setq line (replace-match (let 
((org-html-protect t)) (org-parse-format (quote FONTIFY) (match-string 1 line) 
target)) t t line))) (when (string-match (org-re [ 
]+:\\([[:alnum:]_@:]+\\):[  ]*$) txt) (setq txt (replace-match  t nil 
txt) tags (match-string 1 txt))) (when (string-match quote-re0 txt) (setq txt 
(replace-match  t t txt))) (while (string-match 
lt;\\(lt;\\)+\\|gt;\\(gt;\\)+ txt) (setq txt (replace-match  t t txt))) 
(org-parse-format (quote TOC-ITEM) (let* ((snumber (org-section-number level)) 
(href (replace-regexp-in-string \\. _ (format sec-%s snumber))) (href (or 
(cdr (assoc href org-export-preferred-target-alist)) href)) (href 
(org-solidify-link-text href))) (org-parse-format (quote TOC-ENTRY) snumber 
todo txt tags href)) level org-last-level) (setq org-last-level level))
  (progn (let ((txt (save-match-data (org-html-expand 
(org-export-cleanup-toc-line (match-string 3 line) (todo (and 
org-export-mark-todo-in-toc (or (and (match-beginning 2) (not ...)) (and (= 
level umax-toc) (org-search-todo-below line lines level) tags) (while 
(string-match org-any-target-regexp line) (setq line (replace-match (let 
((org-html-protect t)) (org-parse-format (quote FONTIFY) (match-string 1 line) 
target)) t t line))) (when (string-match (org-re [ 
]+:\\([[:alnum:]_@:]+\\):[  ]*$) txt) (setq txt (replace-match  t nil 
txt) tags (match-string 1 txt))) (when (string-match quote-re0 txt) (setq txt 
(replace-match  t t txt))) (while (string-match 
lt;\\(lt;\\)+\\|gt;\\(gt;\\)+ txt) (setq txt (replace-match  t t txt))) 
(org-parse-format (quote TOC-ITEM) (let* ((snumber (org-section-number level)) 
(href (replace-regexp-in-string \\. _ (format sec-%s snumber))) (href (or 
(cdr ...) href)) (href (org-solidify-link-text href))) (org-parse-format (quote 
TOC-ENTRY) snumber todo txt tags href)) level org-last-level) (setq 
org-last-level level)))
  (if (and (string-match org-todo-line-regexp line) (not (get-text-property 0 
(quote org-protected) line)) (= (setq level (org-tr-level (- (match-end 1) 
(match-beginning 1) level-offset))) umax-toc)) (progn (let ((txt 
(save-match-data (org-html-expand (org-export-cleanup-toc-line ... (todo 
(and org-export-mark-todo-in-toc (or (and ... ...) (and ... ... tags) 
(while (string-match org-any-target-regexp line) (setq line (replace-match (let 
(...) (org-parse-format ... ... target)) t t line))) (when (string-match 
(org-re [ 

Re: [O] [PATCH][ANN] org-html/org-odt

2011-05-01 Thread Matt Lundin
Matt Lundin m...@imapmail.org writes:

 Hi Jambunathan,

 Jambunathan K kjambunat...@gmail.com writes:

 [...]

 I am not sure if (and when) my changes would get formally integrated.

 I can commit non-trivial effort cycles for bug fixing  integration for
 maybe next 3 weeks. Further down the road, as a maintainer of
 org-odt.el, I am willing to entertain bug and feature requests. However
 it is quite possible that I might turn quirky and less-responsive.

 Thanks again for all the work you've done on this exporter! Both the odt
 and html output look very good. I plan to throw some more complex
 documents at the backends soon.

[...]

I'm finding that the odt exporter leaves a lot of xml buffers open, even
after the tmp files they point to are gone. Would there be a way to
clean up these buffers?

Best,
Matt



Re: [O] [PATCH][ANN] org-html/org-odt

2011-04-26 Thread Jambunathan K

Hello Christian

 - Paragraphs were frequently split up, mid-sentence, by unwanted
paragraph breaks. This bug is a bit of a mystery. The extra
paragraph breaks appear where there is a newline in the text. But I
can't discern any pattern as to why breaks are inserted at these
newlines and not others. Nothing similar happens in HTML export.

 Doest his problem still exists with the new odt exporter. Can you send
 me a sample .org file and the generated .odt file.

 This problem persists. From experimenting a bit, it seems that the
 *line break before a line containing a footnote* is turned into a
 paragraph break. I will send a small sample separately.

Thanks for analysing and isolating the issue. The problem happens (or is
visible) only if the footnote reference occurs in second or subsequent
lines in a paragraph and *not* in the first line [1].

I have a pushed a fix few hours back and the small sample document that
you provided me gets exported just fine. 

I haven't addressed other concerns that you had recorded. I will let you
know once I address them.

I hope the exporter is usable with this new fix.

Jambunathan K.

Footnotes: 

[1] In my original test.org file all the footnote references occur in
the first (and the only) line of paragraph. This is the reason it wasn't
caught by my unit test file. Subsequent to your bug report, I have
updated the test.org file so that future regressions could be easily
caught.

-- 



Re: [O] [PATCH][ANN] org-html/org-odt

2011-04-25 Thread Christian Moe

Hi, Jambunathan,

Sorry, it took me a long time to get around to this. I pulled your 
current version this morning. Tested with LibreOffice 3.3.2, Emacs 
23.3.1 and Org-mode 7.5 under Mac OS X 10.6.7 this time.


You have addressed all my reports, and it's working fine with the test 
document. However, I have two and a half new issues to report for ODT 
output (HTML is fine).


- The centered paragraph is not centered.

- Description lists are now formatted with bulleting (see the enclosed 
output). Both term and description are bulleted, and in addition, 
there's an empty bulleted line between them. IIRC, description lists 
were nicely formatted the last time I tested, so something must have 
broken.


- Radio-target links work perfectly well, but in a slightly different 
way than I expected (must be clicked like external links, not internal 
ones; see below).


On 4/12/11 10:33 AM, Jambunathan K wrote:


Christian

I have fixed most of the issues that you had reported earlier.

I have added two new features:

1. Attaching Custom Styles to the document
- See http://permalink.gmane.org/gmane.emacs.orgmode/40026


I confirm that this works, both with reference to a specific 
styles.xml and with reference to an .odt document.


This is a major advance!


2. TOC and Outline numbering are done natively. i.e.,
Tools-Update-Update All would update TOC index automagically. (This
wasn't the case with earlier exporter)


I hadn't tried that before, but I can confirm that it works now.


* Blocks

There's no syntax highlighting in exported src blocks (ODT and HTML
both). Not a priority?


Currently syntax highlighting is done using htmlize. This package is not
part of Emacs proper and has to be installed separately. Since my setup
instructions doesn't include htmlize as part of load path, HTML source
blocks are uncolored.

As for ODT, fonitification support is missing. I can probably take it up
once my sources gets in to Orgmode proper.


I see, thanks.

For .odt export, there are probably many cases where black-and-white 
is preferable anyway.



The OrgVerse style can, luckily, be changed to something more
poetic...


May be if you can share your config for OrgVerse I can include it in the
default styles file.


Well, like I said, it's user-changeable anyway, and it's probably not 
a heavily used feature, so it's no big deal at all.


Still, I'd suggest basing the default verse on default paragraph 
style, not preformatted; dropping the background/borders; and 
indenting, as with the HTML output. I have done that in the enclosed.


---and while we're at it: Trimming leading spaces from the verse lines 
would be good.


Of course, it could be objected that in much modern verse, layout 
elements are significant, so it would be better to use a fixed-width 
font, like you're doing now, and not mess with the whitespace at all. 
In any case, I'd lose the background and borders.



I have fixed issues with LaTeX: verbatim.


I confirm this is fixed.

Still don't have dvipng working, so I can't report on that.



Everything shows up in HTML, but linebreaks before the
=\end{equation}= line are lost.


In the master branch, the html exporter doesn't seem to be terminating
each line of \begin{equation} ... \end{equation} withbr/. I see your
POV that including of line breaks will make the output pretty. For now I
have retained the existing behaviour of HTML exporter.


OK.


* Links

The link to =Dedicated Target1= under 8.2.3 does not work when clicked
(in odt -- it works in html). Hovering does show a popup,
=.OrgXref.Dedicated-Target1=. All other links work as expected.


I have fixed this.


I confirm that this link is fixed.

Radioed target:
This works, but in a slightly puzzling way. Unlike the other internal 
links, simply clicking the link does not take me to the target. On the 
Mac, I have to CMD-click it, same as when clicking on an external URL.




* Captions, labels, references

(...)

The caption now has a Colon separator.


   - However, the reference to that table appears as a hyperlink saying
 10, and the hyperlink does not appear to work. A cross-reference
 link to Table 1 would be better.



On opening, caption and reference labels include verbatim the
reference key used in the Org source, which was my main concern last
time.

But now I realize that this is not an issue after all! =Tools  Update

Update all= takes care of automatic renumbering of all

labels/references. This should probably be mentioned in the
documentation.


Tools-Update-Update All (OpenOffice.org) will make sure that all
references to Tables and Images are 'correct'. Yes, this needs to be
mentioned in the manual.


Exporting one of my own documents, I also found that:



- A space is inserted before *footnote markers*; it shouldn't be. You
   can't see this in the text document, where there is space before all
   footnote references anyway.


This is now fixed.


- Paragraphs were frequently split up, mid-sentence, 

Re: [O] [PATCH][ANN] org-html/org-odt/org-docbook

2011-04-15 Thread Jambunathan K

 This is a formal request to integrate my org-html.el  org-odt.el
 changes in to the master branch. 

 This patch introduces 3 major features:
 1. A generic exporter
 2. All new html backend re-implemented as a plugin to (1).
 3. A odt backend as a plugin to (1).

 The patch is based on git commit 3d802.

With a day's hack, I was able to make org-docbook.el ride on top of
(1). The changes are in my work-area and I will be committing docbook
changes to my staging branch in few days.

In effect, all html derived exporters (org-html, org-docbook, org-odt)
will ride atop a single core.

Giving a quick heads-up.

Jambunathan K.







Re: [O] [PATCH][ANN] org-html/org-odt

2011-04-12 Thread Jambunathan K

Christian

I have fixed most of the issues that you had reported earlier. 

I have added two new features:

1. Attaching Custom Styles to the document
   - See http://permalink.gmane.org/gmane.emacs.orgmode/40026

2. TOC and Outline numbering are done natively. i.e.,
   Tools-Update-Update All would update TOC index automagically. (This
   wasn't the case with earlier exporter)

 * Blocks

 There's no syntax highlighting in exported src blocks (ODT and HTML
 both). Not a priority?

Currently syntax highlighting is done using htmlize. This package is not
part of Emacs proper and has to be installed separately. Since my setup
instructions doesn't include htmlize as part of load path, HTML source
blocks are uncolored.

As for ODT, fonitification support is missing. I can probably take it up
once my sources gets in to Orgmode proper.

As a side-note, I wonder htmlize was preferred over htmlfontify for
fontification of source blocks. The latter package is part of Emacs
proper. One advantage of using htmlfontify is that fontification can
work out of the box.


 The OrgVerse style can, luckily, be changed to something more
 poetic...

May be if you can share your config for OrgVerse I can include it in the
default styles file.

 * Verbatim LaTeX

 I can't report on the LaTeX math display (never got dvipng to install
 on my system).

 What I /can/ report is that with the =LaTeX:verbatim option=, which
 you probably haven't tested, LaTeX equation environments are not
 exported (everything after the =\begin{equation}= line is missing or
 not visible). This is copy-pasted from test.odt:

 #+begin_example
   6.5.1 LaTeX Fragment1

   There is a equation down below.
   \begin{equation}

   6.5.2 LaTeX Fragment2

   \begin{equation}
   If $a^2=b$ and \( b=2 \), then the solution must be either $$
 a=+\sqrt{2} $$ or \[ a=-\sqrt{2} \].
 #+end_example

I have fixed issues with LaTeX: verbatim.


 Everything shows up in HTML, but linebreaks before the
 =\end{equation}= line are lost.

In the master branch, the html exporter doesn't seem to be terminating
each line of \begin{equation} ... \end{equation} with br/. I see your
POV that including of line breaks will make the output pretty. For now I
have retained the existing behaviour of HTML exporter.


 * Links

 The link to =Dedicated Target1= under 8.2.3 does not work when clicked
 (in odt -- it works in html). Hovering does show a popup,
 =.OrgXref.Dedicated-Target1=. All other links work as expected.

I have fixed this.


 * Captions, labels, references

 - *Captions/labels/references* do not yet integrate well with
   OpenOffice.

   - The illustration in sec 6.2.2 is captioned Illustration fig:1024
 Unicorn Logo, echoing the label. One would probably prefer
 something *auto-numbered* like Illustration 1: Unicorn Logo.

 - (Even better if there were possible to choose other types names,
   like Chart, Figure, etc.).

References in Orgmode file are currently coded like this
\ref{fig:1024}. Note that this is of the form category:value where
category could be one (or any) of Chart, Figure etc and value is the
sequential value.

In the example above (which if from my test.org file) you will see that
Fig appears in caption and all Fig stuff is sequentially numbered once
the Document is updated with Tools-Update-Update All.

Note: For sake of completeness one can declare Fig as sequential
variable in content.xml as is done for Illustrations.

--8---cut here---start-8---
text:sequence-decl text:display-outline-level=\0\ 
text:name=\Illustration\/
--8---cut here---end---8---

This is done as part of `org-odt-begin-office-body'.


   - The reference to the same illustration is a hyperlink containing
 part of the label text (1024). A *cross-reference field* would
 be preferable to a hyperlink, and Illustration 1 or similar
 better than 1024.

   - The table caption in sec 9.2, on the other hand, works the way I
 would want illustration captions to work: What appears in the
 caption is not the label text (table:10), but the auto-numbered
 Table 1 An Example Table.

 - (It would be nice to have a colon or other *separator* between
   label and caption text: Table 1: An Example Table.)

The caption now has a Colon separator.

   - However, the reference to that table appears as a hyperlink saying
 10, and the hyperlink does not appear to work. A cross-reference
 link to Table 1 would be better.

 On opening, caption and reference labels include verbatim the
 reference key used in the Org source, which was my main concern last
 time.

 But now I realize that this is not an issue after all! =Tools  Update 
 Update all= takes care of automatic renumbering of all 
 labels/references. This should probably be mentioned in the
 documentation.

Tools-Update-Update All (OpenOffice.org) will make sure that all
references to Tables and Images are 'correct'. Yes, this 

Re: [O] [PATCH][ANN] org-html/org-odt

2011-04-12 Thread Christian Moe

Hi,

Great! I'll test again, but I need to come up for air from other work 
first, so it will take a few days before you hear anything.


As you saw, most of my earlier concerns about 
captions/cross-references went away when I realized updating fields 
solved them. Thanks for the additional explanation.


The 40-page report went mostly fine except for the problem I reported 
earlier, that many paragraphs were split for no apparent reason. I'll 
check that again, too, and report back.


Yours,
Christian


On 4/12/11 10:33 AM, Jambunathan K wrote:


Christian

I have fixed most of the issues that you had reported earlier.

I have added two new features:

1. Attaching Custom Styles to the document
- See http://permalink.gmane.org/gmane.emacs.orgmode/40026

2. TOC and Outline numbering are done natively. i.e.,
Tools-Update-Update All would update TOC index automagically. (This
wasn't the case with earlier exporter)


* Blocks

There's no syntax highlighting in exported src blocks (ODT and HTML
both). Not a priority?


Currently syntax highlighting is done using htmlize. This package is not
part of Emacs proper and has to be installed separately. Since my setup
instructions doesn't include htmlize as part of load path, HTML source
blocks are uncolored.

As for ODT, fonitification support is missing. I can probably take it up
once my sources gets in to Orgmode proper.

As a side-note, I wonder htmlize was preferred over htmlfontify for
fontification of source blocks. The latter package is part of Emacs
proper. One advantage of using htmlfontify is that fontification can
work out of the box.



The OrgVerse style can, luckily, be changed to something more
poetic...


May be if you can share your config for OrgVerse I can include it in the
default styles file.


* Verbatim LaTeX

I can't report on the LaTeX math display (never got dvipng to install
on my system).

What I /can/ report is that with the =LaTeX:verbatim option=, which
you probably haven't tested, LaTeX equation environments are not
exported (everything after the =\begin{equation}= line is missing or
not visible). This is copy-pasted from test.odt:

#+begin_example
   6.5.1 LaTeX Fragment1

   There is a equation down below.
   \begin{equation}

   6.5.2 LaTeX Fragment2

   \begin{equation}
   If $a^2=b$ and \( b=2 \), then the solution must be either $$
a=+\sqrt{2} $$ or \[ a=-\sqrt{2} \].
#+end_example


I have fixed issues with LaTeX: verbatim.



Everything shows up in HTML, but linebreaks before the
=\end{equation}= line are lost.


In the master branch, the html exporter doesn't seem to be terminating
each line of \begin{equation} ... \end{equation} withbr/. I see your
POV that including of line breaks will make the output pretty. For now I
have retained the existing behaviour of HTML exporter.



* Links

The link to =Dedicated Target1= under 8.2.3 does not work when clicked
(in odt -- it works in html). Hovering does show a popup,
=.OrgXref.Dedicated-Target1=. All other links work as expected.


I have fixed this.



* Captions, labels, references

- *Captions/labels/references* do not yet integrate well with
   OpenOffice.



   - The illustration in sec 6.2.2 is captioned Illustration fig:1024
 Unicorn Logo, echoing the label. One would probably prefer
 something *auto-numbered* like Illustration 1: Unicorn Logo.



 - (Even better if there were possible to choose other types names,
   like Chart, Figure, etc.).


References in Orgmode file are currently coded like this
\ref{fig:1024}. Note that this is of the form category:value where
category could be one (or any) of Chart, Figure etc and value is the
sequential value.

In the example above (which if from my test.org file) you will see that
Fig appears in caption and all Fig stuff is sequentially numbered once
the Document is updated with Tools-Update-Update All.

Note: For sake of completeness one can declare Fig as sequential
variable in content.xml as is done for Illustrations.

--8---cut here---start-8---
text:sequence-decl text:display-outline-level=\0\ 
text:name=\Illustration\/
--8---cut here---end---8---

This is done as part of `org-odt-begin-office-body'.



   - The reference to the same illustration is a hyperlink containing
 part of the label text (1024). A *cross-reference field* would
 be preferable to a hyperlink, and Illustration 1 or similar
 better than 1024.



   - The table caption in sec 9.2, on the other hand, works the way I
 would want illustration captions to work: What appears in the
 caption is not the label text (table:10), but the auto-numbered
 Table 1 An Example Table.



 - (It would be nice to have a colon or other *separator* between
   label and caption text: Table 1: An Example Table.)


The caption now has a Colon separator.


   - However, the reference to that table appears as a hyperlink saying
 10, and the 

Re: [O] [PATCH][ANN] org-html/org-odt

2011-03-25 Thread Sean O'Halpin
Hi,

I was getting the error:

org-html-insert-toc: Wrong type argument: char-or-string-p, nil

when trying to generate an HTML file with

#+OPTIONS: toc:nil

The patch below seems to fix this.

Regards,
Sean

index bd53741..37eddf4 100644
--- a/lisp/org-html.el
+++ b/lisp/org-html.el
@@ -2113,7 +2113,7 @@ the alist of previous items.

 (defun org-html-end-export ()
   ;; insert the table of contents
-  (when (and org-export-with-toc (not body-only))
+  (when (and org-export-with-toc (not body-only) org-parse-table-of-contents)
 (org-html-insert-toc org-parse-table-of-contents))

   ;; remove empty paragraphs



Re: [O] [PATCH][ANN] org-html/org-odt

2011-03-25 Thread Jambunathan K

Hello Sean

Thanks for trying out the new exporter and submitting this patch. I have
applied it to my branch.

Jambunathan K.

 Hi,

 I was getting the error:

 org-html-insert-toc: Wrong type argument: char-or-string-p, nil

 when trying to generate an HTML file with

 #+OPTIONS: toc:nil

 The patch below seems to fix this.

 Regards,
 Sean

 index bd53741..37eddf4 100644
 --- a/lisp/org-html.el
 +++ b/lisp/org-html.el
 @@ -2113,7 +2113,7 @@ the alist of previous items.

  (defun org-html-end-export ()
;; insert the table of contents
 -  (when (and org-export-with-toc (not body-only))
 +  (when (and org-export-with-toc (not body-only) org-parse-table-of-contents)
  (org-html-insert-toc org-parse-table-of-contents))

;; remove empty paragraphs



Re: [O] [PATCH][ANN] org-html/org-odt

2011-03-21 Thread Christian Moe

Hi,

Very, very nice!

Tested with a minimal emacs, using Org-mode version 7.5 
(baseline.6.g533ba.dirty), GNU Emacs 23.2.1 
(powerpc-apple-darwin9.8.0, NS apple-appkit-949.54) on a Mac.


Notes on the resulting test.odt document (I've had only a quick look 
at the html, so what follows refers only to ODT unless HTML is 
specifically mentioned):


* Blocks

There's no syntax highlighting in exported src blocks (ODT and HTML 
both). Not a priority?


The OrgVerse style can, luckily, be changed to something more poetic...

* Verbatim LaTeX

I can't report on the LaTeX math display (never got dvipng to install 
on my system).


What I /can/ report is that with the =LaTeX:verbatim option=, which 
you probably haven't tested, LaTeX equation environments are not 
exported (everything after the =\begin{equation}= line is missing or 
not visible). This is copy-pasted from test.odt:


#+begin_example
  6.5.1 LaTeX Fragment1

  There is a equation down below.
  \begin{equation}

  6.5.2 LaTeX Fragment2

  \begin{equation}
  If $a^2=b$ and \( b=2 \), then the solution must be either $$ 
a=+\sqrt{2} $$ or \[ a=-\sqrt{2} \].

#+end_example

Everything shows up in HTML, but linebreaks before the 
=\end{equation}= line are lost.


* Links

The link to =Dedicated Target1= under 8.2.3 does not work when clicked 
(in odt -- it works in html). Hovering does show a popup, 
=.OrgXref.Dedicated-Target1=. All other links work as expected.


* Captions, labels, references

On opening, caption and reference labels include verbatim the 
reference key used in the Org source, which was my main concern last time.


But now I realize that this is not an issue after all! =Tools  Update 
 Update all= takes care of automatic renumbering of all 
labels/references. This should probably be mentioned in the documentation.


Tomorrow, I'll throw a 40-page report at it and see what happens.
:)

Yours,
Christian




On 3/20/11 7:32 PM, Jambunathan K wrote:


This is a formal request to integrate my org-html.el  org-odt.el
changes in to the master branch.

This patch introduces 3 major features:
1. A generic exporter
2. All new html backend re-implemented as a plugin to (1).
3. A odt backend as a plugin to (1).

The patch is based on git commit 3d802.

I am attaching a sample test.org and test.html file generated by the
above set of changes.

Http URL for the repo is:
- http://repo.or.cz/w/org-mode/org-jambu.git/shortlog/refs/heads/staging
(`staging' branch of `org-jambu.git')

Let me know if you have any questions.

ps: Considering the amount of effort I have already invested in these
patches it is almost impossible for me to break down this monolithic
patch in to series of smaller patches. I would be willing to accommodate
all other requests.






Jambunathan K.