PDF export (part 2)

This commit is contained in:
OpenShift guest 2013-09-23 18:00:56 -04:00
parent 0c5c2bac35
commit f913a1dee0
2 changed files with 22 additions and 22 deletions

View File

@ -29,28 +29,23 @@ define([
'</html>' '</html>'
].join(""), ].join(""),
pdfTemplate: [ pdfTemplate: [
'<!DOCTYPE html>\n', '<!DOCTYPE html>\n',
'<html>\n', '<html>\n',
'<head>\n', '<head>\n',
'<meta charset="utf-8">\n', '<meta charset="utf-8">\n',
'<title><%= documentTitle %></title>\n', '<title><%= documentTitle %></title>\n',
'<link rel="stylesheet" href="', '<link rel="stylesheet" href="',
MAIN_URL, MAIN_URL,
'res-min/themes/default.css" />\n', 'res-min/themes/default.css" />\n',
'<style type="text/css">\n', '<script type="text/x-mathjax-config">\n',
"@font-face {font-family: MathJax_Main; src: url('", MAIN_URL, "lib/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Main-Regular.woff') format('woff'), url('http://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/otf/MathJax_Main-Regular.otf') format('opentype')}\n", 'MathJax.Hub.Config({ messageStyle: "none" });\n',
"@font-face {font-family: MathJax_Main; src: url('", MAIN_URL, "lib/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Main-Bold.woff') format('woff'), url('http://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/otf/MathJax_Main-Bold.otf') format('opentype'); font-weight: bold}\n", '</script>\n',
"@font-face {font-family: MathJax_Main; src: url('", MAIN_URL, "lib/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Main-Italic.woff') format('woff'), url('http://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/otf/MathJax_Main-Italic.otf') format('opentype'); font-style: italic}\n", '<script type="text/javascript" src="',
"@font-face {font-family: MathJax_Math; src: url('", MAIN_URL, "lib/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Math-Italic.woff') format('woff'), url('http://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/otf/MathJax_Math-Italic.otf') format('opentype'); font-style: italic}\n", MAIN_URL,
"@font-face {font-family: MathJax_Caligraphic; src: url('", MAIN_URL, "lib/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Caligraphic-Regular.woff') format('woff'), url('http://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/otf/MathJax_Caligraphic-Regular.otf') format('opentype')}\n", 'lib/MathJax/MathJax.js?config=TeX-AMS_HTML"></script>\n',
"@font-face {font-family: MathJax_Size1; src: url('", MAIN_URL, "lib/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Size1-Regular.woff') format('woff'), url('http://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/otf/MathJax_Size1-Regular.otf') format('opentype')}\n", '</head>\n',
"@font-face {font-family: MathJax_Size2; src: url('", MAIN_URL, "lib/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Size2-Regular.woff') format('woff'), url('http://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/otf/MathJax_Size2-Regular.otf') format('opentype')}\n", '<body class="pdf"><%= documentHTML %></body>\n',
"@font-face {font-family: MathJax_Size3; src: url('", MAIN_URL, "lib/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Size3-Regular.woff') format('woff'), url('http://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/otf/MathJax_Size3-Regular.otf') format('opentype')}\n", '</html>'
"@font-face {font-family: MathJax_Size4; src: url('", MAIN_URL, "lib/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Size4-Regular.woff') format('woff'), url('http://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/otf/MathJax_Size4-Regular.otf') format('opentype')}\n",
'</style>\n',
'</head>\n',
'<body class="pdf"><%= documentHTML %></body>\n',
'</html>'
].join(""), ].join(""),
sshProxy: SSH_PROXY_URL, sshProxy: SSH_PROXY_URL,
extensionSettings: {} extensionSettings: {}

View File

@ -1248,5 +1248,10 @@ div.jGrowl {
* PDF * PDF
*******************/ *******************/
body.pdf { body.pdf {
font-family: "DejaVu Sans";
background-color: transparent; background-color: transparent;
& code, & pre {
font-family: "DejaVu Sans Mono";
}
} }