From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Hendy Subject: Confused about inline html images Date: Sun, 13 Jan 2013 13:48:55 -0600 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:50941) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TuTYA-0006OW-Rc for emacs-orgmode@gnu.org; Sun, 13 Jan 2013 14:48:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TuTY9-0000Hc-5H for emacs-orgmode@gnu.org; Sun, 13 Jan 2013 14:48:58 -0500 Received: from mail-ob0-f170.google.com ([209.85.214.170]:43752) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TuTY9-0000HU-0Q for emacs-orgmode@gnu.org; Sun, 13 Jan 2013 14:48:57 -0500 Received: by mail-ob0-f170.google.com with SMTP id wp18so3304019obc.15 for ; Sun, 13 Jan 2013 11:48:56 -0800 (PST) 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 I'm trying to recreate this html: My approach was like so: #+attr_html: width="400px" [[http://path/to/image.jpg][http://path/to/image.jpg]] >From the description at using inline images (http://orgmode.org/manual/Images-in-HTML-export.html): #+begin_quote If the description part itself is a file: link or a http: URL pointing to an image, this image will be inlined and activated so that clicking on the image will activate the link. For example, to include a thumbnail that will link to a high resolution version of the image, you could use: [[file:highres.jpg][file:thumb.jpg]] #+end_quote That sounds like my example above should work; the example indicates that thumb.jpg would be inlined and clicking it would send to highres.jpg. I'd like http://path/to/image.jpg to be inlined at 400px but clicking it would make the full size jpg viewable in a browser. I haven't changed the variable org-export-html-inline-images. It should be set to the default, which appears to be 'maybe.' Thanks for any suggestions, John From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Hendy Subject: Re: Confused about inline html images Date: Sun, 13 Jan 2013 13:54:07 -0600 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:52063) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TuTdD-0008TP-T4 for emacs-orgmode@gnu.org; Sun, 13 Jan 2013 14:54:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TuTdA-0001v4-C6 for emacs-orgmode@gnu.org; Sun, 13 Jan 2013 14:54:11 -0500 Received: from mail-oa0-f47.google.com ([209.85.219.47]:53179) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TuTdA-0001uf-6s for emacs-orgmode@gnu.org; Sun, 13 Jan 2013 14:54:08 -0500 Received: by mail-oa0-f47.google.com with SMTP id h1so3331436oag.6 for ; Sun, 13 Jan 2013 11:54:07 -0800 (PST) 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 On Sun, Jan 13, 2013 at 1:48 PM, John Hendy wrote: > I'm trying to recreate this html: > > width="400px" /> > > My approach was like so: > > #+attr_html: width="400px" > [[http://path/to/image.jpg][http://path/to/image.jpg]] > > From the description at using inline images > (http://orgmode.org/manual/Images-in-HTML-export.html): > > #+begin_quote > If the description part itself is a file: link or a http: URL pointing > to an image, this image will be inlined and activated so that clicking > on the image will activate the link. For example, to include a > thumbnail that will link to a high resolution version of the image, > you could use: > > [[file:highres.jpg][file:thumb.jpg]] > #+end_quote > > That sounds like my example above should work; the example indicates > that thumb.jpg would be inlined and clicking it would send to > highres.jpg. I'd like http://path/to/image.jpg to be inlined at 400px > but clicking it would make the full size jpg viewable in a browser. > > I haven't changed the variable org-export-html-inline-images. It > should be set to the default, which appears to be 'maybe.' > As usual (right after tinkering a lot and finally mailing the list), this seems to have just started working, so I'll chalk that up to something I goofed in my bracket syntax perhaps? Still one issue: it's applying the attr_html to the wrong bit. Here's the resultant export output: #+attr_html: width="400px" [[http://path/to/file.jpg][http://path/to/file.jpg]] becomes: file.jpg So the width attr is passed to the link section, not the the img. Is this a bug? Thanks, John > > Thanks for any suggestions, > John From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Hendy Subject: Re: Confused about inline html images Date: Sun, 13 Jan 2013 14:09:15 -0600 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:54744) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TuTru-0002hD-C4 for emacs-orgmode@gnu.org; Sun, 13 Jan 2013 15:09:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TuTro-00066B-PM for emacs-orgmode@gnu.org; Sun, 13 Jan 2013 15:09:22 -0500 Received: from mail-ob0-f171.google.com ([209.85.214.171]:49347) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TuTro-00065h-Ji for emacs-orgmode@gnu.org; Sun, 13 Jan 2013 15:09:16 -0500 Received: by mail-ob0-f171.google.com with SMTP id dn14so3283244obc.2 for ; Sun, 13 Jan 2013 12:09:16 -0800 (PST) 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 On Sun, Jan 13, 2013 at 1:54 PM, John Hendy wrote: > On Sun, Jan 13, 2013 at 1:48 PM, John Hendy wrote: >> I'm trying to recreate this html: >> >> > width="400px" /> >> >> My approach was like so: >> >> #+attr_html: width="400px" >> [[http://path/to/image.jpg][http://path/to/image.jpg]] >> >> From the description at using inline images >> (http://orgmode.org/manual/Images-in-HTML-export.html): >> >> #+begin_quote >> If the description part itself is a file: link or a http: URL pointing >> to an image, this image will be inlined and activated so that clicking >> on the image will activate the link. For example, to include a >> thumbnail that will link to a high resolution version of the image, >> you could use: >> >> [[file:highres.jpg][file:thumb.jpg]] >> #+end_quote >> >> That sounds like my example above should work; the example indicates >> that thumb.jpg would be inlined and clicking it would send to >> highres.jpg. I'd like http://path/to/image.jpg to be inlined at 400px >> but clicking it would make the full size jpg viewable in a browser. >> >> I haven't changed the variable org-export-html-inline-images. It >> should be set to the default, which appears to be 'maybe.' >> > > As usual (right after tinkering a lot and finally mailing the list), > this seems to have just started working, so I'll chalk that up to > something I goofed in my bracket syntax perhaps? Just kidding. Still getting finnicky results, and don't know why. I'm getting either: 1) full sized inline image that *does* click/link 2) a properly sized image that does not click/link. Copied directly from org-mode to make sure I'm not goofing something up by re-writing the syntax since I can't see it when it's in link-formatted face: [[http://path/to/image.jpg][http://path/to/image.jpg]] Produces: http://path/to/image.jpg I can't get it to reproduce the big (but properly linked) image mentioned below at the moment. John > > Still one issue: it's applying the attr_html to the wrong bit. Here's > the resultant export output: > > #+attr_html: width="400px" > [[http://path/to/file.jpg][http://path/to/file.jpg]] > > becomes: > > src="http://path/to/file.jpg" alt="file.jpg"/> > > So the width attr is passed to the link section, not the the img. > > Is this a bug? > > > Thanks, > John > >> >> Thanks for any suggestions, >> John From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Confused about inline html images Date: Thu, 31 Jan 2013 10:45:30 +0100 Message-ID: <87halxpq5g.fsf@bzg.ath.cx> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:40925) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U0rz7-0005yZ-QF for emacs-orgmode@gnu.org; Thu, 31 Jan 2013 06:07:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U0rz6-0007vV-4f for emacs-orgmode@gnu.org; Thu, 31 Jan 2013 06:07:13 -0500 Received: from mail-wi0-f171.google.com ([209.85.212.171]:53170) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U0rz5-0007vF-Ul for emacs-orgmode@gnu.org; Thu, 31 Jan 2013 06:07:12 -0500 Received: by mail-wi0-f171.google.com with SMTP id hn14so4645200wib.10 for ; Thu, 31 Jan 2013 03:07:11 -0800 (PST) In-Reply-To: (John Hendy's message of "Sun, 13 Jan 2013 13:54:07 -0600") 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: John Hendy Cc: emacs-orgmode Hi John, John Hendy writes: > Still one issue: it's applying the attr_html to the wrong bit. Here's > the resultant export output: > > #+attr_html: width="400px" > [[http://path/to/file.jpg][http://path/to/file.jpg]] > > becomes: > > src="http://path/to/file.jpg" alt="file.jpg"/> Yes, that's wrong. I fixed this. Thanks for reporting it! -- Bastien From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Hendy Subject: Re: Confused about inline html images Date: Wed, 6 Feb 2013 15:53:37 -0600 Message-ID: References: <87halxpq5g.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:39188) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U3Cw0-0003VA-GM for emacs-orgmode@gnu.org; Wed, 06 Feb 2013 16:53:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U3Cvz-0004Ew-2t for emacs-orgmode@gnu.org; Wed, 06 Feb 2013 16:53:40 -0500 Received: from mail-oa0-f41.google.com ([209.85.219.41]:49203) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U3Cvy-0004Ek-UH for emacs-orgmode@gnu.org; Wed, 06 Feb 2013 16:53:39 -0500 Received: by mail-oa0-f41.google.com with SMTP id i10so2114783oag.14 for ; Wed, 06 Feb 2013 13:53:38 -0800 (PST) In-Reply-To: <87halxpq5g.fsf@bzg.ath.cx> 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: Bastien Cc: emacs-orgmode On Thu, Jan 31, 2013 at 3:45 AM, Bastien wrote: > Hi John, > > John Hendy writes: > >> Still one issue: it's applying the attr_html to the wrong bit. Here's >> the resultant export output: >> >> #+attr_html: width="400px" >> [[http://path/to/file.jpg][http://path/to/file.jpg]] >> >> becomes: >> >> > src="http://path/to/file.jpg" alt="file.jpg"/> > > Yes, that's wrong. I fixed this. Thanks for reporting it! > Sorry for the late response. I pulled when you made the change but hadn't gotten around to testing. Still having odd behavior. The minimal example: M-x org-version Org-mode version 7.9.3e (7.9.3e-910-g33c4f6 @ /home/jwhendy/.elisp/org.git/lisp/) Emacs installed from Arch Linux main repository (not testing or from source): $ emacs --version GNU Emacs 24.2.1 #+begin_src minimal-config ;; set load paths ;; set load dirs and global config options (add-to-list 'load-path "~/.elisp/org.git/contrib/lisp/") (add-to-list 'load-path "~/.elisp/org.git/lisp/") #+end_src #+begin_src test.org * A headline And a random image from imgur: - full size [[http://i.imgur.com/tladtBz.jpg][http://i.imgur.com/tladtBz.jpg]] - with an =attr_html= width passed: #+attr_html: width="200px" [[http://i.imgur.com/tladtBz.jpg][http://i.imgur.com/tladtBz.jpg]] #+end_src The process: - emacs -q - M-x load-file ~/path/to/minimal-config - C-x C-f ~/path/to/test.org - C-e h When I open the file in a browser and view source, this is what I get for the images portion: #+begin_src html

http://i.imgur.com/tladtBz.jpg

  • with an attr_html width passed:

http://i.imgur.com/tladtBz.jpg

#+end_src It looks like it's using my second option for the alt text instead of using it for a link? Not sure. This was happening to me when I originally posted to the list about this (as in, I couldn't even get the images to be clickable, but then magically it worked right after I posted). Now it seems to be doing the original behavior. Any suggestions? John > -- > Bastien From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Confused about inline html images Date: Thu, 07 Feb 2013 08:38:07 +0100 Message-ID: <871ucs5w8z.fsf@bzg.ath.cx> References: <87halxpq5g.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:49148) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U3NQq-0004iH-KQ for emacs-orgmode@gnu.org; Thu, 07 Feb 2013 04:06:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U3NQp-0001Ug-2K for emacs-orgmode@gnu.org; Thu, 07 Feb 2013 04:06:12 -0500 Received: from we-in-x022e.1e100.net ([2a00:1450:400c:c03::22e]:43092 helo=mail-we0-x22e.google.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U3NQo-0001UT-Ps for emacs-orgmode@gnu.org; Thu, 07 Feb 2013 04:06:11 -0500 Received: by mail-we0-f174.google.com with SMTP id r6so1863798wey.33 for ; Thu, 07 Feb 2013 01:06:09 -0800 (PST) In-Reply-To: (John Hendy's message of "Wed, 6 Feb 2013 15:53:37 -0600") 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: John Hendy Cc: emacs-orgmode Hi John, John Hendy writes: > #+attr_html: width="200px" > [[http://i.imgur.com/tladtBz.jpg][http://i.imgur.com/tladtBz.jpg]] This is not (and has never been) converted to a link, but to an image. Maybe a limitation that we can work on later on. The fix I pushed is about #+attr_html: width="200px" [[http://i.imgur.com/tladtBz.jpg][tladtBz.jpg]] where width="200px" was attributed to the instead of the image. HTH, -- Bastien