git.iko.soy/typeable/pandoc
on master help sign in
reveal.js template: Fix PDF print function.

See pandoc issue #1220.

commit79806d4417d02646158dcbdcc3686255098c9e3f authorJohn MacFarlane <fiddlosopher@gmail.com> dateSat 5 Apr 2014, 15:23 (13 years ago) parent44723bc
1 file changed+13−4
default.revealjs+13−4
default.revealjs+13−4
@@ -27,10 +27,19 @@ $endfor$
2727$else$
2828 <link rel="stylesheet" href="$revealjs-url$/css/theme/simple.css" id="theme">
2929$endif$
30− <link rel="stylesheet" media="print" href="$revealjs-url$/css/print/pdf.css" />
31− <!--[if lt IE 9]>
32− <script src="$revealjs-url$/lib/js/html5shiv.js"></script>
33− <![endif]-->
30+ <!-- If the query includes 'print-pdf', include the PDF print sheet -->
31+ <script>
32+ if( window.location.search.match( /print-pdf/gi ) ) {
33+ var link = document.createElement( 'link' );
34+ link.rel = 'stylesheet';
35+ link.type = 'text/css';
36+ link.href = '$revealjs-url$/css/print/pdf.css';
37+ document.getElementsByTagName( 'head' )[0].appendChild( link );
38+ }
39+ </script>
40+ <!--[if lt IE 9]>
41+ <script src="$revealjs-url$/lib/js/html5shiv.js"></script>
42+ <![endif]-->
3443$if(math)$
3544 $math$
3645$endif$