emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: John Kitchin <jkitchin@andrew.cmu.edu>
To: Rick Frankel <rick@rickster.com>
Cc: Alan Schmitt <alan.schmitt@polytechnique.org>,
	"emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>,
	Carsten Dominik <carsten.dominik@gmail.com>
Subject: Re: make new links show as figures?
Date: Thu, 24 Oct 2013 17:48:38 -0400	[thread overview]
Message-ID: <CAJ51ETo7nVpG0AjO0=+F0WqFEHnYMmEEQ_yCVh-7YEkFP6eq=A@mail.gmail.com> (raw)
In-Reply-To: <fbdb8a336198b59474f1dc4f2505c7d3@mail.rickster.com>

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

I don't think making chemdraw a babel language is the answer here. The way
I know chemdraw is as a standalone binary executable that is all gui. there
is no scripting. maybe you could build an xml file by hand, but i would
never dream of that! maybe I am missing how you would use it.

[[chemdraw:file.cdxml][file:file.png]]

Is pretty close to what I had in mind. I would define the link click
function to just strip off the png, and open the file.cdxml for example,
then you do not need both of those pieces. I suppose this means you would
have had to export the file as a new png after editing it to make a change
though.

The real examples I had in mind were some clean way to integrate emacs with
my tablet and drawing pictures that are inline in a buffer. Clicking on the
link would open the image in my tablet drawing program, where I would draw
on it with a pen, and then save the figure. this is not all images though,
just some. Hence the differentiation by a different link. In my course
notes, I often have hand-drawn pictures in them. Right now I go through a
somewhat annoying process of drawing in powerpoint, selecting the drawing
and right clicking to save as an image, which I then put in as a link. I
havent had time to find a much better solution. A link could save me some
of that hassle, except that the link doesn't show in the buffer as an
inline image.

I also wanted a "figure" link that would export different ways. For example
in html export it would export as html, for latex as eps, and for pdflatex
as pdf, but it would show inline in some supported format. I know I can use
filters to do that on export to replace or remove extensions, but I haven't
had time to write one, and I thought a link would be a nice alternative. We
typically make all three versions (png, eps, pdf) of figures, and put the
png files in org so they show inline, but we often have to switch them out
to one of the other formats at the end for manuscript submission. A link
like figure:filename  that would somehow show inline if a filename.png
existed would solve this problem.

Those are what I was thinking about for using other links as images.

j


John

-----------------------------------
John Kitchin
Associate Professor
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
http://kitchingroup.cheme.cmu.edu



On Thu, Oct 24, 2013 at 9:45 AM, Rick Frankel <rick@rickster.com> wrote:

> On 2013-10-24 06:08, Carsten Dominik wrote:
>
>> On 24.10.2013, at 09:28, Alan Schmitt <alan.schmitt@polytechnique.**org<alan.schmitt@polytechnique.org>>
>> wrote:
>>
>> Hi Rick and John,
>>
>> rick@rickster.com writes:
>>
>> On 2013-10-22 21:53, John Kitchin wrote:
>> Is it possible to define new links that would be rendered as inline
>> images?
>>
>> I am imagining something like
>>
>> chemdraw:benzene.png
>>
>> which would show the benzene.png file inline, but when I click on it
>> would open a chemdraw file for editing.
>>
>> unfortunately, it seems that `org-display-inline-images' has a
>> hardcoded regex which searches only for =file:= links.
>>
>> This may be related to a question I had a couple weeks ago (see
>> http://article.gmane.org/**gmane.emacs.orgmode/77567<http://article.gmane.org/gmane.emacs.orgmode/77567>).
>> The current logic
>> seems to be to display inline images when the link points to an image,
>> it would be great to extend it when the description, or part of the
>> link, points to an image.
>>
>> Indeed, currently this is not possible.  I would be interested to get
>> a patch to this effect.
>>
>
> Carsten-
>
> In terms of inlining images in the description portion per the linked
> posting, do you think that it should depended on the value if the
> =include-linked= argument? (IMHO no, since the default usage of
> `org-display-inline-images' doesn't set this argument). I would be
> glad to take a stab at this enhancement.
>
> John-
> In reviewing `org-display-inline-images', and the handling of org
> links in general, i see no safe (and not overly complex) way of making
> added link types expand inline images. In the case mentioned, i still
> feel that adding chemdraw as a babel language is the correct approach.
> However, if we add the expansion of images in the description, would
> that work:
>
> [[chemdraw:file.cdxml][file:**file.png]]
>
> rick
>

[-- Attachment #2: Type: text/html, Size: 5448 bytes --]

  reply	other threads:[~2013-10-24 21:48 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-23  1:53 make new links show as figures? John Kitchin
2013-10-23 13:54 ` Rick Frankel
2013-10-24  7:28   ` Alan Schmitt
2013-10-24 10:08     ` Carsten Dominik
2013-10-24 13:45       ` Rick Frankel
2013-10-24 21:48         ` John Kitchin [this message]
2013-10-25 16:49           ` Rick Frankel
2013-10-26 12:10             ` John Kitchin
2013-10-30 16:02               ` Rick Frankel
2013-10-31 10:04                 ` Alan Schmitt
2013-10-31 15:47                   ` Rick Frankel
2013-10-31 16:20                     ` Cook, Malcolm
2013-10-31 16:55                       ` Rick Frankel
2013-10-31 17:06                     ` Alan Schmitt
2013-10-24 23:41       ` Rick Frankel
2013-10-25  1:18       ` Rick Frankel

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='CAJ51ETo7nVpG0AjO0=+F0WqFEHnYMmEEQ_yCVh-7YEkFP6eq=A@mail.gmail.com' \
    --to=jkitchin@andrew.cmu.edu \
    --cc=alan.schmitt@polytechnique.org \
    --cc=carsten.dominik@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=rick@rickster.com \
    /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).