diff --git a/source/distro/changelog.txt b/source/distro/changelog.txt
index 514bce3..7c2c577 100644
--- a/source/distro/changelog.txt
+++ b/source/distro/changelog.txt
@@ -2,6 +2,10 @@ Changelog for Writer2LaTeX version 1.2 -> 1.4
---------- version 1.3.1 alpha ----------
+[w2x] Support for the obsolete output format XHTML+MahtML+XSL has been removed (replaced by MathJax). As a consequence
+ the option xslt_path has been removed. Also the vacant spot in the export dialog is now used for the option use_mathjax
+ (only active for XHTML+MathML and HTML5)
+
[w2l] Added support for TexMaths equations in LaTeX, XHTML+MathML and HTML5 (the last two only if use_mathjax=true)
[all] The command line application now gives an explanation if the source file is not in ODF format
diff --git a/source/distro/doc/user-manual.odt b/source/distro/doc/user-manual.odt
index 8ac406f..b27f34b 100644
Binary files a/source/distro/doc/user-manual.odt and b/source/distro/doc/user-manual.odt differ
diff --git a/source/distro/xslt/pmathml.xsl b/source/distro/xslt/pmathml.xsl
deleted file mode 100644
index 97012f1..0000000
--- a/source/distro/xslt/pmathml.xsl
+++ /dev/null
@@ -1,612 +0,0 @@
-
-
-
-
-
-
-
-
-
- '<!--'
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-in mpdialog mode, we just write out some JavaScript to display
-dialog to the reader asking whether they want to install MathPlayer
-Depending on the response we get, we then instantiate an XSL processor
-and reprocess the doc, passing $secondpass according to the
-reader response.
-
-Using d-o-e is fairly horrible, but this code is only for IE
-anyway, and we need to force HTML semantics in this case.
-
-
-var cookieName = "MathPlayerInstall=";
-function MPInstall(){
- var showDialog=true;
- var c = document.cookie;
- var i = c.indexOf(cookieName);
- if (i >= 0) {
- if ( c.substr(i + cookieName.length, 1) >= 2) { showDialog=false; }
- }
- if (showDialog) {
- MPDialog();
- c = document.cookie;
- i = c.indexOf(cookieName);
- }
- if (i >= 0) return c.substr(i + cookieName.length, 1);
- else return null;
-}
-
-function MPDialog() {
- var vArgs="";
- var sFeatures="dialogWidth:410px;dialogHeight:190px;help:off;status:no";
- var text = "";
- text += "javascript:document.write('"
- text += '<script>'
- text += 'function fnClose(v) { '
- text += 'var exp = new Date();'
- text += 'var thirtyDays = exp.getTime() + (30 * 24 * 60 * 60 * 1000);'
- text += 'exp.setTime(thirtyDays);'
- text += 'var cookieProps = ";expires=" + exp.toGMTString();'
- text += 'if (document.forms[0].dontask.checked) v+=2;'
- text += 'document.cookie="' + cookieName + '"+v+cookieProps;'
- text += 'window.close();'
- text += '}'
- text += '</' + 'script>'
- text += '<head><title>Install MathPlayer?</title></head>'
- text += '<body bgcolor="#D4D0C8"><form>'
- text += '<table cellpadding=10 style="font-family:Arial;font-size:10pt" border=0 width=100%>'
- text += '<tr><td align=left>This page requires Design Science\\\'s MathPlayer™.<br>'
- text += 'Do you want to download and install MathPlayer?</td></tr>';
- text += '<tr><td align=center><input type="checkbox" name="dontask">'
- text += 'Don\\\'t ask me again</td></tr>'
- text += '<tr><td align=center><input id=yes type="button" value=" Yes "'
- text += ' onClick="fnClose(1)"> '
- text += '<input type="button" value=" No " onClick="fnClose(0)"></td></tr>'
- text += '</table></form>';
- text += '</body>'
- text += "')"
- window.showModalDialog( text , vArgs, sFeatures );
-}
-
-function WaitDialog() {
- var vArgs="";
- var sFeatures="dialogWidth:510px;dialogHeight:150px;help:off;status:no";
- var text = "";
- text += "javascript:document.write('"
- text += '<script>'
- text += 'window.onload=fnLoad;'
- text += 'function fnLoad() {document.forms[0].yes.focus();}'
- text += 'function fnClose(v) { '
- text += 'window.returnValue=v;'
- text += 'window.close();'
- text += '}'
- text += '</' + 'script>'
- text += '<head><title>Wait for Installation?</title></head>'
- text += '<body bgcolor="#D4D0C8" onload="fnLoad()"><form><'
- text += 'table cellpadding=10 style="font-family:Arial;font-size:10pt" border=0 width=100%>'
- text += '<tr><td align=left>Click OK once MathPlayer is installed '
- text += 'to refresh the page.<br>'
- text += 'Click Cancel to view the page immediately without MathPlayer.</td></tr>';
- text += '<tr><td align=center><input id=yes type="button" '
- text += 'value=" OK " onClick="fnClose(1)"> '
- text += '<input type="button" value="Cancel" onClick="fnClose(0)"></td></tr>'
- text += '</table></form>';
- text += '</body>'
- text += "')"
- return window.showModalDialog( text , vArgs, sFeatures );
-}
-
-var result = MPInstall();
-
-var action = "fallthrough";
-if (result == 1 || result == 3) {
- window.open("http://www.dessci.com/webmath/mathplayer");
- var wait = WaitDialog();
- if ( wait == 1) {
- action = "install";
- document.location.reload();
-
- }
-}
-if (action == "fallthrough") {
-var xsl = new ActiveXObject("Microsoft.FreeThreadedXMLDOM");
-xsl.async = false;
-xsl.validateOnParse = false;
-xsl.load("pmathmlcss.xsl");
-var xslTemplate = new ActiveXObject("MSXML2.XSLTemplate.3.0");
-xslTemplate.stylesheet=xsl.documentElement;
-var xslProc = xslTemplate.createProcessor();
-xslProc.input = document.XMLDocument;
-
-xslProc.transform();
-var str = xslProc.output;
-
-var repl = "replace";
-if (window.navigator.appVersion.match(/Windows NT 5.1/)) { repl = ""; }
-var newDoc = document.open("text/html", repl);
-newDoc.write(str);
-document.close();
-}
-
-
-mathplayer-dl
-
-techexplorer-plugin
-
-
-
-
-
-
-
- techexplorer-plugin
-
-
-
-
- mathplayer-dl
-
-
-
-
-
-
-
-
-
-
-
-
-IE5 hacks
-This code will be ignored by an XSLT engine as a top level
-element in a foreign namespace. It will be executed by an IE5XSL
-engine and insert <!-- into the output stream, ie the start of a
-comment. This will comment out all the XSLT code which will be copied
-to the output. A similar clause below will close this comment, it is
-then followed by the IE5XSL templates to be executed.
-This trick is due to Jonathan Marsh of Microsoft, and used in
-the stylesheet for
-the XPath 2 data model draft.
-
-
-XSLT stylesheet
-MSXSL script block
-
-The following script block implements an extension function that
-tests whether a specified ActiveX component is known to the client.
-This is used below to test for the existence of MathML rendering
-components.
-
- function isinstalled(ax)
- {
- try {
- var ActiveX = new ActiveXObject(ax);
- return "true";
- } catch (e) {
- return "false";
- }
-}
-
-
-The main bulk of this stylesheet is an identity transformation so...
-
-
-
-
-
-
-
-
-
-XHTML elements are copied sans prefix (XHTML is default namespace
-here, so these elements will still be in XHTML namespace
-
-
-
-
-
-
-
-IE's treatment of XHTML as HTML needs a little help here...
-
-
-
-
-
- >
-
-
-
-
-
-
-
-
-
-
-This just ensures the mathml prefix declaration isn't copied from
-the source at this stage, so that the system will use the mml prefix
-coming from this stylesheet
-
-
-
-
-
-
-
-We modify the head element to add code to specify a Microsoft
-"Behaviour" if the behaviour component is known to the system.
-Test for MathPlayer (Design Science)
-Test for Techexplorer (IBM)
-Test for Microsoft. In this case we just
-output a small HTML file that executes a script that will re-process
-the source docuument with a different stylesheet. Doing things this
-way avoids the need to xsl:import the second stylesheet, which would
-very much increase the processing overhead of running this
-stylesheet.
-Further tests (eg for netscape/mozilla) could
-be added here if necessary
-
-
-
-
-
-
-
-
- namespace="mml" implementation="#mmlFactory"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Somewhat bizarrely in an otherwise namespace aware system,
-Microsoft behaviours are defined to trigger off the
-prefix not the Namespace. In the code above
-we associated a MathML rendering behaviour (if one was found) with the
-prefix mml: so here we ensure that this is the prefix
-that actually gets used in the output.
-
-
-
-
-
-
-
-Copy semantics element through in IE (so mathplayer gets to see
-mathplayer annotations, otherwise use first child or a presentation annotation.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- >
-
-
-
-
-
-
-
-
- />
-
-
-
-
-
- "
-
-
-
-
-
- "
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-IE5XSL stylesheet
-In a rare fit of sympathy for users of
-the-language-known-as-XSL-in-IE5 this file incorporates a
-version of the above code designed to work in the Microsoft dialect.
-This is needed otherwise users of a MathML rendering behaviour would
-have to make a choice whether they wanted to use this stylesheet
-(keeping their source documents conforming XHTML+MathML) or to use
-the explicit Microsoft Object code, which is less portable, but would
-work in at least IE5.5.
-
-This entire section of code, down to the end of the stylesheet is
-contained within this ie5:if. Thus XSLT sees it as a top level element
-from a foreign namespace and silently ignores it. IE5XSL sees it as
-"if true" and so executes the code.
-
-
-First close the comment started at the beginning. This ensures
-that the bulk of the XSLT code, while being copied to the result tree
-by the IE5XSL engine, will not be rendered in the browser.
-
-Lacking attribute value templates in
-xsl:element, and the local-name() function, we resort to constructing
-the start and end tags in strings in javascript, then using
-no-entities attribute which is the IE5XSL equivalent of disable-output-encoding
-
-
-'-->'
-
-
-
-
-
- function mpisinstalled()
- {
- try {
- var ActiveX = new ActiveXObject("MathPlayer.Factory.1");
- return "true";
- } catch (e) {
- return "false";
- }
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-'<mml:' + this.nodeName.substring(this.nodeName.indexOf(":")+1)
-
-' ' + this.nodeName=""
-
-'>'
-
-'</mml:' + this.nodeName.substring(this.nodeName.indexOf(":")+1) + '>'
-
-
-
-
-
-
-
-
-'<mml:' + this.nodeName.substring(this.nodeName.indexOf(":")+1)
-
-' ' + this.nodeName=""
-
-'>'
-
-'</mml:' + this.nodeName.substring(this.nodeName.indexOf(":")+1) + '>'
-
-
-
-
-
-
-
-
-
- namespace="mml" implementation="#mmlFactory"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/source/distro/xslt/pmathmlcss.xsl b/source/distro/xslt/pmathmlcss.xsl
deleted file mode 100644
index 27e518e..0000000
--- a/source/distro/xslt/pmathmlcss.xsl
+++ /dev/null
@@ -1,872 +0,0 @@
-
-
-
-
-
-
-
-Dictionary
-
- The following elements in the x: namespace form an
-implementation of an "Operator Dictionary" for this MathML
-Implementation. In the case of stretch operators, the element
-specifies the symbol parts via the latin-1 equivalent character based
-on the encoding in the symbol font. It is a clear "failure to comply
-to the spec" that using latin 1 characters (or numeric character
-references) in the latin 1 range access glyphs in teh symbol font via
-font position, however most of these character parts are not in
-Unicode (until 3.2), so there is no standard way to access these characters.
-
-{
-{
-
-(
-)
-
-[
-]
-
-[[
-]]
-
-|
-||
-
-
-
-−
-−~
-_v_
-
-
-Remove these for now, as XML parser in IE6 is broken and doesn't
-accept plane 1 characters.
-
-
-Grab all of the above into a variable.
-
-
-HTML elements
-
-
-XHTML elements get passed straight through, sans namespace prefix.
-
-
-
-
-
-
-
-
-
-
-
-
-Template for the head element copies the original content, aand in
-addition adds a script element and CSS style element that implement
-the core of the MathML renderer.
-
-
-
-The malign function first finds the left most item in the aligngroup, and
-then modifies the left margin of each item to make them
-align. (Currently only left alignment is supported.)
-
-
-
-The mrowStretch function implements stretchy brackets. It is called
-repeatedly, once for each mo child,after a span corresponding to an
-mrow. The arguments are the id of teh span and the characters to use
-for the parts of the stretch operator.
-constructed fence. The
-
-
-
-Inline CSS style block handles all font and size specification for the
-various MathML operators.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Unimplemented MathML elements get copied literally, in red, mainly as
-a debugging aid.
-
-
-<>
-
-</>
-
-
-
-mi: set default font based on string length, otherwise behaviour based
-on entries in the operator dictionary if one exists, or content is
-copied through to the output unchanged.
-
-
-
-
-mi1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Handling of mathvariant attribute.
-The choice of font families here (currently) avoids math-specific
-fonts but does use several fionts coming with windows 9.x and/or
-office 2000.
-
-
-font-weight: bold; font-style: upright
-
-
-font-style: upright; font-weight: bold; font-style: italic;
-
-
-font-style: italic;
-
-
-font-family: monospace;
-
-
-
-font-family: sans-serif;
-
-
-font-family: sans-serif; font-weight: bold;
-
-
-
-font-family: old english text mt
-
-
-
-
-doublestruck
-
-
-
-
-font-family: brush script mt italic
-
-
-
-
-mo: Generate a unique ID so that a script at the end of any
-surrounding mrow may replace the conent by a suitably stretched
-operator if need be.
-
-
-
-
-
-
-mn: a simple span
-
-
-
-
-
-
-munder: currently only supports underline, with a bottom border
-
-
-
- border-width: 0pt 0pt .1em 0pt; border-style: solid;"
-
-
-
-
-
-mover: currently only supports overline, with a top border
-
-
-
- border-width: .1em 0pt 0pt 0pt; border-style: solid;"
-
-
-
-
-
-munderover:
-
-
-
-
-
-
-
-
-mtext: a simple span
-
-
-
-
-
-
-mstyle: not many attributes currently supported
-
-
-
- color: ;
- background-color: ;
-
-
-
-
-
-
-mglyph: Uses disable output escaping to construct a numeric
-character reference. Uses IE's non conforming behaviour of using this
-number to access the font encoding rather than unicode.
-
-
-;
-
-
-
-ms: a simple span with left and right character added to the content.
-
-
- "
-
- "
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- (
-
-
-
-
-
- )
-
-
-
-
-
-
-
-
-
- ,
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-left
-
-
-
-
-
-
-
diff --git a/source/java/org/openoffice/da/comp/writer2xhtml/W2XRegistration.java b/source/java/org/openoffice/da/comp/writer2xhtml/W2XRegistration.java
index 58603bb..fa7c850 100644
--- a/source/java/org/openoffice/da/comp/writer2xhtml/W2XRegistration.java
+++ b/source/java/org/openoffice/da/comp/writer2xhtml/W2XRegistration.java
@@ -16,11 +16,11 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
- * Copyright: 2002-2011 by Henrik Just
+ * Copyright: 2002-2014 by Henrik Just
*
* All Rights Reserved.
*
- * Version 1.2 (2011-02-21)
+ * Version 1.4 (2014-08-13)
*
*/
@@ -78,12 +78,6 @@ public class W2XRegistration {
multiFactory,
regKey);
}
- else if (implName.equals(XhtmlOptionsDialogXsl.__implementationName)) {
- xSingleServiceFactory = FactoryHelper.getServiceFactory(XhtmlOptionsDialogXsl.class,
- XhtmlOptionsDialogXsl.__serviceName,
- multiFactory,
- regKey);
- }
else if (implName.equals(XhtmlOptionsDialogCalc.__implementationName)) {
xSingleServiceFactory = FactoryHelper.getServiceFactory(XhtmlOptionsDialogCalc.class,
XhtmlOptionsDialogCalc.__serviceName,
@@ -128,8 +122,6 @@ public class W2XRegistration {
W2XExportFilter.__serviceName, regKey) &
FactoryHelper.writeRegistryServiceInfo(XhtmlOptionsDialog.__implementationName,
XhtmlOptionsDialog.__serviceName, regKey) &
- FactoryHelper.writeRegistryServiceInfo(XhtmlOptionsDialogXsl.__implementationName,
- XhtmlOptionsDialogXsl.__serviceName, regKey) &
FactoryHelper.writeRegistryServiceInfo(XhtmlOptionsDialogCalc.__implementationName,
XhtmlOptionsDialogCalc.__serviceName, regKey) &
FactoryHelper.writeRegistryServiceInfo(EpubOptionsDialog.__implementationName,
diff --git a/source/java/org/openoffice/da/comp/writer2xhtml/XhtmlOptionsDialog.java b/source/java/org/openoffice/da/comp/writer2xhtml/XhtmlOptionsDialog.java
index b976b77..8cfeec6 100644
--- a/source/java/org/openoffice/da/comp/writer2xhtml/XhtmlOptionsDialog.java
+++ b/source/java/org/openoffice/da/comp/writer2xhtml/XhtmlOptionsDialog.java
@@ -16,11 +16,11 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
- * Copyright: 2002-2011 by Henrik Just
+ * Copyright: 2002-2014 by Henrik Just
*
* All Rights Reserved.
*
- * Version 1.2 (2011-03-21)
+ * Version 1.4 (2014-08-14)
*
*/
@@ -87,7 +87,7 @@ public class XhtmlOptionsDialog extends OptionsDialogBase {
loadListBoxOption(xProps, "SplitLevel");
loadListBoxOption(xProps, "RepeatLevels");
loadCheckBoxOption(xProps, "SaveImagesInSubdir");
- loadTextFieldOption(xProps, "XsltPath");
+ loadCheckBoxOption(xProps, "UseMathjax");
updateLockedOptions();
enableControls();
@@ -148,7 +148,7 @@ public class XhtmlOptionsDialog extends OptionsDialogBase {
}
saveCheckBoxOption(xProps, helper, "SaveImagesInSubdir", "save_images_in_subdir");
- saveTextFieldOption(xProps, helper, "XsltPath", "xslt_path");
+ saveCheckBoxOption(xProps, helper, "UseMathjax", "use_mathjax");
}
@@ -196,8 +196,7 @@ public class XhtmlOptionsDialog extends OptionsDialogBase {
setControlEnabled("RepeatLevelsLabel",!isLocked("repeat_levels") && !isLocked("split_level") && bSplit);
setControlEnabled("RepeatLevels",!isLocked("repeat_levels") && !isLocked("split_level") && bSplit);
setControlEnabled("SaveImagesInSubdir",!isLocked("save_images_in_subdir"));
- setControlEnabled("XsltPathLabel",(this instanceof XhtmlOptionsDialogXsl) && !isLocked("xslt_path"));
- setControlEnabled("XsltPath",(this instanceof XhtmlOptionsDialogXsl) && !isLocked("xslt_path"));
+ setControlEnabled("UseMathjax",!isLocked("use_mathjax"));
}
private void enableSplitLevel() {
@@ -214,6 +213,3 @@ public class XhtmlOptionsDialog extends OptionsDialogBase {
}
-
-
-
diff --git a/source/java/org/openoffice/da/comp/writer2xhtml/XhtmlOptionsDialogXsl.java b/source/java/org/openoffice/da/comp/writer2xhtml/XhtmlOptionsDialogXsl.java
deleted file mode 100644
index df6bda3..0000000
--- a/source/java/org/openoffice/da/comp/writer2xhtml/XhtmlOptionsDialogXsl.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/************************************************************************
- *
- * XhtmlOptionsDialogXsl.java
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software Foundation.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- *
- * Copyright: 2002-2008 by Henrik Just
- *
- * All Rights Reserved.
- *
- * Version 1.0 (2008-09-11)
- *
- */
-
-package org.openoffice.da.comp.writer2xhtml;
-
-import com.sun.star.uno.XComponentContext;
-
-/** This class provides a uno component which implements a filter ui for the
- * Xhtml export (xsl variant)
- * This variant of the dialog has the XsltPath setting enabled
- */
-public class XhtmlOptionsDialogXsl extends XhtmlOptionsDialog {
- /** The component will be registered under this name.
- */
- public static String __serviceName = "org.openoffice.da.writer2xhtml.XhtmlOptionsDialogXsl";
-
- /** The component should also have an implementation name.
- */
- public static String __implementationName = "org.openoffice.da.comp.writer2xhtml.XhtmlOptionsDialogXsl";
-
- /** Create a new XhtmlOptionsDialogXsl */
- public XhtmlOptionsDialogXsl(XComponentContext xContext) {
- super(xContext);
- }
-
-}
-
-
-
diff --git a/source/java/writer2latex/Application.java b/source/java/writer2latex/Application.java
index 607e24f..525747b 100644
--- a/source/java/writer2latex/Application.java
+++ b/source/java/writer2latex/Application.java
@@ -20,7 +20,7 @@
*
* All Rights Reserved.
*
- * Version 1.4 (2014-08-05)
+ * Version 1.4 (2014-08-13)
*
*/
@@ -54,7 +54,7 @@ import writer2latex.util.Misc;
*