From mboxrd@z Thu Jan 1 00:00:00 1970 From: alban bernard Subject: resize multiple image within a row or paragraph Date: Thu, 18 Sep 2014 16:13:38 +0100 Message-ID: <1411053218.81009.YahooMailNeo@web172803.mail.ir2.yahoo.com> Reply-To: alban bernard Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="-510768873-2071235824-1411053218=:81009" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43970) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUdP6-0001Xe-4N for emacs-orgmode@gnu.org; Thu, 18 Sep 2014 11:13:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XUdOz-0005Gd-8N for emacs-orgmode@gnu.org; Thu, 18 Sep 2014 11:13:52 -0400 Received: from nm14-vm7.bullet.mail.ir2.yahoo.com ([212.82.96.195]:32991) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUdOy-0005G2-T2 for emacs-orgmode@gnu.org; Thu, 18 Sep 2014 11:13:45 -0400 References: 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" ---510768873-2071235824-1411053218=:81009 Content-Type: text/plain; charset=us-ascii Hi Folks, My wife and I use the marvelous org-mode to design a complete set of student courses. These courses are first written in org-mode then exported to html to ease distribution to students (and save some paper). 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. The tutorial about caption in a row shows what is possible while working only with images http://orgmode.org/worg/org-tutorials/images-and-xhtml-export.html#sec-5-2: #+HTML_HEAD: #+CAPTION: #+ATTR_HTML: :width 10% [[./image1.png]] #+CAPTION: #+ATTR_HTML: :width 10% [[./image2.png]] Here, image1 and image2 are displayed and resized in a single row. But we don't know how to mix text within this block so that all is displayed as a single paragraph with resized images. I tested all of this with the following version combos: Debian Jessie/Emacs 24.3.1/Orgmode 8.2.5h-1 (debian) Debian Jessie/Emacs 24.3.1/Orgmode latest git Thanks for any hint that could help. ~Alban. PS: the "Show the source" button of http://orgmode.org/worg/org-tutorials/images-and-xhtml-export.html redirects to: http://orgmode.org/worg/org-tutorials/images-and-xorg.html-export.org.html rather than: http://orgmode.org/worg/org-tutorials/images-and-xhtml-export.org.html ---510768873-2071235824-1411053218=:81009 Content-Type: text/html; charset=us-ascii
Hi Folks,

My wife and I use the marvelous org-mode to design a complete set
of student courses. These courses are first written in org-mode then
exported to html to ease distribution to students (and save some paper).

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.
&n bsp;
The tutorial about caption in a row shows what is possible while working
only with images
http://orgmode.org/worg/org-tutorials/images-and-xhtml-export.html#sec-5-2:

 #+HTML_HEAD: <style type="text/css">
 #+HTML_HEAD:<!--/*--><![CDATA[/*><!--*/
 #+HTML_HEAD: div.figure { float:left; }
 #+HTML_HEAD: /*]]>*/-->
 #+HTML_HEAD: </style>

 #+CAPTION:
 #+ATTR_HTML: :width 10%
 [[./image1.png]]
 #+CAPTION:
 #+ATTR_HTML: :width 10%
 [[./image2.png]]

Here, image1 and image2 are displayed and resized in a single row.
But we don't know how to mix text within this block so that all is
displayed as a single paragraph with resized images.

I tested all of this with the following version combos:
Debian Jessie/Emacs 24.3.1/ Orgmode 8.2.5h-1 (debian)
Debian Jessie/Emacs 24.3.1/Orgmode latest git

Thanks for any hint that could help.

~Alban.

PS: the "Show the source" button of http://orgmode.org/worg/org-tutorials/images-and-xhtml-export.html
redirects to:
http://orgmode.org/worg/org-tutorials/images-and-xorg.html-export.org.html
rather than:
http://orgmode.org/worg/org-tutorials/images-and-xhtml-export.org.html

---510768873-2071235824-1411053218=:81009-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: alban bernard Subject: Re: resize multiple image within a row or paragraph Date: Sat, 20 Sep 2014 08:23:05 +0100 Message-ID: <1411197785.65195.YahooMailNeo@web172806.mail.ir2.yahoo.com> References: <1411053218.81009.YahooMailNeo@web172803.mail.ir2.yahoo.com> Reply-To: alban bernard Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="887096866-975175286-1411197785=:65195" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35236) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XVF0p-0004n7-Oa for emacs-orgmode@gnu.org; Sat, 20 Sep 2014 03:23:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XVF0j-0007Rb-0x for emacs-orgmode@gnu.org; Sat, 20 Sep 2014 03:23:19 -0400 Received: from nm24.bullet.mail.ir2.yahoo.com ([212.82.96.48]:37355) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XVF0i-0007QT-Ng for emacs-orgmode@gnu.org; Sat, 20 Sep 2014 03:23:12 -0400 In-Reply-To: <1411053218.81009.YahooMailNeo@web172803.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: "emacs-orgmode@gnu.org" --887096866-975175286-1411197785=:65195 Content-Type: text/plain; charset=us-ascii Any thought on this? ~Alban. On Thursday, September 18, 2014 5:14 PM, alban bernard wrote: Hi Folks, My wife and I use the marvelous org-mode to design a complete set of student courses. These courses are first written in org-mode then exported to html to ease distribution to students (and save some paper). 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. The tutorial about caption in a row shows what is possible while working only with images http://orgmode.org/worg/org-tutorials/images-and-xhtml-export.html#sec-5-2: #+HTML_HEAD: #+CAPTION: #+ATTR_HTML: :width 10% [[./image1.png]] #+CAPTION: #+ATTR_HTML: :width 10% [[./image2.png]] Here, image1 and image2 are displayed and resized in a single row. But we don't know how to mix text within this block so that all is displayed as a single paragraph with resized images. I tested all of this with the following version combos: Debian Jessie/Emacs 24.3.1/Orgmode 8.2.5h-1 (debian) Debian Jessie/Emacs 24.3.1/Orgmode latest git Thanks for any hint that could help. ~Alban. PS: the "Show the source" button of http://orgmode.org/worg/org-tutorials/images-and-xhtml-export.html redirects to: http://orgmode.org/worg/org-tutorials/images-and-xorg.html-export.org.html rather than: http://orgmode.org/worg/org-tutorials/images-and-xhtml-export.org.html --887096866-975175286-1411197785=:65195 Content-Type: text/html; charset=us-ascii
Any thought on this?

~Alban.


On Thursday, September 18, 2014 5:14 PM, alban bernard <alban.bernard@yahoo.fr> wrote:


Hi Folks,

My wife and I use the marvelous org-mode to design a complete set
of student courses. These courses are first written in org-mode then
exported to html to ease distribution to students (and save some paper).

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.
 
The tutorial about caption in a row shows what is possible while working
only with images
http://orgmode.org/worg/org-tutorials/images-and-xhtml-export.html#sec-5-2:

 #+HTML_HEAD: <style type="text/css">
 #+HTML_HEAD:<!--/*--><![CDATA[/*><!--*/
 #+HTML_HEAD: div.figure { float:left; }
 #+HTML_HEAD: /*]]>*/-->
 #+HTML_HEAD: </style>

 #+CAPTION:
 #+ATTR_HTML: :width 10%
 [[./image1.png]]
 #+CAPTION:
 #+ATTR_HTML: :width 10%
 [[./image2.png]]

Here, image1 and image2 are displayed and resized in a single row.
But we don't know how to mix text within this block so that all is
displayed as a single paragraph with resized images.

I tested all of this with the following version combos:
Debian Jessie/Emacs 24.3.1/ Orgmode 8.2.5h-1 (debian)
Debian Jessie/Emacs 24.3.1/Orgmode latest git

Thanks for any hint that could help.

~Alban.

PS: the "Show the source" button of http://orgmode.org/worg/org-tutorials/images-and-xhtml-export.html
redirects to:
http://orgmode.org/worg/org-tutorials/images-and-xorg.html-export.org.html
rather than:
http://orgmode.org/worg/org-tutorials/images-and-xhtml-export.org.html



--887096866-975175286-1411197785=:65195-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: resize multiple image within a row or paragraph Date: Sat, 20 Sep 2014 14:08:38 +0200 Message-ID: <87d2aqa3zt.fsf@nicolasgoaziou.fr> References: <1411053218.81009.YahooMailNeo@web172803.mail.ir2.yahoo.com> <1411197785.65195.YahooMailNeo@web172806.mail.ir2.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34609) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XVJST-0002X1-Sk for emacs-orgmode@gnu.org; Sat, 20 Sep 2014 08:08:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XVJSN-00050w-Am for emacs-orgmode@gnu.org; Sat, 20 Sep 2014 08:08:09 -0400 Received: from relay4-d.mail.gandi.net ([2001:4b98:c:538::196]:51786) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XVJSN-00050V-52 for emacs-orgmode@gnu.org; Sat, 20 Sep 2014 08:08:03 -0400 In-Reply-To: <1411197785.65195.YahooMailNeo@web172806.mail.ir2.yahoo.com> (alban bernard's message of "Sat, 20 Sep 2014 08:23:05 +0100") 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" Hello, alban bernard writes: > My wife and I use the marvelous org-mode to design a complete set > of student courses. These courses are first written in org-mode then > exported to html to ease distribution to students (and save some paper). > > 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. > > The tutorial about caption in a row shows what is possible while working > only with > images > http://orgmode.org/worg/org-tutorials/images-and-xhtml-export.html#sec-5-2: > > #+HTML_HEAD: > > #+CAPTION: > #+ATTR_HTML: :width 10% > [[./image1.png]] > #+CAPTION: > #+ATTR_HTML: :width 10% > [[./image2.png]] > > Here, image1 and image2 are displayed and resized in a single row. > 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. More explicitly, an HTML paragraph can be defined as a cluster of elements not separated by any blank line and containing at least an Org paragraph. Hence: #+attr_html: :width 10% [[./img1.png]] Paragraph #+attr_html: :width 10% [[./img2.png]] consists of two paragraphs in Org, but would be seen as a single paragraph by HTML, and exported as such. Implementation is simple using pseudo-elements. `latex' back-ends does it already for tables and math snippets. However, I'm no HTML specialist, so there may be drawbacks I cannot foresee. Regards, -- Nicolas Goaziou From mboxrd@z Thu Jan 1 00:00:00 1970 From: alban bernard Subject: Re: resize multiple image within a row or paragraph Date: Sun, 21 Sep 2014 14:22:26 +0100 Message-ID: <1411305746.11792.YahooMailNeo@web172804.mail.ir2.yahoo.com> References: <1411053218.81009.YahooMailNeo@web172803.mail.ir2.yahoo.com> <1411197785.65195.YahooMailNeo@web172806.mail.ir2.yahoo.com> <87d2aqa3zt.fsf@nicolasgoaziou.fr> Reply-To: alban bernard Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36748) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XVh68-00062S-GO for emacs-orgmode@gnu.org; Sun, 21 Sep 2014 09:22:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XVh62-0005aV-Gd for emacs-orgmode@gnu.org; Sun, 21 Sep 2014 09:22:40 -0400 Received: from nm22-vm3.bullet.mail.ir2.yahoo.com ([212.82.97.9]:58850) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XVh62-0005aE-A1 for emacs-orgmode@gnu.org; Sun, 21 Sep 2014 09:22:34 -0400 In-Reply-To: <87d2aqa3zt.fsf@nicolasgoaziou.fr> 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: Nicolas Goaziou Cc: "emacs-orgmode@gnu.org" 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: > My wife and I use the marvelous org-mode to design a complete set > of student courses. These courses are first written in org-mode then > exported to html to ease distribution to students (and save some paper). > > 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. > > The tutorial about caption in a row shows what is possible while working > only with > images > http://orgmode.org/worg/org-tutorials/images-and-xhtml-export.html#sec-5-2: > > #+HTML_HEAD: > > #+CAPTION: > #+ATTR_HTML: :width 10% > [[./image1.png]] > #+CAPTION: > #+ATTR_HTML: :width 10% > [[./image2.png]] > > Here, image1 and image2 are displayed and resized in a single row. > 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. More explicitly, an HTML paragraph can be defined as a cluster of elements not separated by any blank line and containing at least an Org paragraph. Hence: #+attr_html: :width 10% [[./img1.png]] Paragraph #+attr_html: :width 10% [[./img2.png]] consists of two paragraphs in Org, but would be seen as a single paragraph by HTML, and exported as such. Implementation is simple using pseudo-elements. `latex' back-ends does it already for tables and math snippets. However, I'm no HTML specialist, so there may be drawbacks I cannot foresee. Regards, -- Nicolas Goaziou 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. > (...) From mboxrd@z Thu Jan 1 00:00:00 1970 From: alban bernard Subject: Re: resize multiple image within a row or paragraph Date: Sun, 21 Sep 2014 20:02:33 +0100 Message-ID: <1411326153.44951.YahooMailNeo@web172806.mail.ir2.yahoo.com> 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> Reply-To: alban bernard Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33973) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XVmPH-0006aZ-CV for emacs-orgmode@gnu.org; Sun, 21 Sep 2014 15:02:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XVmPB-0008VE-9x for emacs-orgmode@gnu.org; Sun, 21 Sep 2014 15:02:47 -0400 Received: from nm23-vm4.bullet.mail.ir2.yahoo.com ([212.82.97.19]:41226) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XVmPB-0008Or-2T for emacs-orgmode@gnu.org; Sun, 21 Sep 2014 15:02:41 -0400 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: Christian Moe Cc: "emacs-orgmode@gnu.org" , Nicolas Goaziou I will test this workaround pronto. For other backends, that's not a problem as I render pdf from html through phantomjs and I don't use neither latex nor odt for the moment. Big thanks to you both. ~Alban Bernard. On Sunday, September 21, 2014 8:07 PM, Christian Moe wrote: 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. > (...) From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: resize multiple image within a row or paragraph Date: Mon, 22 Sep 2014 17:56:06 +0200 Message-ID: <87r3z3lkdl.fsf@nicolasgoaziou.fr> 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]:40723) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XW5xh-00062H-HO for emacs-orgmode@gnu.org; Mon, 22 Sep 2014 11:55:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XW5xZ-00050I-Dm for emacs-orgmode@gnu.org; Mon, 22 Sep 2014 11:55:37 -0400 Received: from relay4-d.mail.gandi.net ([2001:4b98:c:538::196]:46411) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XW5xZ-0004zg-6g for emacs-orgmode@gnu.org; Mon, 22 Sep 2014 11:55:29 -0400 In-Reply-To: (Christian Moe's message of "Sun, 21 Sep 2014 20:08:04 +0200") 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: Christian Moe Cc: alban bernard , "emacs-orgmode@gnu.org" Hello, Christian Moe writes: > 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: [...] Good to know. Anyhow, does my proposal make sense? Regards, -- Nicolas Goaziou From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Moe Subject: Re: resize multiple image within a row or paragraph Date: Wed, 24 Sep 2014 15:37:17 +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> <87r3z3lkdl.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40458) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWmjF-0007qz-U2 for emacs-orgmode@gnu.org; Wed, 24 Sep 2014 09:35:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XWmj9-0001Mc-Eg for emacs-orgmode@gnu.org; Wed, 24 Sep 2014 09:35:33 -0400 Received: from mail2.b1.hitrost.net ([91.185.211.205]:18047) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWmj9-0001LE-8t for emacs-orgmode@gnu.org; Wed, 24 Sep 2014 09:35:27 -0400 In-reply-to: <87r3z3lkdl.fsf@nicolasgoaziou.fr> 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: Nicolas Goaziou Cc: alban bernard , "emacs-orgmode@gnu.org" Nicolas Goaziou writes: > Hello, > > Christian Moe writes: > >> 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: > > [...] > > Good to know. > > Anyhow, does my proposal make sense? > > > Regards, Hi, Sorry, catching up on mail. Also, I misunderstood your proposal when you wrote it -- I thought it was a suggestion for what the user could do. But now I realize it's a proposed change to the HTML backend itself. You wrote: > `html' back-end can redefine what > a paragraph is, instead of following Org's own definition. More > explicitly, an HTML paragraph can be defined as a cluster of elements > not separated by any blank line and containing at least an Org > paragraph. Hence: > #+attr_html: :width 10% > [[./img1.png]] > Paragraph > #+attr_html: :width 10% > [[./img2.png]] > consists of two paragraphs in Org, but would be seen as a single > paragraph by HTML, and exported as such. > Implementation is simple using pseudo-elements. `latex' back-ends does > it already for tables and math snippets. However, I'm no HTML > specialist, so there may be drawbacks I cannot foresee. I'm no expert either. But FWIW, it does make sense to me, and seems intuitive from an HTML-centric view, since IMG elements in HTML are basically inline. I think users would expect to have to put blank lines around an image if they want it wrapped in a paragraph, and should expect to get in trouble if they did not put blank lines around a captioned figure. Yours, Christian