reveal.js template: Fix PDF print function.

See pandoc issue #1220.
This commit is contained in:
John MacFarlane 2014-04-05 15:23:36 -07:00
parent 44723bcc95
commit 79806d4417

View file

@ -27,7 +27,16 @@ $endfor$
$else$ $else$
<link rel="stylesheet" href="$revealjs-url$/css/theme/simple.css" id="theme"> <link rel="stylesheet" href="$revealjs-url$/css/theme/simple.css" id="theme">
$endif$ $endif$
<link rel="stylesheet" media="print" href="$revealjs-url$/css/print/pdf.css" /> <!-- If the query includes 'print-pdf', include the PDF print sheet -->
<script>
if( window.location.search.match( /print-pdf/gi ) ) {
var link = document.createElement( 'link' );
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = '$revealjs-url$/css/print/pdf.css';
document.getElementsByTagName( 'head' )[0].appendChild( link );
}
</script>
<!--[if lt IE 9]> <!--[if lt IE 9]>
<script src="$revealjs-url$/lib/js/html5shiv.js"></script> <script src="$revealjs-url$/lib/js/html5shiv.js"></script>
<![endif]--> <![endif]-->