Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reveal.js options: support for width, height #2859

Closed
jmarca opened this issue Apr 17, 2016 · 2 comments
Closed

reveal.js options: support for width, height #2859

jmarca opened this issue Apr 17, 2016 · 2 comments

Comments

@jmarca
Copy link

jmarca commented Apr 17, 2016

I searched the issues and didn't find anything related even in closed issues. Apologies in advance if I missed something.

pandoc 1.17.0.3

It appears the reveal.js options relating to presentation size (https://github.com/hakimel/reveal.js#presentation-size) are ignored by pandoc.

with the command line:

james@emma tmp$ pandoc -t revealjs -s habits.md -o habits.html --standalone -V transition=fade                 

I get

  <script>

      // Full list of configuration options available here:
      // https://github.com/hakimel/reveal.js#configuration
      Reveal.initialize({
        controls: true,
        progress: true,
        history: true,
        center: true,
        theme: Reveal.getQueryHash().theme, // available themes are in /css/theme
        transition: 'fade', // default/cube/page/concave/zoom/linear/fade/none
...

with the command line:

james@emma tmp$ pandoc -t revealjs -s habits.md -o habits_width_option.html --standalone -V transition=fade -V width=1269

I get:

  <script>

      // Full list of configuration options available here:
      // https://github.com/hakimel/reveal.js#configuration
      Reveal.initialize({
        controls: true,
        progress: true,
        history: true,
        center: true,
        theme: Reveal.getQueryHash().theme, // available themes are in /css/theme
        transition: 'fade', // default/cube/page/concave/zoom/linear/fade/none

...

I can hack a width and height setting with the following options abuse that reminds me of a SQL injection attack:

james@emma tmp$ pandoc -t revealjs -s habits.md -o habits_width_hacked.html --standalone -V transition="fade','width':'1269" 

Which gives:

  <script>

      // Full list of configuration options available here:
      // https://github.com/hakimel/reveal.js#configuration
      Reveal.initialize({
        controls: true,
        progress: true,
        history: true,
        center: true,
        theme: Reveal.getQueryHash().theme, // available themes are in /css/theme
        transition: 'fade','width':'1269', // default/cube/page/concave/zoom/linear/fade/none

...

which does the right thing (set the presentation width)

@adunning
Copy link
Contributor

I fixed this awhile back; it looks as if you're using an old copy of the template.

@jmarca
Copy link
Author

jmarca commented May 10, 2016

Well. That's embarrassing! I had forgotten that ~/.pandoc/templates was a symlink to my local copy of pandoc-templates repo, last updated in 2014.

Sorry about the noise.

@jmarca jmarca closed this as completed May 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants