forked from jcv8000/Codex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pdf.html
47 lines (41 loc) · 1.37 KB
/
pdf.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<head>
<link rel="stylesheet" href="node_modules/bootstrap/dist/css/bootstrap.css">
<link rel="stylesheet" href="css/prosemirror.css">
<link rel="stylesheet" href="node_modules/katex/dist/katex.min.css">
<link rel="stylesheet" href="node_modules/@benrbray/prosemirror-math/style/math.css">
<link rel="stylesheet" href="css/styles.css">
<link id="codeStyleLink" rel="stylesheet" href="node_modules/highlight.js/styles/atom-one-dark.css">
<style>
body {
tab-size: 4;
margin: 3em;
}
img {
max-width: 100%;
}
.codeSnippet {
page-break-inside:auto;
white-space: pre-wrap;
}
.codeSnippet.collapsed {
max-height: none;
box-shadow: none;
}
</style>
</head>
<body></body>
<script>
function enableBreaksOnH1() {
var style = document.createElement('style');
style.type='text/css';
if (style.styleSheet){
style.styleSheet.cssText='h1 { page-break-before: always; }';
} else {
style.appendChild(document.createTextNode('h1 { page-break-before: always; }'));
}
document.getElementsByTagName('head')[0].appendChild(style);
}
function fixNewLines() {
document.documentElement.innerHTML = document.documentElement.innerHTML.replace('CODEX_PRINT_NEWLINE_CHAR_DONT_EVER_TYPE_THIS', '\\n')
}
</script>