Make the page look better

This commit is contained in:
Emily Eisenberg 2014-09-10 15:20:49 -07:00
parent eef846ce94
commit 4b2edea985
70 changed files with 3710 additions and 2 deletions

View File

@ -1,10 +1,41 @@
<!DOCTYPE html>
<html>
<head>
<title>Hello, world!</title>
<title>KaTeX - Fast online math rendering</title>
<script src="lib/katex/katex.min.js" type="text/javascript"></script>
<link href="lib/katex/katex.min.css" type="text/css" rel="stylesheet" />
<link href="lib/katex/fonts/fonts.css" type="text/css" rel="stylesheet" />
<script src="main.js" type="text/javascript"></script>
<link href="main.css" type="text/css" rel="stylesheet" />
</head>
<body>
Github pages testing.
<div id="main">
<h1 id="title"></h1>
What is KaTeX? <br>
KaTeX is a math typesetting library for the web.<br><br>
Advantages: <br>
<ul>
<li>Fast</li>
<li>Simple API</li>
<li>No dependencies</li>
<li>Supports all major browsers including IE 8 through IE 11</li>
</ul>
Interactive demo:<br>
<input id="demo-input" type="text" value="x=\dfrac{-b\pm\sqrt{b^2-4ac}}{2a}" /> <br>
<span id="demo"></span> <br><br>
Examples:<br>
<span id="example"></span> <br><br>
<a href="http://jsperf.com/katex-vs-mathjax">Performance comparison</a>
</div>
<script type="text/javascript">
startup();
</script>
</body>
</html>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

239
lib/katex/fonts/fonts.css Normal file
View File

@ -0,0 +1,239 @@
@font-face {
font-family: 'KaTeX_AMS';
src: url('KaTeX_AMS-Regular.eot');
src: url('KaTeX_AMS-Regular.eot?#iefix') format('embedded-opentype'),
url('KaTeX_AMS-Regular.woff') format('woff'),
url('KaTeX_AMS-Regular.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'KaTeX_Caligraphic';
src: url('KaTeX_Caligraphic-Bold.eot');
src: url('KaTeX_Caligraphic-Bold.eot?#iefix') format('embedded-opentype'),
url('KaTeX_Caligraphic-Bold.woff') format('woff'),
url('KaTeX_Caligraphic-Bold.ttf') format('truetype');
font-weight: bold;
font-style: normal;
}
@font-face {
font-family: 'KaTeX_Caligraphic';
src: url('KaTeX_Caligraphic-Regular.eot');
src: url('KaTeX_Caligraphic-Regular.eot?#iefix') format('embedded-opentype'),
url('KaTeX_Caligraphic-Regular.woff') format('woff'),
url('KaTeX_Caligraphic-Regular.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'KaTeX_Fraktur';
src: url('KaTeX_Fraktur-Bold.eot');
src: url('KaTeX_Fraktur-Bold.eot?#iefix') format('embedded-opentype'),
url('KaTeX_Fraktur-Bold.woff') format('woff'),
url('KaTeX_Fraktur-Bold.ttf') format('truetype');
font-weight: bold;
font-style: normal;
}
@font-face {
font-family: 'KaTeX_Fraktur';
src: url('KaTeX_Fraktur-Regular.eot');
src: url('KaTeX_Fraktur-Regular.eot?#iefix') format('embedded-opentype'),
url('KaTeX_Fraktur-Regular.woff') format('woff'),
url('KaTeX_Fraktur-Regular.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'KaTeX_Greek';
src: url('KaTeX_Greek-Bold.eot');
src: url('KaTeX_Greek-Bold.eot?#iefix') format('embedded-opentype'),
url('KaTeX_Greek-Bold.woff') format('woff'),
url('KaTeX_Greek-Bold.ttf') format('truetype');
font-weight: bold;
font-style: normal;
}
@font-face {
font-family: 'KaTeX_Greek';
src: url('KaTeX_Greek-BoldItalic.eot');
src: url('KaTeX_Greek-BoldItalic.eot?#iefix') format('embedded-opentype'),
url('KaTeX_Greek-BoldItalic.woff') format('woff'),
url('KaTeX_Greek-BoldItalic.ttf') format('truetype');
font-weight: bold;
font-style: italic;
}
@font-face {
font-family: 'KaTeX_Greek';
src: url('KaTeX_Greek-Italic.eot');
src: url('KaTeX_Greek-Italic.eot?#iefix') format('embedded-opentype'),
url('KaTeX_Greek-Italic.woff') format('woff'),
url('KaTeX_Greek-Italic.ttf') format('truetype');
font-weight: normal;
font-style: italic;
}
@font-face {
font-family: 'KaTeX_Greek';
src: url('KaTeX_Greek-Regular.eot');
src: url('KaTeX_Greek-Regular.eot?#iefix') format('embedded-opentype'),
url('KaTeX_Greek-Regular.woff') format('woff'),
url('KaTeX_Greek-Regular.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'KaTeX_Main';
src: url('KaTeX_Main-Bold.eot');
src: url('KaTeX_Main-Bold.eot?#iefix') format('embedded-opentype'),
url('KaTeX_Main-Bold.woff') format('woff'),
url('KaTeX_Main-Bold.ttf') format('truetype');
font-weight: bold;
font-style: normal;
}
@font-face {
font-family: 'KaTeX_Main';
src: url('KaTeX_Main-Italic.eot');
src: url('KaTeX_Main-Italic.eot?#iefix') format('embedded-opentype'),
url('KaTeX_Main-Italic.woff') format('woff'),
url('KaTeX_Main-Italic.ttf') format('truetype');
font-weight: normal;
font-style: italic;
}
@font-face {
font-family: 'KaTeX_Main';
src: url('KaTeX_Main-Regular.eot');
src: url('KaTeX_Main-Regular.eot?#iefix') format('embedded-opentype'),
url('KaTeX_Main-Regular.woff') format('woff'),
url('KaTeX_Main-Regular.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'KaTeX_Math';
src: url('KaTeX_Math-BoldItalic.eot');
src: url('KaTeX_Math-BoldItalic.eot?#iefix') format('embedded-opentype'),
url('KaTeX_Math-BoldItalic.woff') format('woff'),
url('KaTeX_Math-BoldItalic.ttf') format('truetype');
font-weight: bold;
font-style: italic;
}
@font-face {
font-family: 'KaTeX_Math';
src: url('KaTeX_Math-Italic.eot');
src: url('KaTeX_Math-Italic.eot?#iefix') format('embedded-opentype'),
url('KaTeX_Math-Italic.woff') format('woff'),
url('KaTeX_Math-Italic.ttf') format('truetype');
font-weight: normal;
font-style: italic;
}
@font-face {
font-family: 'KaTeX_Math';
src: url('KaTeX_Math-Regular.eot');
src: url('KaTeX_Math-Regular.eot?#iefix') format('embedded-opentype'),
url('KaTeX_Math-Regular.woff') format('woff'),
url('KaTeX_Math-Regular.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'KaTeX_SansSerif';
src: url('KaTeX_SansSerif-Bold.eot');
src: url('KaTeX_SansSerif-Bold.eot?#iefix') format('embedded-opentype'),
url('KaTeX_SansSerif-Bold.woff') format('woff'),
url('KaTeX_SansSerif-Bold.ttf') format('truetype');
font-weight: bold;
font-style: normal;
}
@font-face {
font-family: 'KaTeX_SansSerif';
src: url('KaTeX_SansSerif-Italic.eot');
src: url('KaTeX_SansSerif-Italic.eot?#iefix') format('embedded-opentype'),
url('KaTeX_SansSerif-Italic.woff') format('woff'),
url('KaTeX_SansSerif-Italic.ttf') format('truetype');
font-weight: normal;
font-style: italic;
}
@font-face {
font-family: 'KaTeX_SansSerif';
src: url('KaTeX_SansSerif-Regular.eot');
src: url('KaTeX_SansSerif-Regular.eot?#iefix') format('embedded-opentype'),
url('KaTeX_SansSerif-Regular.woff') format('woff'),
url('KaTeX_SansSerif-Regular.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'KaTeX_Script';
src: url('KaTeX_Script-Regular.eot');
src: url('KaTeX_Script-Regular.eot?#iefix') format('embedded-opentype'),
url('KaTeX_Script-Regular.woff') format('woff'),
url('KaTeX_Script-Regular.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'KaTeX_Size1';
src: url('KaTeX_Size1-Regular.eot');
src: url('KaTeX_Size1-Regular.eot?#iefix') format('embedded-opentype'),
url('KaTeX_Size1-Regular.woff') format('woff'),
url('KaTeX_Size1-Regular.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'KaTeX_Size2';
src: url('KaTeX_Size2-Regular.eot');
src: url('KaTeX_Size2-Regular.eot?#iefix') format('embedded-opentype'),
url('KaTeX_Size2-Regular.woff') format('woff'),
url('KaTeX_Size2-Regular.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'KaTeX_Size3';
src: url('KaTeX_Size3-Regular.eot');
src: url('KaTeX_Size3-Regular.eot?#iefix') format('embedded-opentype'),
url('KaTeX_Size3-Regular.woff') format('woff'),
url('KaTeX_Size3-Regular.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'KaTeX_Size4';
src: url('KaTeX_Size4-Regular.eot');
src: url('KaTeX_Size4-Regular.eot?#iefix') format('embedded-opentype'),
url('KaTeX_Size4-Regular.woff') format('woff'),
url('KaTeX_Size4-Regular.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'KaTeX_Typewriter';
src: url('KaTeX_Typewriter-Regular.eot');
src: url('KaTeX_Typewriter-Regular.eot?#iefix') format('embedded-opentype'),
url('KaTeX_Typewriter-Regular.woff') format('woff'),
url('KaTeX_Typewriter-Regular.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}

1
lib/katex/katex.min.css vendored Normal file

File diff suppressed because one or more lines are too long

3403
lib/katex/katex.min.js vendored Normal file

File diff suppressed because one or more lines are too long

14
main.css Normal file
View File

@ -0,0 +1,14 @@
body {
font-size: 20px;
}
#main {
margin-left: auto;
margin-right: auto;
min-width: 300px;
max-width: 600px;
}
#example {
font-size: 30px;
}

20
main.js Normal file
View File

@ -0,0 +1,20 @@
window.startup = function() {
var title = document.getElementById("title");
katex.process("\\KaTeX", title);
var example = document.getElementById("example");
katex.process("\\frac{1}{\\Bigl(\\sqrt{\\phi \\sqrt{5}}-\\phi\\Bigr) e^{\\frac25 \\pi}} = 1+\\frac{e^{-2\\pi}} {1+\\frac{e^{-4\\pi}} {1+\\frac{e^{-6\\pi}} {1+\\frac{e^{-8\\pi}} {1+...} } } }", example);
var demoInput = document.getElementById("demo-input");
var demoOutput = document.getElementById("demo");
function doDemo() {
katex.process(demoInput.value, demoOutput);
}
demoInput.addEventListener("input", function() {
doDemo();
});
doDemo();
};