emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Jambunathan K <kjambunathan@gmail.com>
To: Derek Thomas <derekcthomas@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: ODT image export
Date: Wed, 21 Sep 2011 20:11:29 +0530	[thread overview]
Message-ID: <818vpikleu.fsf@gmail.com> (raw)
In-Reply-To: CALDRGc-V_q+bxT_00Lpq+cKk9Qgbr+kYNK9DRk=yZ5+u83pA0A@mail.gmail.com

[-- Attachment #1: Type: text/plain, Size: 2379 bytes --]

Hello Derek

Derek Thomas <derekcthomas@gmail.com> 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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: BasicODConverter.org --]
[-- Type: text/x-org, Size: 3982 bytes --]

#+TITLE:     BasicODConverter.org
#+AUTHOR:    Jambunathan K
#+EMAIL:     kjambunathan@gmail.com
#+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 #3: BasicODConverter.odp --]
[-- Type: application/octet-stream, Size: 17493 bytes --]

[-- Attachment #4: BasicODConverter.pdf --]
[-- Type: application/pdf, Size: 43106 bytes --]

  parent reply	other threads:[~2011-09-21 14:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-20 22:12 ODT image export Derek Thomas
2011-09-21  9:53 ` Giovanni Ridolfi
2011-09-21 14:41 ` Jambunathan K [this message]
2011-09-21 15:39   ` Tom Prince
2011-09-21 16:46   ` Derek Thomas
2011-09-21 17:29     ` Jambunathan K
2011-09-21 17:40       ` Jambunathan K
2011-09-21 17:54         ` Achim Gratz
2011-09-21 17:58         ` Derek Thomas
2011-09-22  8:14   ` Giovanni Ridolfi
2011-09-22 14:10     ` Jambunathan K

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=818vpikleu.fsf@gmail.com \
    --to=kjambunathan@gmail.com \
    --cc=derekcthomas@gmail.com \
    --cc=emacs-orgmode@gnu.org \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox


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