@@ -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$