* ODT image export
@ 2011-09-20 22:12 Derek Thomas
2011-09-21 9:53 ` Giovanni Ridolfi
2011-09-21 14:41 ` Jambunathan K
0 siblings, 2 replies; 11+ messages in thread
From: Derek Thomas @ 2011-09-20 22:12 UTC (permalink / raw)
To: emacs-orgmode
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?
A few other questions, is there any functionality for export to ODP,
that would be great. 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? Finally, in odt export, is it possible to
export tikz diagrams as images and embed those in the file?
Thanks,
Derek
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: ODT image export
2011-09-20 22:12 ODT image export Derek Thomas
@ 2011-09-21 9:53 ` Giovanni Ridolfi
2011-09-21 14:41 ` Jambunathan K
1 sibling, 0 replies; 11+ messages in thread
From: Giovanni Ridolfi @ 2011-09-21 9:53 UTC (permalink / raw)
To: Derek Thomas; +Cc: emacs-orgmode
Derek Thomas <derekcthomas@gmail.com> writes:
Hi, Derek
> 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?
how's your link? could you please verify with the HTML export?
from the manual "Images in HTML export":
By default(1), images are inlined if a link does not have a description.
So
`[[file:myimg.jpg]]' will be inlined, while
`[[file:myimg.jpg][the image]]'will just produce a link `the image' that
points to the image.
I think the odt exporter follows such conventions.
hth
Giovanni
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: ODT image export
2011-09-20 22:12 ODT image export Derek Thomas
2011-09-21 9:53 ` Giovanni Ridolfi
@ 2011-09-21 14:41 ` Jambunathan K
2011-09-21 15:39 ` Tom Prince
` (2 more replies)
1 sibling, 3 replies; 11+ messages in thread
From: Jambunathan K @ 2011-09-21 14:41 UTC (permalink / raw)
To: Derek Thomas; +Cc: emacs-orgmode
[-- 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
[[./org-mode-unicorn.png]]
**** A simple image with caption and label
#+CAPTION: Unicorn Logo
#+LABEL: fig:1024
[[./org-mode-unicorn.png]]
**** An image that is explicitly sized
#+CAPTION: Unicorn Logo
#+LABEL: fig:1025
#+ATTR_ODT: (:width 10 :height 10)
[[./org-mode-unicorn.png]]
**** An image that is scaled
#+ATTR_ODT: (:scale 0.5)
[[./org-mode-unicorn.png]]
> 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
#+DESCRIPTION:
#+KEYWORDS:
#+LANGUAGE: en
#+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
#+EXPORT_SELECT_TAGS: export
#+EXPORT_EXCLUDE_TAGS: noexport
#+LINK_UP:
#+LINK_HOME:
#+XSLT:
* 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
http://wiki.services.openoffice.org/wiki/Documentation/OOoAuthors_User_Manual/Impress_Guide/Creating_slides_from_an_outline
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))
#+end_src
* 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 --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: ODT image export
2011-09-21 14:41 ` Jambunathan K
@ 2011-09-21 15:39 ` Tom Prince
2011-09-21 16:46 ` Derek Thomas
2011-09-22 8:14 ` Giovanni Ridolfi
2 siblings, 0 replies; 11+ messages in thread
From: Tom Prince @ 2011-09-21 15:39 UTC (permalink / raw)
To: Jambunathan K, Derek Thomas; +Cc: emacs-orgmode
On Wed, 21 Sep 2011 20:11:29 +0530, Jambunathan K <kjambunathan@gmail.com> wrote:
> 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.
I don't know how it would interact with R/gunplot/etc... But I have
hacked my local copy of org-mode to use pdflatex+preview+pdf2svg instead
of latex and dvipng for turning latex blocks into images. I haven't got
around to submitting it, since there should really be some refactoring
of the image handling code to deal with it.
Tom
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: ODT image export
2011-09-21 14:41 ` Jambunathan K
2011-09-21 15:39 ` Tom Prince
@ 2011-09-21 16:46 ` Derek Thomas
2011-09-21 17:29 ` Jambunathan K
2011-09-22 8:14 ` Giovanni Ridolfi
2 siblings, 1 reply; 11+ messages in thread
From: Derek Thomas @ 2011-09-21 16:46 UTC (permalink / raw)
To: kjambunathan, emacs-orgmode
Jambunathan,
Thanks that looks like it's exactly what I need. I have been
partially successful in getting the exporter running, but it stalls
out after creating the odt file and opening it in openoffice. Any
tips for getting ppt or odp export up and running. One thing I have
noticed is if I have openoffice opent when I initialize an export, I
get an error:
/home/dthomas/Dropbox/Presentations/Indy2011/"macro:///BasicODConverter.Main.Convert(file:///home/dthomas/Dropbox/Presentations/Indy2011/indy.odt,odp,file:///home/dthomas/Dropbox/Presentations/Indy2011/indy.odp)"
does not exist.
Any suggestions? Thanks for your help, the ODT exporter is awesome!
Derek
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: ODT image export
2011-09-21 16:46 ` Derek Thomas
@ 2011-09-21 17:29 ` Jambunathan K
2011-09-21 17:40 ` Jambunathan K
0 siblings, 1 reply; 11+ messages in thread
From: Jambunathan K @ 2011-09-21 17:29 UTC (permalink / raw)
To: Derek Thomas; +Cc: emacs-orgmode
Derek Thomas <derekcthomas@gmail.com> writes:
> Jambunathan,
>
> Thanks that looks like it's exactly what I need. I have been
> partially successful in getting the exporter running, but it stalls
> out after creating the odt file and opening it in openoffice. Any
> tips for getting ppt or odp export up and running. One thing I have
> noticed is if I have openoffice opent when I initialize an export, I
> get an error:
The exporter tries to delete the old .odt file before creating the new
.odt file. Since OpenOffice locks the file that it opens, there is some
sort of access violation. So it is normal to get an error.
> /home/dthomas/Dropbox/Presentations/Indy2011/"macro:///BasicODConverter.Main.Convert(file:///home/dthomas/Dropbox/Presentations/Indy2011/indy.odt,odp,file:///home/dthomas/Dropbox/Presentations/Indy2011/indy.odp)"
> does not exist.
What surprises me is that I don't see `soffice -norestore -invisible
-headless ' part [1]. Can you show me what you see in the *Messages*
buffer?
Can you check what the value of `variable
org-lparse-convert-process'. It should have something as seen below -
specifically the soffice part.
,----[ C-h v org-lparse-convert-process RET ]
| org-lparse-convert-process is a variable defined in `org-lparse.el'.
| Its value is
| ("soffice" "-norestore" "-invisible" "-headless" "\"macro:///BasicODConverter.Main.Convert(%I,%f,%O)\"")
|
| Original value was nil
|
| Documentation:
| Command to convert from an Org exported format to other formats.
| During customization, the list of choices are populated from
| `org-lparse-convert-processes'. Refer afore-mentioned variable
| for further information.
|
| You can customize this variable.
|
| [back]
`----
>
> Any suggestions? Thanks for your help, the ODT exporter is awesome!
At this moment, I am having trouble figuring what the problem could
be. Nothing like it couldn't be sorted out.
> Derek
Footnotes:
[1]
,----
| Creating odt file...
|
| Running zip -mX0 BasicODConverter.odt mimetype
|
| Running zip -rmTq BasicODConverter.odt .
|
| Created c:/Documents and Settings/kjambunathan/My Documents/My Data/tmp-odt/BasicODConverter.odt
|
| Executing soffice -norestore -invisible -headless "macro:///BasicODConverter.Main.Convert(file:///c:/Documents%20and%20Settings/kjambunathan/My%20Documents/My%20Data/tmp-odt/BasicODConverter.odt,odp,file:///c:/Documents%20and%20Settings/kjambunathan/My%20Documents/My%20Data/tmp-odt/BasicODConverter.odp)"
|
| Exported to c:/Documents and Settings/kjambunathan/My Documents/My Data/tmp-odt/BasicODConverter.odp using soffice
|
| Opening file c:/Documents and Settings/kjambunathan/My Documents/My Data/tmp-odt/BasicODConverter.odp
`----
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: ODT image export
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
0 siblings, 2 replies; 11+ messages in thread
From: Jambunathan K @ 2011-09-21 17:40 UTC (permalink / raw)
To: Derek Thomas; +Cc: emacs-orgmode
>> /home/dthomas/Dropbox/Presentations/Indy2011/"macro:///BasicODConverter.Main.Convert(file:///home/dthomas/Dropbox/Presentations/Indy2011/indy.odt,odp,file:///home/dthomas/Dropbox/Presentations/Indy2011/indy.odp)"
>> does not exist.
>
> What surprises me is that I don't see `soffice -norestore -invisible
> -headless ' part [1]. Can you show me what you see in the *Messages*
> buffer?
>
> Can you check what the value of `variable
> org-lparse-convert-process'. It should have something as seen below -
> specifically the soffice part.
I work on a Windows machine. You seem to be using Linux. May be it is
not soffice but soffice.bin. Try creating a symlink between the two
names and see if the problem goes away.
It is important that
M-: (executable-find "soffice")
should report some valid path.
Jambunathan K.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: ODT image export
2011-09-21 17:40 ` Jambunathan K
@ 2011-09-21 17:54 ` Achim Gratz
2011-09-21 17:58 ` Derek Thomas
1 sibling, 0 replies; 11+ messages in thread
From: Achim Gratz @ 2011-09-21 17:54 UTC (permalink / raw)
To: emacs-orgmode
Jambunathan K <kjambunathan@gmail.com> writes:
> I work on a Windows machine. You seem to be using Linux. May be it is
> not soffice but soffice.bin. Try creating a symlink between the two
> names and see if the problem goes away.
There is an soffice.bin on Linux, but you cannot or should not call it
directly. If everything is installed as it should, there should be a
symlink from /usr/bin/soffice (may in /usr/local for some distros) to
wherever OpenOffice / LibreOffice has it's binaries installed.
Regards,
Achim.
--
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
SD adaptations for KORG EX-800 and Poly-800MkII V0.9:
http://Synth.Stromeko.net/Downloads.html#KorgSDada
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: ODT image export
2011-09-21 17:40 ` Jambunathan K
2011-09-21 17:54 ` Achim Gratz
@ 2011-09-21 17:58 ` Derek Thomas
1 sibling, 0 replies; 11+ messages in thread
From: Derek Thomas @ 2011-09-21 17:58 UTC (permalink / raw)
To: Derek Thomas, emacs-orgmode
> It is important that
>
> M-: (executable-find "soffice")
>
> should report some valid path.
This returns a valid result. Also, executing the printed soffice
command at the command line works. Internally, emacs prints a failed
message after the command in the *Messages* buffer.
It seems that the exporter strips the images from the ppt/odp export.
They are there when I export the odt from orgmode, but don't appear in
the presentation.
Derek
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: ODT image export
2011-09-21 14:41 ` Jambunathan K
2011-09-21 15:39 ` Tom Prince
2011-09-21 16:46 ` Derek Thomas
@ 2011-09-22 8:14 ` Giovanni Ridolfi
2011-09-22 14:10 ` Jambunathan K
2 siblings, 1 reply; 11+ messages in thread
From: Giovanni Ridolfi @ 2011-09-22 8:14 UTC (permalink / raw)
To: Jambunathan K; +Cc: emacs-orgmode, Derek Thomas
Jambunathan K <kjambunathan@gmail.com> writes:
Hi, Jambunathan,
I've noticed that in the pdf file, you've sent, the
second headings:
> * Converter Setup
> ** Install BasicODConverter-0.8.0.oxt
^^^
> *** See contrib/odt/BasicODConverter/
does _not_ have a space between the dot "*" and the following word,
i.e. "Install", while it does have for the third i.e. "*** See"
or the fourth heading.
cheers,
Giovanni
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: ODT image export
2011-09-22 8:14 ` Giovanni Ridolfi
@ 2011-09-22 14:10 ` Jambunathan K
0 siblings, 0 replies; 11+ messages in thread
From: Jambunathan K @ 2011-09-22 14:10 UTC (permalink / raw)
To: Giovanni Ridolfi; +Cc: emacs-orgmode, Derek Thomas
[-- Attachment #1: Type: text/plain, Size: 1435 bytes --]
Giovanni Ridolfi <giovanni.ridolfi@yahoo.it> writes:
> Jambunathan K <kjambunathan@gmail.com> writes:
>
> Hi, Jambunathan,
>
> I've noticed that in the pdf file, you've sent, the
> second headings:
>
>> * Converter Setup
>> ** Install BasicODConverter-0.8.0.oxt
> ^^^
>> *** See contrib/odt/BasicODConverter/
>
> does _not_ have a space between the dot "*" and the following word,
> i.e. "Install", while it does have for the third i.e. "*** See"
> or the fourth heading.
Yes, I noticed that as well. This is really a bug with
OpenOffice-3.2. You will see that the above issue manifests itself in
the odp slideshow as well. This then gets carried over to pdf file.
I tried using LibreOffice-3.4. See the attached files. The "space" issue
you have spotted has gone away. But the first slide is clobbered. I will
file a bug against LibreOffice someday.
To clarify,
org->odt happens with org-odt.el
odt->odp happens with Open/LibreOffice's own converter.
odp->pdf also happens with Open/LibreOffice's own converter.
org-lparse + BasicODConverter is merely a glue code.
ps: I really like the idea of creating presentation right from the
original Org file as opposed to creating a separate file for
presentations. I see that University crowd forms a significant and
serious user base of Orgmode. To them, creating a first draft of
presentation right from their dissertation would appeal readily.
> cheers,
> Giovanni
>
>
--
[-- Attachment #2: BasicODConverter.odp --]
[-- Type: application/vnd.oasis.opendocument.presentation, Size: 18064 bytes --]
[-- Attachment #3: BasicODConverter.pdf --]
[-- Type: application/pdf, Size: 42851 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2011-09-22 14:10 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-20 22:12 ODT image export Derek Thomas
2011-09-21 9:53 ` Giovanni Ridolfi
2011-09-21 14:41 ` Jambunathan K
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
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
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).