emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Dan Davison <davison@stats.ox.ac.uk>
To: erwinpanen@fastmail.fm
Cc: emacs-orgmode@gnu.org
Subject: Re: images in orgmode
Date: Tue, 02 Feb 2010 16:07:48 -0500	[thread overview]
Message-ID: <87eil3bb2z.fsf@stats.ox.ac.uk> (raw)
In-Reply-To: <4B685D5E.5020008@fastmail.fm> (Erwin Panen's message of "Tue, 02 Feb 2010 18:14:06 +0100")

Erwin Panen <erwinpanen@fastmail.fm> writes:

> Hi all,
>
> I'm finally trying out image support for Orgmode.
> I've set up .emacs ((23.1.1 windows)according to
> http://orgmode.org/worg/org-configs/org-config-examples.php
> After some slight modifications it seems to work.
>
> I created a test.org file like this:
> ---------------begin test file--------
> * Let's add a headline
> * And a secong one
> ** Now a secondary level one
>    [[~/images/scenario_27.png]]
>    Try another one
>    [[~/images/scenario_27.jpg]]
>
> ** Yes!! This works!!
> ** Now let's try this:
>    `images/scenario_27.png´
> --------------end test file-----------
>
> Question:
> When I click on one of the links between [ ] square brackets, my
> window splits in half, and in the bottom half the image appears.
> Looking at iimage here:
> http://www.netlaputa.ne.jp/~kose/Emacs/iimage.html#4.+Key+bin
> It should be possible to visualize these images inline with the text
> instead of a separate window.
>
> What needs to be done to achieve this? Any pointer to a concise tutorial?.

This works really well. From Eric Schulte's Emacs Starter Kit[fn:1]
Use M-x org-toggle-iimage-in-org to toggle links to images into the
images themselves. (Maybe this should also go on Worg hacks?)

** Support for viewing images
This allows for the viewing of images in-line in Org-mode documents.

#+begin_src emacs-lisp
  (require 'iimage)
  (setq iimage-mode-image-search-path (expand-file-name "~/"))
  ;; Match org file: links
  (add-to-list 'iimage-mode-image-regex-alist
               (cons (concat "\\[\\[file:\\(~?" iimage-mode-image-filename-regex
                             "\\)\\]")  1))
  (defun org-toggle-iimage-in-org ()
    (interactive)
    (let ((turning-on (not iimage-mode)))
      (set-face-underline-p 'org-link (not turning-on))
      (iimage-mode (or turning-on 0))))
#+end_src

Dan

>
> Thanks for your precious help,
>
> Erwin
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

Footnotes:

[fn:1]  http://github.com/eschulte/emacs-starter-kit
This is an org-mode literate programming fork of http://github.com/technomancy/emacs-starter-kit.

  reply	other threads:[~2010-02-02 21:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-02 17:14 images in orgmode Erwin Panen
2010-02-02 21:07 ` Dan Davison [this message]
2010-02-02 21:11 ` Nick Dokos

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  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=87eil3bb2z.fsf@stats.ox.ac.uk \
    --to=davison@stats.ox.ac.uk \
    --cc=emacs-orgmode@gnu.org \
    --cc=erwinpanen@fastmail.fm \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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

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