* Problem with specific variables for Reveal.js
@ 2020-11-18 11:36 Pranesh Prakash
[not found] ` <7cfe8475-dffe-4526-a81f-916bfc77f687n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Pranesh Prakash @ 2020-11-18 11:36 UTC (permalink / raw)
To: pandoc-discuss
[-- Attachment #1.1: Type: text/plain, Size: 2881 bytes --]
Dear all,
I'm having one very specific issue when using Pandoc to create Reveal.js
slide shows. I believe the problem I see is with Reveal.js and not with
Pandoc. However, since I haven't received any feedback after noting this
on the Reveal.js Github issues page, I thought I'd try my luck here.
***
https://github.com/hakimel/reveal.js/issues/2813
I am using pandoc (v2.11.0.2) to generate reveal.js (v4.0) slides. I've
[created a file] which contains all the variables with the default values
so that I can change them if needed.
The command I'm using is:
`pandoc -d slides -t revealjs -o slides.html 2020-09-12-presentation.md
--verbose`
However pandoc doesn't produce a working slide deck unless I comment out
three specific variables:
1. `controlsLayout: bottom-right`
2. `controlsBackArrows: faded`
3. `display: block`
If I don't comment these three variables, then I just text saying "//
reveal.js plugins" in the HTML file.
Here's the [pandoc template] that reads the variables and uses it to
generate the slide deck.
The relevant lines:
https://github.com/jgm/pandoc/blob/2332a08f1e192de24f9ff425ed31f8dd20d1fa82/data/templates/default.revealjs#L94-L102
```
$if(controlsLayout)$
// Determines where controls appear, "edges" or "bottom-right"
controlsLayout: $controlsLayout$,
$endif$
$if(controlsBackArrows)$
// Visibility rule for backwards navigation arrows; "faded",
"hidden"
// or "visible"
controlsBackArrows: $controlsBackArrows$,
$endif$
```
and
https://github.com/jgm/pandoc/blob/2332a08f1e192de24f9ff425ed31f8dd20d1fa82/data/templates/default.revealjs#L318-L321
```
$if(display)$
// The display mode that will be used to show slides
display: $display$,
$endif$
```
I'm not sure if it's an issue with pandoc or with reveal.js, but I suspect
it's a reveal.js issue since all three of these variable seem to occur
together in one function:
```
/**
* Called when the reveal.js config is updated.
*/
configure( config, oldConfig ) {
this.element.style.display = config.controls ? 'block' : 'none';
this.element.setAttribute( 'data-controls-layout', config.controlsLayout );
this.element.setAttribute( 'data-controls-back-arrows', config.
controlsBackArrows );
}
```
[created a file]:
https://gist.github.com/the-solipsist/6abfb6416e8f6cbdf5f193db212e4c47
[pandoc template]:
https://github.com/jgm/pandoc/blob/master/data/templates/default.revealjs
--
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/7cfe8475-dffe-4526-a81f-916bfc77f687n%40googlegroups.com.
[-- Attachment #1.2: Type: text/html, Size: 5437 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Problem with specific variables for Reveal.js
[not found] ` <7cfe8475-dffe-4526-a81f-916bfc77f687n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2020-11-19 19:59 ` John MacFarlane
0 siblings, 0 replies; 2+ messages in thread
From: John MacFarlane @ 2020-11-19 19:59 UTC (permalink / raw)
To: Pranesh Prakash, pandoc-discuss
Thanks. I think I've fixed this in a commit I just pushed
to the default template.
Pranesh Prakash <the.solipsist-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
> Dear all,
> I'm having one very specific issue when using Pandoc to create Reveal.js
> slide shows. I believe the problem I see is with Reveal.js and not with
> Pandoc. However, since I haven't received any feedback after noting this
> on the Reveal.js Github issues page, I thought I'd try my luck here.
>
> ***
> https://github.com/hakimel/reveal.js/issues/2813
>
> I am using pandoc (v2.11.0.2) to generate reveal.js (v4.0) slides. I've
> [created a file] which contains all the variables with the default values
> so that I can change them if needed.
>
> The command I'm using is:
> `pandoc -d slides -t revealjs -o slides.html 2020-09-12-presentation.md
> --verbose`
>
> However pandoc doesn't produce a working slide deck unless I comment out
> three specific variables:
>
> 1. `controlsLayout: bottom-right`
> 2. `controlsBackArrows: faded`
> 3. `display: block`
>
> If I don't comment these three variables, then I just text saying "//
> reveal.js plugins" in the HTML file.
>
> Here's the [pandoc template] that reads the variables and uses it to
> generate the slide deck.
>
> The relevant lines:
> https://github.com/jgm/pandoc/blob/2332a08f1e192de24f9ff425ed31f8dd20d1fa82/data/templates/default.revealjs#L94-L102
>
> ```
> $if(controlsLayout)$
> // Determines where controls appear, "edges" or "bottom-right"
> controlsLayout: $controlsLayout$,
> $endif$
> $if(controlsBackArrows)$
> // Visibility rule for backwards navigation arrows; "faded",
> "hidden"
> // or "visible"
> controlsBackArrows: $controlsBackArrows$,
> $endif$
> ```
>
> and
> https://github.com/jgm/pandoc/blob/2332a08f1e192de24f9ff425ed31f8dd20d1fa82/data/templates/default.revealjs#L318-L321
>
> ```
> $if(display)$
> // The display mode that will be used to show slides
> display: $display$,
> $endif$
> ```
>
> I'm not sure if it's an issue with pandoc or with reveal.js, but I suspect
> it's a reveal.js issue since all three of these variable seem to occur
> together in one function:
>
> ```
> /**
> * Called when the reveal.js config is updated.
> */
> configure( config, oldConfig ) {
>
> this.element.style.display = config.controls ? 'block' : 'none';
>
> this.element.setAttribute( 'data-controls-layout', config.controlsLayout );
> this.element.setAttribute( 'data-controls-back-arrows', config.
> controlsBackArrows );
> }
> ```
>
> [created a file]:
> https://gist.github.com/the-solipsist/6abfb6416e8f6cbdf5f193db212e4c47
>
> [pandoc template]:
> https://github.com/jgm/pandoc/blob/master/data/templates/default.revealjs
>
> --
> 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/7cfe8475-dffe-4526-a81f-916bfc77f687n%40googlegroups.com.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-11-19 19:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-18 11:36 Problem with specific variables for Reveal.js Pranesh Prakash
[not found] ` <7cfe8475-dffe-4526-a81f-916bfc77f687n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-11-19 19:59 ` John MacFarlane
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).