emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: alban bernard <alban.bernard@yahoo.fr>
To: Christian Moe <mail@christianmoe.com>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>,
	Nicolas Goaziou <mail@nicolasgoaziou.fr>
Subject: Re: resize multiple image within a row or paragraph
Date: Sun, 21 Sep 2014 20:02:33 +0100	[thread overview]
Message-ID: <1411326153.44951.YahooMailNeo@web172806.mail.ir2.yahoo.com> (raw)
In-Reply-To: <m2oau8yhh7.fsf@christianmoe.com>

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 <mail@christianmoe.com> 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: <style>.inlineparas p {display: inline;} </style>

Then you can do things like  this:

#+html: <div class="inlineparas">
This is a phrase with
#+ATTR_HTML: :width 50%
[[./image1.png]]
and
#+ATTR_HTML: :width 50%
[[./image2.png]]
inline images.
#+end_inlineparas
#+html: </div>

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 <mail@nicolasgoaziou.fr> wrote:
> Hello,
>
>
> alban bernard <alban.bernard@yahoo.fr> 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. 
> (...)

  reply	other threads:[~2014-09-21 19:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-18 15:13 resize multiple image within a row or paragraph alban bernard
2014-09-20  7:23 ` alban bernard
2014-09-20 12:08   ` Nicolas Goaziou
2014-09-21 13:22     ` alban bernard
2014-09-21 18:08       ` Christian Moe
2014-09-21 19:02         ` alban bernard [this message]
2014-09-22 15:56         ` Nicolas Goaziou
2014-09-24 13:37           ` Christian Moe

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=1411326153.44951.YahooMailNeo@web172806.mail.ir2.yahoo.com \
    --to=alban.bernard@yahoo.fr \
    --cc=emacs-orgmode@gnu.org \
    --cc=mail@christianmoe.com \
    --cc=mail@nicolasgoaziou.fr \
    /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).