git.iko.soy/typeable/pandoc
on master help sign in
reveal.js template: Fix PDF print function.
79806d4John MacFarlane
default.revealjs+13−4
@@ -27,10 +27,19 @@ $endfor$
27$else$
27$else$
28 <link rel="stylesheet" href="$revealjs-url$/css/theme/simple.css" id="theme">
28 <link rel="stylesheet" href="$revealjs-url$/css/theme/simple.css" id="theme">
29$endif$
29$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';
30− <link rel="stylesheet" media="print" href="$revealjs-url$/css/print/pdf.css" />
36+ link.href = '$revealjs-url$/css/print/pdf.css';
37+ document.getElementsByTagName( 'head' )[0].appendChild( link );
38+ }
39+ </script>
31− <!--[if lt IE 9]>
40+ <!--[if lt IE 9]>
32− <script src="$revealjs-url$/lib/js/html5shiv.js"></script>
41+ <script src="$revealjs-url$/lib/js/html5shiv.js"></script>
33− <![endif]-->
42+ <![endif]-->
34$if(math)$
43$if(math)$
35 $math$
44 $math$
36$endif$
45$endif$