aboutsummaryrefslogtreecommitdiff
path: root/tests/s5.fancy.html
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-11-03 22:14:03 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-11-03 22:14:03 +0000
commit4a841bfc5464907adea4cdd655485565565b40ae (patch)
tree36c0a21e3639614c8d25b5fb1909c32d0ab11dcd /tests/s5.fancy.html
parent3116d30133196e1bb258f7e74e03d4a85f3b21ae (diff)
downloadpandoc-4a841bfc5464907adea4cdd655485565565b40ae.tar.gz
Use template haskell to avoid the need for templates:
+ Added library Text.Pandoc.Include, with a template haskell function $(includeStrFrom fname) to include a file as a string constant at compile time. + This removes the need for the 'templates' directory or Makefile target. These have been removed. + The base source directory has been changed from src to . + A new 'data' directory has been added, containing the ASCIIMathML.js script, writer headers, and S5 files. + The src/wrappers directory has been moved to 'wrappers'. + The Text.Pandoc.ASCIIMathML library is no longer needed, since Text.Pandoc.Writers.HTML can use includeStrFrom to include the ASCIIMathML.js code directly. It has been removed. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1063 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'tests/s5.fancy.html')
-rw-r--r--tests/s5.fancy.html57
1 files changed, 46 insertions, 11 deletions
diff --git a/tests/s5.fancy.html b/tests/s5.fancy.html
index 5e6e1b243..e6030502d 100644
--- a/tests/s5.fancy.html
+++ b/tests/s5.fancy.html
@@ -8,9 +8,38 @@
/><meta name="author" content="Sam Smith"
/><meta name="author" content="Jen Jones"
/><meta name="date" content="July 15, 2006"
- /><script type="text/javascript">
-/* ASCIIMathML.js - copyright Peter Jipsen, released under the GPL
-See http://www1.chapman.edu/~jipsen/mathml/asciimath.html/ */
+ /><script type="text/javascript"
+ >/*
+ASCIIMathML.js
+==============
+This file contains JavaScript functions to convert ASCII math notation
+to Presentation MathML. The conversion is done while the (X)HTML page
+loads, and should work with Firefox/Mozilla/Netscape 7+ and Internet
+Explorer 6+MathPlayer (http://www.dessci.com/en/products/mathplayer/).
+Just add the next line to your (X)HTML page with this file in the same folder:
+<script type="text/javascript" src="ASCIIMathML.js"></script>
+This is a convenient and inexpensive solution for authoring MathML.
+
+Version 1.4.7 Dec 15, 2005, (c) Peter Jipsen http://www.chapman.edu/~jipsen
+Latest version at http://www.chapman.edu/~jipsen/mathml/ASCIIMathML.js
+For changes see http://www.chapman.edu/~jipsen/mathml/asciimathchanges.txt
+If you use it on a webpage, please send the URL to jipsen@chapman.edu
+
+Modified July 2006 by John MacFarlane (added CODE to list of contexts
+in which replacement does not occur, modified AMisMathMLAvailable
+to better identify Safari browser, changed mathcolor to "").
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or (at
+your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License (at http://www.gnu.org/copyleft/gpl.html)
+for more details.
+*/
var checkForMathML = true; // check if browser can display MathML
var notifyIfNoMathML = true; // display note if no MathML capability
@@ -59,8 +88,7 @@ function AMnoMathMLNote() {
}
function AMisMathMLavailable() {
- var regex = /KHTML/; /* ASCIIMathML.js - copyright Peter Jipsen, released under the GPL
-See http://www1.chapman.edu/~jipsen/mathml/asciimath.html/ */
+ var regex = /KHTML/; /* This line and the next two modified by JM for better Safari detection */
if (navigator.appName.slice(0,8)=="Netscape")
if (navigator.appVersion.slice(0,1)>="5" && !regex.test(navigator.userAgent)) return null;
else return AMnoMathMLNote();
@@ -443,8 +471,16 @@ function AMremoveBrackets(node) {
}
}
-/* ASCIIMathML.js - copyright Peter Jipsen, released under the GPL
-See http://www1.chapman.edu/~jipsen/mathml/asciimath.html/ */
+/*Parsing ASCII math expressions with the following grammar
+v ::= [A-Za-z] | greek letters | numbers | other constant symbols
+u ::= sqrt | text | bb | other unary symbols for font commands
+b ::= frac | root | stackrel binary symbols
+l ::= ( | [ | { | (: | {: left brackets
+r ::= ) | ] | } | :) | :} right brackets
+S ::= v | lEr | uS | bSS Simple expression
+I ::= S_S | S^S | S_S^S | S Intermediate expression
+E ::= IE | I/I Expression
+Each terminal symbol is translated into a corresponding mathml node.*/
var AMnestingDepth,AMpreviousSymbol,AMcurrentSymbol;
@@ -783,8 +819,7 @@ function AMprocessNodeR(n, linebreaks) {
if ((n.nodeType!=8 || linebreaks) &&
n.parentNode.nodeName!="form" && n.parentNode.nodeName!="FORM" &&
n.parentNode.nodeName!="textarea" && n.parentNode.nodeName!="TEXTAREA" &&
- n.parentNode.nodeName!="code" && n.parentNode.nodeName!="CODE" && /* ASCIIMathML.js - copyright Peter Jipsen, released under the GPL
-See http://www1.chapman.edu/~jipsen/mathml/asciimath.html/ */
+ n.parentNode.nodeName!="code" && n.parentNode.nodeName!="CODE" && /* added by JM */
n.parentNode.nodeName!="pre" && n.parentNode.nodeName!="PRE") {
str = n.nodeValue;
if (!(str == null)) {
@@ -919,8 +954,8 @@ else
window.onload = generic;
}
}
-</script>
-<!-- configuration parameters -->
+</script
+ ><!-- configuration parameters -->
<meta name="defaultView" content="slideshow" />
<meta name="controlVis" content="hidden" />
<style type="text/css" media="projection" id="slideProj">