diff --git a/source/distro/History.txt b/source/distro/History.txt
index fc0f03b..49fde02 100644
--- a/source/distro/History.txt
+++ b/source/distro/History.txt
@@ -1,6 +1,9 @@
Version history for Writer2LaTeX
================================
+Version 1.2.1 (September 2014)
+ - All:
+ - Updated to work with LO 4.x
Version 1.2 beta (March 2012)
- Filters:
- Added user interface to edit custom configuration
diff --git a/source/distro/Readme.txt b/source/distro/Readme.txt
index e2f2916..91548f9 100644
--- a/source/distro/Readme.txt
+++ b/source/distro/Readme.txt
@@ -1,7 +1,7 @@
-Writer2LaTeX version 1.3.2 (alpha test release)
+Writer2LaTeX version 1.4 (beta test release)
===============================================
-This is the distribution of Writer2LaTeX version 1.3.2 alpha
+This is the distribution of Writer2LaTeX version 1.4 beta
Latest version can be found at the web site
http://writer2latex.sourceforge.net
diff --git a/source/distro/changelog.txt b/source/distro/changelog.txt
index 5e168ae..a65f3df 100644
--- a/source/distro/changelog.txt
+++ b/source/distro/changelog.txt
@@ -1,5 +1,13 @@
Changelog for Writer2LaTeX version 1.2 -> 1.4
+---------- version 1.4 beta ----------
+
+[w2x] The experimental option zen_hack has been removed
+
+[w2x] For templates it is no longer required that the footer, header and panel are contained in a div element.
+ This allows for HTML5 code like . The default header and footer
+ are now created with header+nav and footer+nav elements if the target format is HTML5.
+
---------- version 1.3.2 alpha ----------
[w2l] Two or more span elements in a row which generates identical formatting in LaTeX are now merged.
diff --git a/source/distro/doc/user-manual.odt b/source/distro/doc/user-manual.odt
index 7013df3..10039d2 100644
Binary files a/source/distro/doc/user-manual.odt and b/source/distro/doc/user-manual.odt differ
diff --git a/source/java/writer2latex/api/ConverterFactory.java b/source/java/writer2latex/api/ConverterFactory.java
index 5e96db8..99ee3ea 100644
--- a/source/java/writer2latex/api/ConverterFactory.java
+++ b/source/java/writer2latex/api/ConverterFactory.java
@@ -20,7 +20,7 @@
*
* All Rights Reserved.
*
- * Version 1.4 (2014-09-19)
+ * Version 1.4 (2014-09-22)
*
*/
@@ -32,8 +32,8 @@ package writer2latex.api;
public class ConverterFactory {
// Version information
- private static final String VERSION = "1.3.2";
- private static final String DATE = "2014-09-19";
+ private static final String VERSION = "1.4";
+ private static final String DATE = "2014-09-22";
/** Return the Writer2LaTeX version in the form
* (major version).(minor version).(patch level)
diff --git a/source/java/writer2latex/latex/config/clean.xml b/source/java/writer2latex/latex/config/clean.xml
index 1058554..2291692 100644
--- a/source/java/writer2latex/latex/config/clean.xml
+++ b/source/java/writer2latex/latex/config/clean.xml
@@ -28,6 +28,7 @@
+
diff --git a/source/java/writer2latex/latex/config/pdfprint.xml b/source/java/writer2latex/latex/config/pdfprint.xml
index 396e737..290d990 100644
--- a/source/java/writer2latex/latex/config/pdfprint.xml
+++ b/source/java/writer2latex/latex/config/pdfprint.xml
@@ -27,6 +27,7 @@
+
diff --git a/source/java/writer2latex/latex/config/pdfscreen.xml b/source/java/writer2latex/latex/config/pdfscreen.xml
index 914ac6d..b82b509 100644
--- a/source/java/writer2latex/latex/config/pdfscreen.xml
+++ b/source/java/writer2latex/latex/config/pdfscreen.xml
@@ -28,6 +28,7 @@
+
diff --git a/source/java/writer2latex/latex/config/ultraclean.xml b/source/java/writer2latex/latex/config/ultraclean.xml
index a3ef9f8..0711629 100644
--- a/source/java/writer2latex/latex/config/ultraclean.xml
+++ b/source/java/writer2latex/latex/config/ultraclean.xml
@@ -28,6 +28,7 @@
+
diff --git a/source/java/writer2latex/xhtml/TextConverter.java b/source/java/writer2latex/xhtml/TextConverter.java
index a3cf1a3..bcdfaea 100644
--- a/source/java/writer2latex/xhtml/TextConverter.java
+++ b/source/java/writer2latex/xhtml/TextConverter.java
@@ -20,7 +20,7 @@
*
* All Rights Reserved.
*
- * Version 1.4 (2014-09-06)
+ * Version 1.4 (2014-09-23)
*
*/
@@ -699,14 +699,7 @@ public class TextConverter extends ConverterHelper {
// Prepend numbering
if (!bUnNumbered) {
- if (config.zenHack() && nLevel==2) {
- // Hack for ePub Zen Garden: Special style for the prefix at level 2
- // TODO: Replace by some proper style map construct...
- insertListLabel(listStyle,nListLevel,"SectionNumber",counter.getPrefix(),counter.getLabelAndSuffix(),heading);
- }
- else {
- insertListLabel(listStyle,nListLevel,"SectionNumber",null,sLabel,heading);
- }
+ insertListLabel(listStyle,nListLevel,"SectionNumber",null,sLabel,heading);
}
// Add to toc
diff --git a/source/java/writer2latex/xhtml/XhtmlConfig.java b/source/java/writer2latex/xhtml/XhtmlConfig.java
index f258246..a6474d2 100644
--- a/source/java/writer2latex/xhtml/XhtmlConfig.java
+++ b/source/java/writer2latex/xhtml/XhtmlConfig.java
@@ -20,7 +20,7 @@
*
* All Rights Reserved.
*
- * Version 1.4 (2014-09-05)
+ * Version 1.4 (2014-09-23)
*
*/
@@ -41,7 +41,7 @@ import writer2latex.util.Misc;
public class XhtmlConfig extends writer2latex.base.ConfigBase {
// Implement configuration methods
- protected int getOptionCount() { return 57; }
+ protected int getOptionCount() { return 56; }
protected String getDefaultConfigPath() { return "/writer2latex/xhtml/config/"; }
// Override setOption: To be backwards compatible, we must accept options
@@ -156,7 +156,6 @@ public class XhtmlConfig extends writer2latex.base.ConfigBase {
private static final int UPLINK = 53;
private static final int DIRECTORY_ICON = 54;
private static final int DOCUMENT_ICON = 55;
- private static final int ZEN_HACK = 56; // temporary hack for ePub Zen Garden styles
protected ComplexOption xheading = addComplexOption("heading-map");
protected ComplexOption xpar = addComplexOption("paragraph-map");
@@ -287,7 +286,6 @@ public class XhtmlConfig extends writer2latex.base.ConfigBase {
options[UPLINK] = new Option("uplink","");
options[DIRECTORY_ICON] = new Option("directory_icon","");
options[DOCUMENT_ICON] = new Option("document_icon","");
- options[ZEN_HACK] = new BooleanOption("zen_hack", "false");
}
protected void readInner(Element elm) {
@@ -414,7 +412,6 @@ public class XhtmlConfig extends writer2latex.base.ConfigBase {
public String getXhtmlUplink() { return options[UPLINK].getString(); }
public String getXhtmlDirectoryIcon() { return options[DIRECTORY_ICON].getString(); }
public String getXhtmlDocumentIcon() { return options[DOCUMENT_ICON].getString(); }
- public boolean zenHack() { return ((BooleanOption) options[ZEN_HACK]).getValue(); }
public XhtmlStyleMap getXParStyleMap() { return getStyleMap(xpar); }
public XhtmlStyleMap getXHeadingStyleMap() { return getStyleMap(xheading); }
diff --git a/source/java/writer2latex/xhtml/XhtmlDocument.java b/source/java/writer2latex/xhtml/XhtmlDocument.java
index 6bb4d9d..e9b2d27 100644
--- a/source/java/writer2latex/xhtml/XhtmlDocument.java
+++ b/source/java/writer2latex/xhtml/XhtmlDocument.java
@@ -20,7 +20,7 @@
*
* All Rights Reserved.
*
- * Version 1.4 (2014-08-26)
+ * Version 1.4 (2014-09-23)
*
*/
@@ -324,16 +324,33 @@ public class XhtmlDocument extends DOMDocument {
public Element getFooterNode() { return footerNode; }
public void createHeaderFooter() {
- // TODO: Use semantic elements for HTML5?
- headerNode = getContentDOM().createElement("div");
+ if (nType==HTML5) {
+ Element header1 = getContentDOM().createElement("header");
+ bodyNode.appendChild(header1);
+ headerNode = getContentDOM().createElement("nav");
+ header1.appendChild(headerNode);
+ }
+ else {
+ headerNode = getContentDOM().createElement("div");
+ bodyNode.appendChild(headerNode);
+ }
headerNode.setAttribute("id",sHeaderId);
- bodyNode.appendChild(headerNode);
+
contentNode = getContentDOM().createElement("div");
contentNode.setAttribute("id",sContentId);
bodyNode.appendChild(contentNode);
- footerNode = getContentDOM().createElement("div");
+
+ if (nType==HTML5) {
+ Element footer1 = getContentDOM().createElement("footer");
+ bodyNode.appendChild(footer1);
+ footerNode = getContentDOM().createElement("nav");
+ footer1.appendChild(footerNode);
+ }
+ else {
+ footerNode = getContentDOM().createElement("div");
+ bodyNode.appendChild(footerNode);
+ }
footerNode.setAttribute("id",sFooterId);
- bodyNode.appendChild(footerNode);
}
public void setContentDOM(Document doc) {
@@ -445,7 +462,7 @@ public class XhtmlDocument extends DOMDocument {
else if ("title".equals(sTagName)) {
titleNode = elm;
}
- else if ("div".equals(sTagName)) {
+ else {
String sId = elm.getAttribute("id");
if (sContentId.equals(sId)) { contentNode = elm; }
else if (sHeaderId.equals(sId)) { headerNode = elm; }
diff --git a/source/oxt/writer2latex/description.xml b/source/oxt/writer2latex/description.xml
index 7e3a8f4..4b90703 100644
--- a/source/oxt/writer2latex/description.xml
+++ b/source/oxt/writer2latex/description.xml
@@ -5,7 +5,7 @@
-
+
diff --git a/source/oxt/writer2xhtml/description.xml b/source/oxt/writer2xhtml/description.xml
index d203949..447dff5 100644
--- a/source/oxt/writer2xhtml/description.xml
+++ b/source/oxt/writer2xhtml/description.xml
@@ -5,7 +5,7 @@
-
+
diff --git a/source/oxt/writer2xhtml/help/en/org.openoffice.da.writer2xhtml.oxt/Configuration/Template.xhp b/source/oxt/writer2xhtml/help/en/org.openoffice.da.writer2xhtml.oxt/Configuration/Template.xhp
index 571250f..7deb74a 100644
--- a/source/oxt/writer2xhtml/help/en/org.openoffice.da.writer2xhtml.oxt/Configuration/Template.xhp
+++ b/source/oxt/writer2xhtml/help/en/org.openoffice.da.writer2xhtml.oxt/Configuration/Template.xhp
@@ -23,18 +23,18 @@
with some special elements:
- A div-element with the id content is used to
+ An element with the id content is used to
fill the text content.
If no such element exists, the body element is used. If there is no body element
in the template, the root element is used.
- div-elements with the id header or
+ Elements with the id header or
footer (optional) will be filled with a simple navigation panel using a first/previous/next/last scheme
(for spreadsheet documents, sheet names are used for navigation).
- A div-element with the id panel (optional)
+ An element with the id panel (optional)
will be filled with a simple navigation panel using a table of contens-like scheme.
@@ -46,14 +46,31 @@
<title/>
</head>
<body>
- <div id='header' />
- <div id='content' />
+ <div id='header'/>
+ <div id='content'/>
</body>
</html>
As the template does not include footer and panel nodes, these elements will not be included.
- The absolute mininal template is this:
+
+ A template with all the elements, suitable for HTML5 might look like this:
+
+
+<html>
+ <head>
+ <title/>
+ </head>
+ <body>
+ <header><nav id='header'/></header>
+ <aside><nav id='panel'/></aside>
+ <div id='content'/>
+ <footer><nav id='footer'/></footer>
+ </body>
+</html>
+
+
+ The absolutely mininal template is this:
<div/>
diff --git a/source/oxt/writer4latex/description.xml b/source/oxt/writer4latex/description.xml
index 17a8e8e..f79a755 100644
--- a/source/oxt/writer4latex/description.xml
+++ b/source/oxt/writer4latex/description.xml
@@ -4,7 +4,7 @@
xmlns:xlink="http://www.w3.org/1999/xlink">
-
+
diff --git a/source/oxt/xhtml-config-sample/description.xml b/source/oxt/xhtml-config-sample/description.xml
index e49dd0f..b653035 100644
--- a/source/oxt/xhtml-config-sample/description.xml
+++ b/source/oxt/xhtml-config-sample/description.xml
@@ -2,5 +2,5 @@
-
+
diff --git a/source/readme-source.txt b/source/readme-source.txt
index 9c9e0ff..74a45a8 100644
--- a/source/readme-source.txt
+++ b/source/readme-source.txt
@@ -1,5 +1,5 @@
-Writer2LaTeX source version 1.3.2 alpha
-=======================================
+Writer2LaTeX source version 1.4 beta
+====================================
Writer2LaTeX is (c) 2002-2014 by Henrik Just.
The source is available under the terms and conditions of the