public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* revealjs background and self contained not working anymore
@ 2021-09-28  9:21 christophe dervieux
       [not found] ` <80a3d759-3f29-44d8-9a43-5890dcf9b70en-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: christophe dervieux @ 2021-09-28  9:21 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 2207 bytes --]



Hello, 

Here is a reproducible example of the issue

curl --output background.jpg -L 'https://unsplash.com/photos/8OyKWQgBsKQ/download?force=true&w=1920'

echo "# Slide {data-background-image='background.jpg'}" > slide.md
echo "" >> slide.md
echo "Content" >> slide.md

# Not self contained 
pandoc -t revealjs -s -o slide.html --metadata title="test" slide.md

# Self contained
pandoc -t revealjs --self-contained -o slide-self-contained.html --metadata title="test" slide.md

When using self-contained, the background image is no more working. Pandoc 
encodes to data: but it seems reveal.js does not know how to handle it. It 
split the encoded data: in two url component.

It seems like a change in reveal 4 as using the same slide.md file with 
different version seems to break. 

What I tried: 

   - Pandoc 2.9.2.1 : last one compatible with reveal.js 3 I believe
   
    pandoc.exe -t revealjs --self-contained -o slide-self-contained.html --metadata title="test" -V revealjs-url=https://unpkg.com/reveal.js@3/ slide.md
   
   Works as expected 
   - Pandoc 2.10: First to use reveal.js 4
   
     pandoc.exe -t revealjs --self-contained -o slide-self-contained.html --metadata title="test" -V revealjs-url=https://unpkg.com/reveal.js@4/ slide.md
   
   
So it seems that something broke when upgrading. 

Is this a known issue ?
Should I open an issue in Pandoc to track ? I believe this could be 
something in reveal.js not handling correctly encoded data: field.

MANUAL still says (
https://pandoc.org/MANUAL.html#background-in-reveal.js-and-beamer)

Background images can be added to self-contained reveal.js slideshows and 
to beamer slideshows.

But maybe self-contained and revealjs does not work well. 

Thank you
​

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/80a3d759-3f29-44d8-9a43-5890dcf9b70en%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 10153 bytes --]

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

* Re: revealjs background and self contained not working anymore
       [not found] ` <80a3d759-3f29-44d8-9a43-5890dcf9b70en-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2021-09-28 10:05   ` christophe dervieux
       [not found]     ` <34ae236d-5f4e-42be-8e18-68a5ce5b6f08n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2021-09-28 16:04   ` John MacFarlane
  1 sibling, 1 reply; 6+ messages in thread
From: christophe dervieux @ 2021-09-28 10:05 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 2634 bytes --]



This is definitely something in revealjs that change in version 4.1.1. It 
works ok with 4.1.0

pandoc -t revealjs --self-contained -o slide-self-contained.html --metadata title="test" -V revealjs-url=https://unpkg.com/reveal.js@4.1.0/ slide.md

​
Le mardi 28 septembre 2021 à 11:21:18 UTC+2, christophe dervieux a écrit :

> Hello, 
>
> Here is a reproducible example of the issue
>
> curl --output background.jpg -L 'https://unsplash.com/photos/8OyKWQgBsKQ/download?force=true&w=1920'
>
> echo "# Slide {data-background-image='background.jpg'}" > slide.md
> echo "" >> slide.md
> echo "Content" >> slide.md
>
> # Not self contained 
> pandoc -t revealjs -s -o slide.html --metadata title="test" slide.md
>
> # Self contained
> pandoc -t revealjs --self-contained -o slide-self-contained.html --metadata title="test" slide.md
>
> When using self-contained, the background image is no more working. 
> Pandoc encodes to data: but it seems reveal.js does not know how to 
> handle it. It split the encoded data: in two url component.
>
> It seems like a change in reveal 4 as using the same slide.md file with 
> different version seems to break. 
>
> What I tried: 
>
>    - Pandoc 2.9.2.1 : last one compatible with reveal.js 3 I believe
>    
>     pandoc.exe -t revealjs --self-contained -o slide-self-contained.html --metadata title="test" -V revealjs-url=https://unpkg.com/reveal.js@3/ slide.md
>    
>    Works as expected 
>    - Pandoc 2.10: First to use reveal.js 4
>    
>      pandoc.exe -t revealjs --self-contained -o slide-self-contained.html --metadata title="test" -V revealjs-url=https://unpkg.com/reveal.js@4/ slide.md
>    
>    
> So it seems that something broke when upgrading. 
>
> Is this a known issue ?
> Should I open an issue in Pandoc to track ? I believe this could be 
> something in reveal.js not handling correctly encoded data: field.
>
> MANUAL still says (
> https://pandoc.org/MANUAL.html#background-in-reveal.js-and-beamer)
>
> Background images can be added to self-contained reveal.js slideshows and 
> to beamer slideshows.
>
> But maybe self-contained and revealjs does not work well. 
>
> Thank you
> ​
>

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/34ae236d-5f4e-42be-8e18-68a5ce5b6f08n%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 12650 bytes --]

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

* Re: revealjs background and self contained not working anymore
       [not found]     ` <34ae236d-5f4e-42be-8e18-68a5ce5b6f08n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2021-09-28 10:06       ` christophe dervieux
  0 siblings, 0 replies; 6+ messages in thread
From: christophe dervieux @ 2021-09-28 10:06 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 2890 bytes --]

Found the related issue: https://github.com/hakimel/reveal.js/issues/2978

Le mardi 28 septembre 2021 à 12:05:35 UTC+2, christophe dervieux a écrit :

> This is definitely something in revealjs that change in version 4.1.1. It 
> works ok with 4.1.0
>
> pandoc -t revealjs --self-contained -o slide-self-contained.html --metadata title="test" -V revealjs-url=https://unpkg.com/reve...@4.1.0/ <https://unpkg.com/reveal.js@4.1.0/> slide.md
>
> ​
> Le mardi 28 septembre 2021 à 11:21:18 UTC+2, christophe dervieux a écrit :
>
>> Hello, 
>>
>> Here is a reproducible example of the issue
>>
>> curl --output background.jpg -L 'https://unsplash.com/photos/8OyKWQgBsKQ/download?force=true&w=1920'
>>
>> echo "# Slide {data-background-image='background.jpg'}" > slide.md
>> echo "" >> slide.md
>> echo "Content" >> slide.md
>>
>> # Not self contained 
>> pandoc -t revealjs -s -o slide.html --metadata title="test" slide.md
>>
>> # Self contained
>> pandoc -t revealjs --self-contained -o slide-self-contained.html --metadata title="test" slide.md
>>
>> When using self-contained, the background image is no more working. 
>> Pandoc encodes to data: but it seems reveal.js does not know how to 
>> handle it. It split the encoded data: in two url component.
>>
>> It seems like a change in reveal 4 as using the same slide.md file with 
>> different version seems to break. 
>>
>> What I tried: 
>>
>>    - Pandoc 2.9.2.1 : last one compatible with reveal.js 3 I believe
>>    
>>     pandoc.exe -t revealjs --self-contained -o slide-self-contained.html --metadata title="test" -V revealjs-url=https://unpkg.com/reveal.js@3/ slide.md
>>    
>>    Works as expected 
>>    - Pandoc 2.10: First to use reveal.js 4
>>    
>>      pandoc.exe -t revealjs --self-contained -o slide-self-contained.html --metadata title="test" -V revealjs-url=https://unpkg.com/reveal.js@4/ slide.md
>>    
>>    
>> So it seems that something broke when upgrading. 
>>
>> Is this a known issue ?
>> Should I open an issue in Pandoc to track ? I believe this could be 
>> something in reveal.js not handling correctly encoded data: field.
>>
>> MANUAL still says (
>> https://pandoc.org/MANUAL.html#background-in-reveal.js-and-beamer)
>>
>> Background images can be added to self-contained reveal.js slideshows and 
>> to beamer slideshows.
>>
>> But maybe self-contained and revealjs does not work well. 
>>
>> Thank you
>> ​
>>
>

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/16a09ef6-0b0c-439b-a2ef-9bddfdcf0f0bn%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 13167 bytes --]

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

* Re: revealjs background and self contained not working anymore
       [not found] ` <80a3d759-3f29-44d8-9a43-5890dcf9b70en-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2021-09-28 10:05   ` christophe dervieux
@ 2021-09-28 16:04   ` John MacFarlane
       [not found]     ` <m21r581ybt.fsf-d8241O7hbXoP5tpWdHSM3tPlBySK3R6THiGdP5j34PU@public.gmane.org>
  1 sibling, 1 reply; 6+ messages in thread
From: John MacFarlane @ 2021-09-28 16:04 UTC (permalink / raw)
  To: christophe dervieux, pandoc-discuss


Not sure what is happening here, but yes, an issue on the tracker
would be welcome.

I note also that because the data-background-image attribute
is retained on the h1 element as well as being propagated to
the section element, we get two copies of the encoded image.
That is bad.  See also https://github.com/jgm/pandoc/issues/5965


christophe dervieux <christophe.dervieux-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> Hello, 
>
> Here is a reproducible example of the issue
>
> curl --output background.jpg -L 'https://unsplash.com/photos/8OyKWQgBsKQ/download?force=true&w=1920'
>
> echo "# Slide {data-background-image='background.jpg'}" > slide.md
> echo "" >> slide.md
> echo "Content" >> slide.md
>
> # Not self contained 
> pandoc -t revealjs -s -o slide.html --metadata title="test" slide.md
>
> # Self contained
> pandoc -t revealjs --self-contained -o slide-self-contained.html --metadata title="test" slide.md
>
> When using self-contained, the background image is no more working. Pandoc 
> encodes to data: but it seems reveal.js does not know how to handle it. It 
> split the encoded data: in two url component.
>
> It seems like a change in reveal 4 as using the same slide.md file with 
> different version seems to break. 
>
> What I tried: 
>
>    - Pandoc 2.9.2.1 : last one compatible with reveal.js 3 I believe
>    
>     pandoc.exe -t revealjs --self-contained -o slide-self-contained.html --metadata title="test" -V revealjs-url=https://unpkg.com/reveal.js@3/ slide.md
>    
>    Works as expected 
>    - Pandoc 2.10: First to use reveal.js 4
>    
>      pandoc.exe -t revealjs --self-contained -o slide-self-contained.html --metadata title="test" -V revealjs-url=https://unpkg.com/reveal.js@4/ slide.md
>    
>    
> So it seems that something broke when upgrading. 
>
> Is this a known issue ?
> Should I open an issue in Pandoc to track ? I believe this could be 
> something in reveal.js not handling correctly encoded data: field.
>
> MANUAL still says (
> https://pandoc.org/MANUAL.html#background-in-reveal.js-and-beamer)
>
> Background images can be added to self-contained reveal.js slideshows and 
> to beamer slideshows.
>
> But maybe self-contained and revealjs does not work well. 
>
> Thank you
> ​
>
> -- 
> You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/80a3d759-3f29-44d8-9a43-5890dcf9b70en%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/m21r581ybt.fsf%40Johns-Air.hsd1.ca.comcast.net.


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

* Re: revealjs background and self contained not working anymore
       [not found]     ` <m21r581ybt.fsf-d8241O7hbXoP5tpWdHSM3tPlBySK3R6THiGdP5j34PU@public.gmane.org>
@ 2021-09-28 17:05       ` John MacFarlane
       [not found]         ` <m2r1d8zl3o.fsf-d8241O7hbXoP5tpWdHSM3tPlBySK3R6THiGdP5j34PU@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: John MacFarlane @ 2021-09-28 17:05 UTC (permalink / raw)
  To: christophe dervieux, pandoc-discuss


Looking at the HTML using the browser's Inspect feature, I
see that reveal.js is adding a div devoted to backgrounds,
which uses a background-image-hash attribute.  This may be
constructed improperly for data URIs; anyway, this is one
thing to investigate here.

John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> writes:

> Not sure what is happening here, but yes, an issue on the tracker
> would be welcome.
>
> I note also that because the data-background-image attribute
> is retained on the h1 element as well as being propagated to
> the section element, we get two copies of the encoded image.
> That is bad.  See also https://github.com/jgm/pandoc/issues/5965
>
>
> christophe dervieux <christophe.dervieux-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>
>> Hello, 
>>
>> Here is a reproducible example of the issue
>>
>> curl --output background.jpg -L 'https://unsplash.com/photos/8OyKWQgBsKQ/download?force=true&w=1920'
>>
>> echo "# Slide {data-background-image='background.jpg'}" > slide.md
>> echo "" >> slide.md
>> echo "Content" >> slide.md
>>
>> # Not self contained 
>> pandoc -t revealjs -s -o slide.html --metadata title="test" slide.md
>>
>> # Self contained
>> pandoc -t revealjs --self-contained -o slide-self-contained.html --metadata title="test" slide.md
>>
>> When using self-contained, the background image is no more working. Pandoc 
>> encodes to data: but it seems reveal.js does not know how to handle it. It 
>> split the encoded data: in two url component.
>>
>> It seems like a change in reveal 4 as using the same slide.md file with 
>> different version seems to break. 
>>
>> What I tried: 
>>
>>    - Pandoc 2.9.2.1 : last one compatible with reveal.js 3 I believe
>>    
>>     pandoc.exe -t revealjs --self-contained -o slide-self-contained.html --metadata title="test" -V revealjs-url=https://unpkg.com/reveal.js@3/ slide.md
>>    
>>    Works as expected 
>>    - Pandoc 2.10: First to use reveal.js 4
>>    
>>      pandoc.exe -t revealjs --self-contained -o slide-self-contained.html --metadata title="test" -V revealjs-url=https://unpkg.com/reveal.js@4/ slide.md
>>    
>>    
>> So it seems that something broke when upgrading. 
>>
>> Is this a known issue ?
>> Should I open an issue in Pandoc to track ? I believe this could be 
>> something in reveal.js not handling correctly encoded data: field.
>>
>> MANUAL still says (
>> https://pandoc.org/MANUAL.html#background-in-reveal.js-and-beamer)
>>
>> Background images can be added to self-contained reveal.js slideshows and 
>> to beamer slideshows.
>>
>> But maybe self-contained and revealjs does not work well. 
>>
>> Thank you
>> ​
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>> To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/80a3d759-3f29-44d8-9a43-5890dcf9b70en%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/m2r1d8zl3o.fsf%40Johns-Air.hsd1.ca.comcast.net.


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

* Re: revealjs background and self contained not working anymore
       [not found]         ` <m2r1d8zl3o.fsf-d8241O7hbXoP5tpWdHSM3tPlBySK3R6THiGdP5j34PU@public.gmane.org>
@ 2021-10-08  4:58           ` Pranesh Prakash
  0 siblings, 0 replies; 6+ messages in thread
From: Pranesh Prakash @ 2021-10-08  4:58 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 3982 bytes --]

For the record, this issue has been fixed upstream, thanks to Christophe 
and Hakim:
https://github.com/fab4100/reveal.js/commit/3e0b68ea80e3c123def3182ecb183febafae8961

On Tuesday, 28 September, 2021 at 10:36:04 pm UTC+5:30 John MacFarlane 
wrote:

>
> Looking at the HTML using the browser's Inspect feature, I
> see that reveal.js is adding a div devoted to backgrounds,
> which uses a background-image-hash attribute. This may be
> constructed improperly for data URIs; anyway, this is one
> thing to investigate here.
>
> John MacFarlane <j...-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> writes:
>
> > Not sure what is happening here, but yes, an issue on the tracker
> > would be welcome.
> >
> > I note also that because the data-background-image attribute
> > is retained on the h1 element as well as being propagated to
> > the section element, we get two copies of the encoded image.
> > That is bad. See also https://github.com/jgm/pandoc/issues/5965
> >
> >
> > christophe dervieux <christoph...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
> >
> >> Hello, 
> >>
> >> Here is a reproducible example of the issue
> >>
> >> curl --output background.jpg -L '
> https://unsplash.com/photos/8OyKWQgBsKQ/download?force=true&w=1920'
> >>
> >> echo "# Slide {data-background-image='background.jpg'}" > slide.md
> >> echo "" >> slide.md
> >> echo "Content" >> slide.md
> >>
> >> # Not self contained 
> >> pandoc -t revealjs -s -o slide.html --metadata title="test" slide.md
> >>
> >> # Self contained
> >> pandoc -t revealjs --self-contained -o slide-self-contained.html 
> --metadata title="test" slide.md
> >>
> >> When using self-contained, the background image is no more working. 
> Pandoc 
> >> encodes to data: but it seems reveal.js does not know how to handle it. 
> It 
> >> split the encoded data: in two url component.
> >>
> >> It seems like a change in reveal 4 as using the same slide.md file with 
> >> different version seems to break. 
> >>
> >> What I tried: 
> >>
> >> - Pandoc 2.9.2.1 : last one compatible with reveal.js 3 I believe
> >> 
> >> pandoc.exe -t revealjs --self-contained -o slide-self-contained.html 
> --metadata title="test" -V revealjs-url=https://unpkg.com/reveal.js@3/ 
> slide.md
> >> 
> >> Works as expected 
> >> - Pandoc 2.10: First to use reveal.js 4
> >> 
> >> pandoc.exe -t revealjs --self-contained -o slide-self-contained.html 
> --metadata title="test" -V revealjs-url=https://unpkg.com/reveal.js@4/ 
> slide.md
> >> 
> >> 
> >> So it seems that something broke when upgrading. 
> >>
> >> Is this a known issue ?
> >> Should I open an issue in Pandoc to track ? I believe this could be 
> >> something in reveal.js not handling correctly encoded data: field.
> >>
> >> MANUAL still says (
> >> https://pandoc.org/MANUAL.html#background-in-reveal.js-and-beamer)
> >>
> >> Background images can be added to self-contained reveal.js slideshows 
> and 
> >> to beamer slideshows.
> >>
> >> But maybe self-contained and revealjs does not work well. 
> >>
> >> Thank you
> >> ​
> >>
> >> -- 
> >> You received this message because you are subscribed to the Google 
> Groups "pandoc-discuss" group.
> >> To unsubscribe from this group and stop receiving emails from it, send 
> an email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> >> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/pandoc-discuss/80a3d759-3f29-44d8-9a43-5890dcf9b70en%40googlegroups.com
> .
>

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/f09ffb5b-eff9-451b-aeba-c45b1d456435n%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 7085 bytes --]

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

end of thread, other threads:[~2021-10-08  4:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-28  9:21 revealjs background and self contained not working anymore christophe dervieux
     [not found] ` <80a3d759-3f29-44d8-9a43-5890dcf9b70en-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-09-28 10:05   ` christophe dervieux
     [not found]     ` <34ae236d-5f4e-42be-8e18-68a5ce5b6f08n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-09-28 10:06       ` christophe dervieux
2021-09-28 16:04   ` John MacFarlane
     [not found]     ` <m21r581ybt.fsf-d8241O7hbXoP5tpWdHSM3tPlBySK3R6THiGdP5j34PU@public.gmane.org>
2021-09-28 17:05       ` John MacFarlane
     [not found]         ` <m2r1d8zl3o.fsf-d8241O7hbXoP5tpWdHSM3tPlBySK3R6THiGdP5j34PU@public.gmane.org>
2021-10-08  4:58           ` Pranesh Prakash

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 NNTP newsgroup(s).