all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Org: two images side by side?
@ 2024-10-21 12:57 Michael Heerdegen
  2024-10-21 20:24 ` Leo Butler
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Heerdegen @ 2024-10-21 12:57 UTC (permalink / raw)
  To: Emacs mailing list

Hello,

can org-mode do this?

I have an org document and want that, at least in the html export, a
certain part looks like this:

 +---------------------------------+  +---------------------------------+
 |             Image 1             |  |            Image 2              |
 |                                 |  |                                 |
 |                                 |  |                                 |
 |                                 |  |                                 |
 |                                 |  |                                 |
 |                                 |  |                                 |
 |                                 |  |                                 |
 |                                 |  |                                 |
 |                                 |  |                                 |
 +---------------------------------+  +---------------------------------+

   * Point 1 said about Image 1         * Point 1 said about Image 2
   * Point 2 said about Image 1         * Here Point 2 is harder to
                                          describe and needs 2 lines
   * More stuff about Image 1

I.e., a comparison of two variants of a thing using 2 images with
several small text items below them, that pairwise correspond to each
other.

Is this doable in org-mode or should I better just use latex?

I tried with a table (I did not succeed in getting images next to each
other in any other way).  So, I do get the images placed side by side
but also... the rest of table features, like lines, and cells:
multi-line items are interpreted as two cells and wrongly indented etc.

How can I maybe do this better?


TIA,

Michael.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Org: two images side by side?
  2024-10-21 12:57 Org: two images side by side? Michael Heerdegen
@ 2024-10-21 20:24 ` Leo Butler
  2024-10-22 14:19   ` Michael Heerdegen
  0 siblings, 1 reply; 6+ messages in thread
From: Leo Butler @ 2024-10-21 20:24 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: Emacs mailing list

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

How about the attached solution? 

Leo


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: table.org --]
[-- Type: text/x-org; name="table.org", Size: 4321 bytes --]

#+title: Can Org do this?
#+html_head: <style type="text/css"> img { width: 350px; }</style>

* Question
#+begin_example
From: Michael Heerdegen <michael_heerdegen@web.de>
Subject: Org: two images side by side?
To: Emacs mailing list <help-gnu-emacs@gnu.org>
Date: Mon, 21 Oct 2024 14:57:38 +0200 (6 hours, 26 minutes, 57 seconds ago)
Resent-From: <leo.butler@umanitoba.ca>

Hello,

can org-mode do this?

I have an org document and want that, at least in the html export, a
certain part looks like this:

 +---------------------------------+  +---------------------------------+
 |             Image 1             |  |            Image 2              |
 |                                 |  |                                 |
 |                                 |  |                                 |
 |                                 |  |                                 |
 |                                 |  |                                 |
 |                                 |  |                                 |
 |                                 |  |                                 |
 |                                 |  |                                 |
 |                                 |  |                                 |
 +---------------------------------+  +---------------------------------+

   * Point 1 said about Image 1         * Point 1 said about Image 2
   * Point 2 said about Image 1         * Here Point 2 is harder to
                                          describe and needs 2 lines
   * More stuff about Image 1

I.e., a comparison of two variants of a thing using 2 images with
several small text items below them, that pairwise correspond to each
other.

<snip>
#+end_example

* Answer
I think so. How about

#+attr_html: :rules false :frame false
| An image                | A second                                                                                                                                                                                                                                                                        |
|-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [[file:a-simple-slide.png]] | [[file:a-simple-slide.png]]                                                                                                                                                                                                                                                         |
|-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| - point 1 is made       | - counter-point                                                                                                                                                                                                                                                                 |
| - point 2               | - Now, a long rambling point that is sure to overflow the table and require line wrapping. @@html:<br/>@@ Is this long enough, I don't know, so I will keep writing til I am sure that I have more than two-hundred and fifty characters in this line. Surely, we are now done. |
| - point 3               | - ok, I give.                                                                                                                                                                                                                                                                   |
|-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|

* The source
#+include: ./table.org example

[-- Attachment #3: table.html --]
[-- Type: text/plain, Size: 5939 bytes --]

Can Org do this?

Table of Contents

     * [1]1. Question
     * [2]2. Answer
     * [3]3. The source

1. Question

From: Michael Heerdegen <michael_heerdegen@web.de>
Subject: Org: two images side by side?
To: Emacs mailing list <help-gnu-emacs@gnu.org>
Date: Mon, 21 Oct 2024 14:57:38 +0200 (6 hours, 26 minutes, 57 seconds ago)
Resent-From: <leo.butler@umanitoba.ca>

Hello,

can org-mode do this?

I have an org document and want that, at least in the html export, a
certain part looks like this:

 +---------------------------------+  +---------------------------------+
 |             Image 1             |  |            Image 2              |
 |                                 |  |                                 |
 |                                 |  |                                 |
 |                                 |  |                                 |
 |                                 |  |                                 |
 |                                 |  |                                 |
 |                                 |  |                                 |
 |                                 |  |                                 |
 |                                 |  |                                 |
 +---------------------------------+  +---------------------------------+

   * Point 1 said about Image 1         * Point 1 said about Image 2
   * Point 2 said about Image 1         * Here Point 2 is harder to
                                          describe and needs 2 lines
   * More stuff about Image 1

I.e., a comparison of two variants of a thing using 2 images with
several small text items below them, that pairwise correspond to each
other.

<snip>

2. Answer

   I think so. How about
   An image A second
   a-simple-slide.png a-simple-slide.png
   - point 1 is made - counter-point
   - point 2 - Now, a long rambling point that is sure to overflow the
   table and require line wrapping.
   Is this long enough, I don't know, so I will keep writing til I am sure
   that I have more than two-hundred and fifty characters in this line.
   Surely, we are now done.
   - point 3 - ok, I give.

3. The source

#+title: Can Org do this?
#+html_head: <style type="text/css"> img { width: 350px; }</style>

* Question
#+begin_example
From: Michael Heerdegen <michael_heerdegen@web.de>
Subject: Org: two images side by side?
To: Emacs mailing list <help-gnu-emacs@gnu.org>
Date: Mon, 21 Oct 2024 14:57:38 +0200 (6 hours, 26 minutes, 57 seconds ago)
Resent-From: <leo.butler@umanitoba.ca>

Hello,

can org-mode do this?

I have an org document and want that, at least in the html export, a
certain part looks like this:

 +---------------------------------+  +---------------------------------+
 |             Image 1             |  |            Image 2              |
 |                                 |  |                                 |
 |                                 |  |                                 |
 |                                 |  |                                 |
 |                                 |  |                                 |
 |                                 |  |                                 |
 |                                 |  |                                 |
 |                                 |  |                                 |
 |                                 |  |                                 |
 +---------------------------------+  +---------------------------------+

   * Point 1 said about Image 1         * Point 1 said about Image 2
   * Point 2 said about Image 1         * Here Point 2 is harder to
                                          describe and needs 2 lines
   * More stuff about Image 1

I.e., a comparison of two variants of a thing using 2 images with
several small text items below them, that pairwise correspond to each
other.

<snip>
#+end_example

* Answer
I think so. How about

#+attr_html: :rules false :frame false
| An image                | A second


                                                            |
|-------------------------+-----------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
------------------------------------------------------------|
| [[file:a-simple-slide.png]] | [[file:a-simple-slide.png]]


                                                                    |
|-------------------------+-----------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
------------------------------------------------------------|
| - point 1 is made       | - counter-point


                                                            |
| - point 2               | - Now, a long rambling point that is sure to overflo
w the table and require line wrapping. @@html:<br/>@@ Is this long enough, I don
't know, so I will keep writing til I am sure that I have more than two-hundred
and fifty characters in this line. Surely, we are now done. |
| - point 3               | - ok, I give.


                                                            |
|-------------------------+-----------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
------------------------------------------------------------|

* The source
#+include: ./table.org example

   Author: Leo Butler

   Created: 2024-10-21 Mon 15:24

   [4]Validate

References

   1. file:///tmp/tmp9VqjDT.html#orge08f374
   2. file:///tmp/tmp9VqjDT.html#org7c642ac
   3. file:///tmp/tmp9VqjDT.html#org92f92fc
   4. https://validator.w3.org/check?uri=referer

[-- Attachment #4: a-simple-slide.png --]
[-- Type: image/png, Size: 85275 bytes --]

[-- Attachment #5: ATT00001.txt --]
[-- Type: text/plain, Size: 1906 bytes --]


On Mon, Oct 21 2024, Michael Heerdegen <michael_heerdegen@web.de> wrote:

> Hello,
>
> can org-mode do this?
>
> I have an org document and want that, at least in the html export, a
> certain part looks like this:
>
>  +---------------------------------+  +---------------------------------+
>  |             Image 1             |  |            Image 2              |
>  |                                 |  |                                 |
>  |                                 |  |                                 |
>  |                                 |  |                                 |
>  |                                 |  |                                 |
>  |                                 |  |                                 |
>  |                                 |  |                                 |
>  |                                 |  |                                 |
>  |                                 |  |                                 |
>  +---------------------------------+  +---------------------------------+
>
>    * Point 1 said about Image 1         * Point 1 said about Image 2
>    * Point 2 said about Image 1         * Here Point 2 is harder to
>                                           describe and needs 2 lines
>    * More stuff about Image 1
>
> I.e., a comparison of two variants of a thing using 2 images with
> several small text items below them, that pairwise correspond to each
> other.
>
> Is this doable in org-mode or should I better just use latex?
>
> I tried with a table (I did not succeed in getting images next to each
> other in any other way).  So, I do get the images placed side by side
> but also... the rest of table features, like lines, and cells:
> multi-line items are interpreted as two cells and wrongly indented etc.
>
> How can I maybe do this better?
>
>
> TIA,
>
> Michael.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Org: two images side by side?
  2024-10-21 20:24 ` Leo Butler
@ 2024-10-22 14:19   ` Michael Heerdegen
  2024-10-22 15:40     ` Leo Butler
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Heerdegen @ 2024-10-22 14:19 UTC (permalink / raw)
  To: Leo Butler; +Cc: Emacs mailing list

Leo Butler <Leo.Butler@umanitoba.ca> writes:

> How about the attached solution?

Very cool, thank you very much.

> #+attr_html: :rules false :frame false

This doesn't work as expected for me, however.  I get a table with rules
and frame!  But when I remove this line from your file, I only get
horizontal lines, but no vertical lines, and no frame.  This makes no
sense to me.  I tried with emacs -Q and different browsers to display
the resulting html.


Michael.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Org: two images side by side?
  2024-10-22 14:19   ` Michael Heerdegen
@ 2024-10-22 15:40     ` Leo Butler
  2024-10-23 15:48       ` Michael Heerdegen via Users list for the GNU Emacs text editor
  0 siblings, 1 reply; 6+ messages in thread
From: Leo Butler @ 2024-10-22 15:40 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: Emacs mailing list

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

On Tue, Oct 22 2024, Michael Heerdegen <michael_heerdegen@web.de> wrote:

> Leo Butler <Leo.Butler@umanitoba.ca> writes:
>
>> How about the attached solution?
>
> Very cool, thank you very much.

Thanks.

>
>> #+attr_html: :rules false :frame false
>
> This doesn't work as expected for me, however.

According to
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table
both attributes are deprecated (but false should be none).

I can add some CSS and a DOCTYPE declaration:

#+html_head: <style type="text/css"> img { width: 350px; }
#+html_head_extra: table.noborder { border-style: none; };</style>
#+html_doctype: html5

and change the table attributes to:

#+attr_html: :class noborder

With those changes, there is no border around that table.

Leo


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: table.org --]
[-- Type: text/x-org; name="table.org", Size: 4394 bytes --]

#+title: Can Org do this?
#+html_head: <style type="text/css"> img { width: 350px; }
#+html_head_extra: table.noborder { border-style: none; };</style>
#+html_doctype: html5

* Question
#+begin_example
From: Michael Heerdegen <michael_heerdegen@web.de>
Subject: Org: two images side by side?
To: Emacs mailing list <help-gnu-emacs@gnu.org>
Date: Mon, 21 Oct 2024 14:57:38 +0200 (6 hours, 26 minutes, 57 seconds ago)
Resent-From: <leo.butler@umanitoba.ca>

Hello,

can org-mode do this?

I have an org document and want that, at least in the html export, a
certain part looks like this:

 +---------------------------------+  +---------------------------------+
 |             Image 1             |  |            Image 2              |
 |                                 |  |                                 |
 |                                 |  |                                 |
 |                                 |  |                                 |
 |                                 |  |                                 |
 |                                 |  |                                 |
 |                                 |  |                                 |
 |                                 |  |                                 |
 |                                 |  |                                 |
 +---------------------------------+  +---------------------------------+

   * Point 1 said about Image 1         * Point 1 said about Image 2
   * Point 2 said about Image 1         * Here Point 2 is harder to
                                          describe and needs 2 lines
   * More stuff about Image 1

I.e., a comparison of two variants of a thing using 2 images with
several small text items below them, that pairwise correspond to each
other.

<snip>
#+end_example

* Answer
I think so. How about

#+attr_html: :class noborder
| An image                | A second                                                                                                                                                                                                                                                                        |
|-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [[file:a-simple-slide.png]] | [[file:a-simple-slide.png]]                                                                                                                                                                                                                                                         |
|-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| - point 1 is made       | - counter-point                                                                                                                                                                                                                                                                 |
| - point 2               | - Now, a long rambling point that is sure to overflow the table and require line wrapping. @@html:<br/>@@ Is this long enough, I don't know, so I will keep writing til I am sure that I have more than two-hundred and fifty characters in this line. Surely, we are now done. |
| - point 3               | - ok, I give.                                                                                                                                                                                                                                                                   |
|-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|

* The source
#+include: ./table.org example

[-- Attachment #3: table.html --]
[-- Type: text/plain, Size: 6010 bytes --]

Can Org do this?

Table of Contents

     * [1]1. Question
     * [2]2. Answer
     * [3]3. The source

1. Question

From: Michael Heerdegen <michael_heerdegen@web.de>
Subject: Org: two images side by side?
To: Emacs mailing list <help-gnu-emacs@gnu.org>
Date: Mon, 21 Oct 2024 14:57:38 +0200 (6 hours, 26 minutes, 57 seconds ago)
Resent-From: <leo.butler@umanitoba.ca>

Hello,

can org-mode do this?

I have an org document and want that, at least in the html export, a
certain part looks like this:

 +---------------------------------+  +---------------------------------+
 |             Image 1             |  |            Image 2              |
 |                                 |  |                                 |
 |                                 |  |                                 |
 |                                 |  |                                 |
 |                                 |  |                                 |
 |                                 |  |                                 |
 |                                 |  |                                 |
 |                                 |  |                                 |
 |                                 |  |                                 |
 +---------------------------------+  +---------------------------------+

   * Point 1 said about Image 1         * Point 1 said about Image 2
   * Point 2 said about Image 1         * Here Point 2 is harder to
                                          describe and needs 2 lines
   * More stuff about Image 1

I.e., a comparison of two variants of a thing using 2 images with
several small text items below them, that pairwise correspond to each
other.

<snip>

2. Answer

   I think so. How about
   An image A second
   a-simple-slide.png a-simple-slide.png
   - point 1 is made - counter-point
   - point 2 - Now, a long rambling point that is sure to overflow the
   table and require line wrapping.
   Is this long enough, I don't know, so I will keep writing til I am sure
   that I have more than two-hundred and fifty characters in this line.
   Surely, we are now done.
   - point 3 - ok, I give.

3. The source

#+title: Can Org do this?
#+html_head: <style type="text/css"> img { width: 350px; }
#+html_head_extra: table.noborder { border-style: none; };</style>
#+html_doctype: html5

* Question
#+begin_example
From: Michael Heerdegen <michael_heerdegen@web.de>
Subject: Org: two images side by side?
To: Emacs mailing list <help-gnu-emacs@gnu.org>
Date: Mon, 21 Oct 2024 14:57:38 +0200 (6 hours, 26 minutes, 57 seconds ago)
Resent-From: <leo.butler@umanitoba.ca>

Hello,

can org-mode do this?

I have an org document and want that, at least in the html export, a
certain part looks like this:

 +---------------------------------+  +---------------------------------+
 |             Image 1             |  |            Image 2              |
 |                                 |  |                                 |
 |                                 |  |                                 |
 |                                 |  |                                 |
 |                                 |  |                                 |
 |                                 |  |                                 |
 |                                 |  |                                 |
 |                                 |  |                                 |
 |                                 |  |                                 |
 +---------------------------------+  +---------------------------------+

   * Point 1 said about Image 1         * Point 1 said about Image 2
   * Point 2 said about Image 1         * Here Point 2 is harder to
                                          describe and needs 2 lines
   * More stuff about Image 1

I.e., a comparison of two variants of a thing using 2 images with
several small text items below them, that pairwise correspond to each
other.

<snip>
#+end_example

* Answer
I think so. How about

#+attr_html: :class noborder
| An image                | A second


                                                            |
|-------------------------+-----------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
------------------------------------------------------------|
| [[file:a-simple-slide.png]] | [[file:a-simple-slide.png]]


                                                                    |
|-------------------------+-----------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
------------------------------------------------------------|
| - point 1 is made       | - counter-point


                                                            |
| - point 2               | - Now, a long rambling point that is sure to overflo
w the table and require line wrapping. @@html:<br/>@@ Is this long enough, I don
't know, so I will keep writing til I am sure that I have more than two-hundred
and fifty characters in this line. Surely, we are now done. |
| - point 3               | - ok, I give.


                                                            |
|-------------------------+-----------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
------------------------------------------------------------|

* The source
#+include: ./table.org example

   Author: Leo Butler

   Created: 2024-10-22 Tue 10:37

   [4]Validate

References

   1. file:///tmp/tmprn2Kuq.html#orge3ade9c
   2. file:///tmp/tmprn2Kuq.html#org623b649
   3. file:///tmp/tmprn2Kuq.html#orgcb93652
   4. https://validator.w3.org/check?uri=referer

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Org: two images side by side?
  2024-10-22 15:40     ` Leo Butler
@ 2024-10-23 15:48       ` Michael Heerdegen via Users list for the GNU Emacs text editor
  2024-10-24 13:50         ` Leo Butler
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Heerdegen via Users list for the GNU Emacs text editor @ 2024-10-23 15:48 UTC (permalink / raw)
  To: help-gnu-emacs

Leo Butler <Leo.Butler@umanitoba.ca> writes:

> I can add some CSS and a DOCTYPE declaration:
>
> #+html_head: <style type="text/css"> img { width: 350px; }
> #+html_head_extra: table.noborder { border-style: none; };</style>
> #+html_doctype: html5
>
> and change the table attributes to:
>
> #+attr_html: :class noborder
>
> With those changes, there is no border around that table.

With these attributes the result looks really nice.  I think I'll keep
that.

Thank you!

Michael.




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Org: two images side by side?
  2024-10-23 15:48       ` Michael Heerdegen via Users list for the GNU Emacs text editor
@ 2024-10-24 13:50         ` Leo Butler
  0 siblings, 0 replies; 6+ messages in thread
From: Leo Butler @ 2024-10-24 13:50 UTC (permalink / raw)
  To: Michael Heerdegen via Users list for the GNU Emacs text editor
  Cc: Michael Heerdegen

On Wed, Oct 23 2024, Michael Heerdegen via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> wrote:

> Leo Butler <Leo.Butler@umanitoba.ca> writes:
>
>> I can add some CSS and a DOCTYPE declaration:
>>
>> #+html_head: <style type="text/css"> img { width: 350px; }
>> #+html_head_extra: table.noborder { border-style: none; };</style>
>> #+html_doctype: html5
>>
>> and change the table attributes to:
>>
>> #+attr_html: :class noborder
>>
>> With those changes, there is no border around that table.
>
> With these attributes the result looks really nice.  I think I'll keep
> that.
>
> Thank you!
>
> Michael.

I am glad to hear that I could help.

Leo


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-10-24 13:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-21 12:57 Org: two images side by side? Michael Heerdegen
2024-10-21 20:24 ` Leo Butler
2024-10-22 14:19   ` Michael Heerdegen
2024-10-22 15:40     ` Leo Butler
2024-10-23 15:48       ` Michael Heerdegen via Users list for the GNU Emacs text editor
2024-10-24 13:50         ` Leo Butler

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.