From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: Re: Emacs-orgmode Digest, Vol 89, Issue 30 Date: Wed, 24 Jul 2013 12:55:30 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=20cf305f8d34fe01b504e244c695 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54275) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V22Lg-0003An-Ei for emacs-orgmode@gnu.org; Wed, 24 Jul 2013 12:55:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V22Lc-0005cC-EJ for emacs-orgmode@gnu.org; Wed, 24 Jul 2013 12:55:36 -0400 Received: from mail-pa0-x22a.google.com ([2607:f8b0:400e:c03::22a]:34196) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V22Lc-0005bw-1s for emacs-orgmode@gnu.org; Wed, 24 Jul 2013 12:55:32 -0400 Received: by mail-pa0-f42.google.com with SMTP id lj1so891012pab.1 for ; Wed, 24 Jul 2013 09:55:31 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --20cf305f8d34fe01b504e244c695 Content-Type: text/plain; charset=ISO-8859-1 > ---------- Forwarded message ---------- > From: Nick Dokos > To: emacs-orgmode@gnu.org > Cc: > Date: Wed, 24 Jul 2013 04:50:36 -0400 > Subject: Re: [O] links to files in a zip archive and inline images in zip > archive > John Kitchin writes: > > > I am trying to make an org-mode zip archive. The idea is basically to > > zip up the org-file, and the images it might refer to. What I would > > really like is to be able to open the zip-file in emacs, and have the > > images shown inline like they are when the archive is expanded. > > > > I had no problem making the zip archive, and it opens fine in emacs. I > > can read the org file fine, but there are no inline images, and the > > links to the images do not work. > > > > It might be ok if the links in the org-file would open the images, but > > they do not do that either (I get cannot display image: cannot > > determine image type and a blank screen). > > > > Is this idea way off base? or is there a way to get it to work? I do > > not have to stick with zip archives if another format would work well. > > > My guess is that your links use absolute paths. I had no problem doing > this with a file using relative paths and the following directory > structure: > > tmp -- kitchin.org > `- images -- foo.png > > kitchin.org looks like this: > > --8<---------------cut here---------------start------------->8--- > #+STARTUP: inlineimages > > * foo > > This [[file:images/foo.png]] is an inline image. > --8<---------------cut here---------------end--------------->8--- > > and I zipped like this: > > $ zip kitchin.zip kitchin.org images > > I can then open the zip file, and open kitchin.org inside the zip file > with the inline image showing. > -- > Nick > > This works if the unzipped directory images exists. In my case that won't be true. What I am doing is creating a script that runs a python script, captures any images created by matplotlib, creates an org-file, then creates a zip-file that contains the org-file of the script, the output, and links to the figures, as well as the figures. The zip-file will then be submitted to a server, where the original images do not exist. I can unzip the zip-file on the server, and it works fine, but I was trying to avoid that. j --20cf305f8d34fe01b504e244c695 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
---------- Fo= rwarded message ----------
From:=A0Nick Dokos <ndokos@gmail.com>
To:=A0emacs-orgm= ode@gnu.org
Cc:=A0
Date:=A0Wed, 24 Jul 2013 04:50:36 -0400
Subject:=A0Re: [O] links to files in a zip archive and inline images in zip= archive
John Kitchin <jkitchin@andrew.cmu.edu> writes:

> I am trying to make an org-mode zip archive. The idea is basically to<= br> > zip up the org-file, and the images it might refer to. What I would > really like is to be able to open the zip-file in emacs, and have the<= br> > images shown inline like they are when the archive is expanded.
>
> I had no problem making the zip archive, and it opens fine in emacs. I=
> can read the org file fine, but there are no inline images, and the > links to the images do not work.
>
> It might be ok if the links in the org-file would open the images, but=
> they do not do that either (I get cannot display image: cannot
> determine image type and a blank screen).
>
> Is this idea way off base? or is there a way to get it to work? I do > not have to stick with zip archives if another format would work well.=
>
My guess is that your links use absolute paths. I had no problem doing
this with a file using relative paths and the following directory structure= :

=A0 =A0 =A0tmp -- kitchin.= org
=A0 =A0 =A0 =A0 =A0`- images -- foo.png

kitchin.org looks like= this:

--8<---------------cut here---------------start------------->8---
#+STARTUP: inlineimages

* foo

This =A0[[file:images/foo.png]] is an inline image.
--8<---------------cut here---------------end--------------->8---

and I zipped like this:

$ zip kitchin.zip kitchin.= org images

I can then open the zip file, and open kitchin.org inside the zip file
with the inline image showing.
--
Nick

=A0
This works if the unzipped directory im= ages exists. In my case that won't be true.

What I am doing is c= reating a script that runs a python script, captures any images created by = matplotlib, creates an org-file, then creates a zip-file that contains the = org-file of the script, the output, and links to the figures, as well as th= e figures. The zip-file will then be submitted to a server, where the origi= nal images do not exist. I can unzip the zip-file on the server, and it wor= ks fine, but I was trying to avoid that.

j




=A0
--20cf305f8d34fe01b504e244c695--