From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Moe Subject: Re: resize multiple image within a row or paragraph Date: Sun, 21 Sep 2014 20:08:04 +0200 Message-ID: References: <1411053218.81009.YahooMailNeo@web172803.mail.ir2.yahoo.com> <1411197785.65195.YahooMailNeo@web172806.mail.ir2.yahoo.com> <87d2aqa3zt.fsf@nicolasgoaziou.fr> <1411305746.11792.YahooMailNeo@web172804.mail.ir2.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54639) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XVlWn-0007Oo-Iw for emacs-orgmode@gnu.org; Sun, 21 Sep 2014 14:06:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XVlWi-0005cD-Cf for emacs-orgmode@gnu.org; Sun, 21 Sep 2014 14:06:29 -0400 Received: from mail2.b1.hitrost.net ([91.185.211.205]:45050) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XVlWi-0005Z6-3T for emacs-orgmode@gnu.org; Sun, 21 Sep 2014 14:06:24 -0400 In-reply-to: <1411305746.11792.YahooMailNeo@web172804.mail.ir2.yahoo.com> 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: alban bernard Cc: "emacs-orgmode@gnu.org" , Nicolas Goaziou Hi, Here's a simple CSS workaround that might or might not work well for you, and won't work for non-HTML backends, but at least requires minimal hacking: Wrap the sentence in a DIV element and define a class for it to force child paragraphs to display as inline instead of blocks. You can set up the style sheets in various ways, but by way of demonstration, add the style definition with HTML_HEAD export keyword: #+HTML_HEAD: Then you can do things like this: #+html:
This is a phrase with #+ATTR_HTML: :width 50% [[./image1.png]] and #+ATTR_HTML: :width 50% [[./image2.png]] inline images. #+end_inlineparas #+html:
The generic #+begin_{block} syntax lets you do this in a more org-like and less cluttered way: #+begin_inlineparas This is a phrase with #+ATTR_HTML: :width 50% [[./image1.png]] and #+ATTR_HTML: :width 50% [[./image2.png]] inline images. #+end_inlineparas Yours, Christian alban bernard writes: > Wow. Thanks for your reply. I will stop googling and worg-ing for a solution. I will rather dig into your suggestion. As I understood, there is some hackery involved here .. :) > > Thanks again. > > ~Alban Bernard > > > On Saturday, September 20, 2014 2:08 PM, Nicolas Goaziou wrote: > Hello, > > > alban bernard writes: > > >> (...) >> We wonder what is the correct way to resize multiple images those links >> are within a single paragraph: >> >> "This is a phrase with [[./image1.png]] and [[./image2.png]] inline images." >> >> With the following, the only first image is resized (as expected): >> >> #+ATTR_HTML: :width 50% >> This is a phrase with [[./image1.png]] and [[./image2.png]] inline images. >> >> (...) >> But we don't know how to mix text within this block so that all is >> displayed as a single paragraph with resized images. > > > This is not possible out of the box. You might use some Babel code to > generate the needed HTML but I guess it wouldn't be particularly easy. > > Nevertheless, there's a solution. `html' back-end can redefine what > a paragraph is, instead of following Org's own definition. > (...)