Commit graph

16 commits

Author SHA1 Message Date
Jambunathan K a0769aaebb Introduce org-lparse-begin/end-list-item
* contrib/lisp/org-lparse.el (org-lparse-end-list-item):
Renamed to `org-lparse-end-list-item-1'.
(org-lparse-begin-list-item, org-lparse-end-list-item): New
functions.  Use these instead of doing (org-lparse-begin
'LIST-ITEM ...) or (org-lparse-end 'LIST-ITEM ...).
(org-lparse-export-list-line, org-lparse-begin-level)
(org-lparse-end-level): Propagate above changes.
* contrib/lisp/org-odt.el
(org-odt-begin-list-item, org-odt-end-list-item): ditto.
* contrib/lisp/org-xhtml.el (org-xhtml-format-toc-item)
(org-xhtml-begin-toc, org-xhtml-end-toc): ditto.
2011-08-31 22:28:14 +05:30
Jambunathan K 590ad72f59 org-xhtml.el: Support for captioning and labelling of equation images
* contrib/lisp/org-xhtml.el
(org-export-xhtml-do-preprocess-latex-fragments): Factored out
from the earlier org-export-xhtml-preprocess.
(org-export-xhtml-preprocess-latex-fragments): Check if
backend is xhtml. If yes, delegate to
org-export-xhtml-do-preprocess-latex-fragments. This is hooked
to org-export-preprocess-after-blockquote-hook.
(org-export-xhtml-preprocess-label-references): Factored out
from the earlier org-export-xhtml-preprocess.
(org-export-xhtml-preprocess): Call
org-export-xhtml-preprocess-label-references. Note that
processing of latex fragments is no longer done here.
(org-xhtml-format-image): Honor captions, label and attributes
even for images that are created by latex fragment processing.
(org-xhtml-unload-function): Unhook from
org-export-preprocess-after-blockquote-hook.

Thanks to Myles English for registering this requirement.
http://lists.gnu.org/archive/html/emacs-orgmode/2011-08/msg01116.html
2011-08-28 02:51:38 +05:30
Jambunathan K fec6440a49 Fix some issues with org-xhtml export
* contrib/lisp/org-xhtml.el: require html (temporarily). This
makes sure that variables such as org-export-html-extension
etc referenced in org-exp.el and made available through
opt-plist are properly inited. Can be removed once the
org-export-xhtml namespace is annihilated.

* contrib/lisp/org-lparse.el (org-lparse-format-table): Export
of table.el tables were broken. Fix it. Can be removed once
the xhtml backend is annihilated.
2011-08-28 02:01:40 +05:30
Bastien Guerry 58f1dbccf8 Remove the "Version" header in Org libraries (leave it in org.el).
Also remove blank lines before the ";;; org*el ends here" declarations.

Having a "Version" header forced us to update every file when releasing a
new version of Org; it also forced us to update every file when merging Org
with Emacs trunk, thus cluttering the diffs between the previously merged
version and the new one with useless information.

Glenn Morris suggested this in emacs-devel:
http://lists.gnu.org/archive/html/emacs-devel/2011-08/msg00322.html
2011-08-17 14:42:34 +02:00
Jambunathan K 395a816a18 Prettify inlinetasks in odt and (x)html backends
* lisp/org-inlinetask.el (org-inlinetask-export-templates):
Fixed template for html so that the exported file is valid
xhtml. Added template for odt.
(org-inlinetask-export-handler): Fix typo in the regexp that
trims content. Make sure that the content is flanked by
paragraph boundaries on either side.

* lisp/org-html.el (org-export-html-style-default): Add style
for inlinetask.

* contrib/lisp/org-xhtml.el (org-export-xhtml-style-default):
Add style for inlinetask.

* contrib/odt/styles/OrgOdtStyles.xml: Added following custom
styles:  OrgInlineTaskHeading and OrgInlineTaskFrame.

* contrib/lisp/org-odt.el (org-odt-format-textbox)
(org-odt-format-inlinetask): Added

Refer following threads:
1. http://lists.gnu.org/archive/html/emacs-orgmode/2011-08/msg00238.html
2. http://lists.gnu.org/archive/html/emacs-orgmode/2011-08/msg00154.html

Thanks to Suvayu Ali for reporting this issue and suggesting
improvements.
2011-08-16 21:29:52 +02:00
Bastien Guerry 7a18799e25 Remove arch-tag at the bottom of files. 2011-08-15 20:04:38 +02:00
Bastien Guerry 904ed18bc2 Fix copyright years for elisp files in core and contrib.
Also add "This file is not part of GNU Emacs." when this is the case.
2011-08-15 15:23:11 +02:00
Jambunathan K 99466ce716 Fix issues with numbering of lists found during odt to doc conversion
* contrib/lisp/org-lparse.el (org-do-lparse): Add new let
bound variable org-lparse-list-level.
(org-lparse-begin-list, org-lparse-end-list): New functions.
(org-lparse-export-list-line, org-lparse-begin-level)
(org-lparse-end-level): Use new functions.

* contrib/lisp/org-odt.el (org-odt-begin-list): Fixed
signature so that it is consistent with how org-lparse library
invokes it. Forcibly emit text:continue-numbering="false"
attribute for the top-level <text:list> element. This fixes
numbering issue found during odt to doc conversion. See
http://thread.gmane.org/gmane.comp.documentfoundation.libreoffice.devel/14739
(org-odt-begin-list-item, org-odt-end-list-item): Use
org-lparse-begin-list and org-lparse-end-list.

* contrib/lisp/org-xhtml.el (org-xhtml-format-toc-item)
(org-xhtml-begin-toc, org-xhtml-end-toc): Use
org-lparse-begin-list and org-lparse-end-list.
(org-xhtml-begin-list): Fixed signature so that it is
consistent with how org-lparse library invokes it.
2011-08-08 11:31:17 +05:30
Jambunathan K 44472fa6cf Usability improvements to org-lparse-convert and co (First cut)
* contrib/lisp/org-lparse.el (org-lparse-and-open)
(org-lparse-register-backend, org-lparse-format-table)
(org-lparse-begin, org-lparse-end): Checkdoc related fixes.
(org-lparse-get-converter): Added
(org-lparse-get-other-backends, org-lparse-all-backends):
Re-implemented. Also improved docstring.
(org-lparse): Make use of improvements in the converter
routines. Improve the following: a) gathering of
target-backend and native-backend args during interactive
calls b) error handling.
(org-lparse-convert): Introduced prefix arg for opening of
converted files. Make use of improvements in the converter
routines. Improve error handling.
(org-lparse-convert-processes): New customizable variable.
(org-lparse-convert-process): Make it customizable. Set
default value to nil.
(org-lparse-convert-capabilities): New customizable variable.
(org-lparse-use-flashy-warning): Fix group and improve docstring.

* contrib/lisp/org-odt.el (org-odt-get): Don't set
CONVERT-METHOD and OTHER-BACKENDS options. Fallback to the
global converter settings for now.
(org-export-odt-preferred-output-format): New variable
(org-export-as-odt-and-open, org-export-as-odt): Use the
afore-mentioned variable.

* contrib/lisp/org-xhtml.el (org-xhtml-get): Don't set
CONVERT-METHOD and OTHER-BACKENDS options. Fallback to the
global converter settings for now.
2011-08-05 02:04:30 +05:30
Jambunathan K 4db8048a23 Introduce org-lparse-unregister-backend and use it
* contrib/lisp/org-lparse.el (org-lparse-unregister-backend):
New.
* contrib/lisp/org-odt.el (org-odt-unload-function):
New. De-register from org-lparse on unload.
* contrib/lisp/org-xhtml.el (org-xhtml-unload-function):
New. De-register from org-lparse on unload.
2011-08-02 15:00:15 +05:30
Bastien Guerry 5c53026d32 Fix (a lot of) compiler warnings.
Also introduce `org-pop-to-buffer-same-window' as a compatibility
function for Emacs =>24.1.
2011-07-18 19:25:10 +02:00
Jambunathan K 7aee4082c1 Backends now register with org-lparse during load time
* contrib/lisp/org-lparse.el (org-lparse-native-backends): Set
default value to nil. Also update docstring.
(org-lparse-register-backend): New
* contrib/lisp/org-xhtml.el (org-xhtml-get): Add self -
"xhtml" - as one of the other backends. Call
org-lparse-register-backend on load.
* contrib/lisp/org-odt.el: Call org-lparse-register-backend on
load.
2011-07-09 01:35:50 +05:30
Bastien Guerry e6f45face6 Rename org-export-convert-* to org-lparse-convert-*
The org-export-* prefix is confusing here, as these functions
seem to be part of org-exp.el.  Let's name them by the library
they are in (and rely on) for now -- maybe this will change
when we move the ODT exporter to the core.
2011-07-08 12:39:05 +02:00
Jambunathan K a51c5637f9 Make org-xhtml and org-odt usable
* contrib/lisp/org-odt.el (org-odt-data-dir): Update to
reflect new directory layout.

* contrib/lisp/org-xhtml.el
(org-export-xhtml-special-string-regexps): Define it.
2011-07-01 15:04:05 +02:00
Bastien Guerry dffdb86cd7 contrib/lisp/org-xhtml.el: code clean-up.
Rename org-export-html-* to org-export-xhtml-*
Add a few FIXME about org-lparse* variables we
need to move to org-lparse.el.
2011-07-01 11:25:17 +02:00
Bastien Guerry 63b8ecb4ea Add Jambunathan's odt exporter in contrib/.
This adds these new files:

contrib/lisp/org-lparse.el
contrib/lisp/org-odt.el
contrib/lisp/org-xhtml.el
contrib/odt/BasicODConverter/BasicODConverter-0.8.0.oxt
contrib/odt/BasicODConverter/Filters.bas
contrib/odt/BasicODConverter/Main.bas
contrib/odt/OASIS/OpenDocument-schema-v1.1.rng
contrib/odt/OASIS/OpenDocument-v1.2-cs01-manifest-schema.rng
contrib/odt/OASIS/OpenDocument-v1.2-cs01-schema.rng
contrib/odt/README.org
contrib/odt/etc/schema/od-manifest-schema-v1.2-cs01.rnc
contrib/odt/etc/schema/od-schema-v1.1.rnc
contrib/odt/etc/schema/od-schema-v1.2-cs01.rnc
contrib/odt/etc/schema/schemas.xml
contrib/odt/styles/OrgOdtAutomaticStyles.xml
contrib/odt/styles/OrgOdtStyles.xml

Notes:

contrib/lisp/org-xhtml.el is meant to be merged at some point with
lisp/org-html.el, to avoid code redundancies.

The feature as a whole is meant to move to Org's core when things
are tested and stable enough.

Thanks a lot to Jambunathan for this great contribution and for
his patience!
2011-07-01 11:12:19 +02:00