[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] ODT image export

From: Jambunathan K
Subject: Re: [O] ODT image export
Date: Wed, 21 Sep 2011 20:11:29 +0530
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (windows-nt)

Hello Derek

Derek Thomas <address@hidden> writes:

> I got the odt export working and I'm very excited about the
> possibility of using it, but when I export a file with an image link,
> the image isn't embedded. Instead there's a link to the file.  Do I
> need to take any special steps to embed images in export?

It depends on how the link to the image looks like. Providing a file
link with NO description will embed the image. This behaviour is in
harmony with what the html exporter does.

*** Inlined Images
**** A simple inlined image


**** A simple image with caption and label

#+CAPTION: Unicorn Logo
#+LABEL: fig:1024

**** An image that is explicitly sized
#+CAPTION: Unicorn Logo
#+LABEL: fig:1025
#+ATTR_ODT: (:width 10 :height 10)

**** An image that is scaled
#+ATTR_ODT: (:scale 0.5)

> A few other questions, is there any functionality for export to ODP,
> that would be great.

Currently there is a clunky interface but it is quite handy for creating
a quick draft presentation based on Org outline. See the attached org,
odp and pdf file for what is possible. Note that the presentation itself
was created using org-lparse-* commands.

> If it is possible to export to ODP, would it be possible to include
> the latex code for any embedded images in the comments of the slides?

Not sure. Let me revisit this question after some homework..

> Finally, in odt export, is it possible to export tikz diagrams as
> images and embed those in the file?

Does your plotter - R, gnuplot or whatever - support SVG. I see that
LibreOffice-3.4 (which I have locally installed) supports embedding of
SVG images. These SVG images are actually embedded as SVM files in the
exported ODT file. Using BasicODConverter (which uses UNO APIs) SVG->SVM
creation is a no-brainer. But my little experimentation suggests that
the SVG images might have to be cropped. But in the long run, working
with SVG files will probably be a winner.

For now, you may want to export Tikz->Pdf->High Resolution PNG using
Image Magick. Hint: Search this list.

Currently I am making improvements to the odt exporter purely based on
user needs and feedback. I will diligently consider all feedback or
feature requests.

Jambunathan K.

> Thanks,
> Derek


#+TITLE:     BasicODConverter.org
#+AUTHOR:    Jambunathan K
#+EMAIL:     address@hidden
#+DATE:      2011-09-21 Wed
#+OPTIONS:   H:4 num:t toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
#+OPTIONS:   TeX:t LaTeX:dvipng skip:nil d:nil todo:t pri:nil tags:not-in-toc


* Converter Setup
** Install BasicODConverter-0.8.0.oxt 
*** See contrib/odt/BasicODConverter/ 

** Customize org-lparse-convert-process
*** Choose BasicODConverter from the menu

* Converter Configuration
** Direct export to doc or pdf
*** Customize org-export-odt-preferred-output-format
**** Choose doc or pdf 

** Direct export to odp or ppt
***  Customize org-lparse-convert-capabilities
**** Add ppt and odp as output file formats under "Text" document class
     With this C-h v org-lparse-convert-capabilities RET should report
     something as shown below

,---- org-lparse-convert-capabilities
| (("Text"
|   ("odt" "ott" "doc" "rtf")
|   (("pdf" "pdf")
|    ("odt" "odt")
|    ("xhtml" "html")
|    ("rtf" "rtf")
|    ("ott" "ott")
|    ("doc" "doc")
|    ("ooxml" "xml")
|    ("html" "html")
|    ("odp" "odp")   <----------
|    ("ppt" "ppt"))) <----------
|  ("Web"
|   ("html" "xhtml")
|   (("pdf" "pdf")
|    ("odt" "txt")
|    ("html" "html")))
|  ("Spreadsheet"
|   ("ods" "ots" "xls" "csv")
|   (("pdf" "pdf")
|    ("ots" "ots")
|    ("html" "html")
|    ("csv" "csv")
|    ("ods" "ods")
|    ("xls" "xls")
|    ("xhtml" "xhtml")
|    ("ooxml" "xml")))
|  ("Presentation"
|   ("odp" "otp" "ppt")
|   (("pdf" "pdf")
|    ("swf" "swf")
|    ("odp" "odp")
|    ("xhtml" "xml")
|    ("otp" "otp")
|    ("ppt" "ppt")
|    ("odg" "odg")
|    ("html" "html"))))

* Exporting Org files
** Exporting Org->Doc or Pdf
*** Use C-c C-e O or C-c C-e o 
    Exporter will not only output the odt file but will also export it
    to your preferred format configured in the previous step.

** Exporting Org->Odt/Ppt
*** Visit your .org file
*** M-x org-lparse-and-open
**** Export To:  => choose odp or ppt
**** Native Backend: => choose odt
**** Have you read the note of CAUTION?

    The file will first be exported to odt and then converted to
    odp/ppt. The odt->odp conversion will launch LibreOffice
    frame. The export is NOT FINISHED YET. WAIT FOR 10 SECS after
    which it would close. This means that conversion is fully done.

    If you have used org-lparse-and-open the presentation will be
    opened again for your review.

    The macro does the same thing as LibreOffice's File->Send->Outline
    to Presentation but in a hands-off manner.

**** Further Adjustments may be needed
     - See
       for more information.

* Converting Non-Org files
** Visit your odt file
   - File will open within Emacs in archive mode
** Use C-u M-x org-lparse-convert RET 
*** Fill "File to be Converted"
*** Output Format: => choose odp
*** Wait for 10-15s and be patient until the file is produced

* Power Tips
** Use TAB for completing available formats
*** Use of ido mode is highly recommended

** Use org-lparse-convert as Uber-conversion command
*** csv->xls
*** odt->latex
*** odp->html
*** svg->svm

** Create an org-export-as-odp-and-open custom command

#+begin_src emacs-lisp
  (defun org-export-as-odp-and-open (arg)
    "Export the outline as ODP and immediately open it with a browser.
  If there is an active region, export only the region. The prefix
  ARG specifies how many levels of the outline should be exported.
  The default is 3.  Lower levels will be stripped from the
  exported presentaion."
    (interactive "P")
    (org-lparse-and-open "odp" "odt" arg))

* Thanks
** This presentation itself if created using org-odt
** Native org->odp exporter, if there is popular demand

Attachment: BasicODConverter.odp
Description: Binary data

Attachment: BasicODConverter.pdf
Description: Adobe PDF document

reply via email to

[Prev in Thread] Current Thread [Next in Thread]