Updating version number to 1.4 beta + some minor fixes

git-svn-id: svn://svn.code.sf.net/p/writer2latex/code/trunk@176 f0f2a975-2e09-46c8-9428-3b39399b9f3c
This commit is contained in:
henrikjust 2014-09-23 20:19:03 +00:00
parent 51f960d510
commit 2f5ab8c518
18 changed files with 77 additions and 38 deletions

View file

@ -1,6 +1,9 @@
Version history for Writer2LaTeX Version history for Writer2LaTeX
================================ ================================
Version 1.2.1 (September 2014)
- All:
- Updated to work with LO 4.x
Version 1.2 beta (March 2012) Version 1.2 beta (March 2012)
- Filters: - Filters:
- Added user interface to edit custom configuration - Added user interface to edit custom configuration

View file

@ -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 Latest version can be found at the web site
http://writer2latex.sourceforge.net http://writer2latex.sourceforge.net

View file

@ -1,5 +1,13 @@
Changelog for Writer2LaTeX version 1.2 -> 1.4 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 <header><nav id="header">...</nav></header>. 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 ---------- ---------- version 1.3.2 alpha ----------
[w2l] Two or more span elements in a row which generates identical formatting in LaTeX are now merged. [w2l] Two or more span elements in a row which generates identical formatting in LaTeX are now merged.

Binary file not shown.

View file

@ -20,7 +20,7 @@
* *
* All Rights Reserved. * 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 { public class ConverterFactory {
// Version information // Version information
private static final String VERSION = "1.3.2"; private static final String VERSION = "1.4";
private static final String DATE = "2014-09-19"; private static final String DATE = "2014-09-22";
/** Return the Writer2LaTeX version in the form /** Return the Writer2LaTeX version in the form
* (major version).(minor version).(patch level)<br/> * (major version).(minor version).(patch level)<br/>

View file

@ -28,6 +28,7 @@
<option name="ignore_hard_page_breaks" value="false" /> <option name="ignore_hard_page_breaks" value="false" />
<option name="ignore_hard_line_breaks" value="false" /> <option name="ignore_hard_line_breaks" value="false" />
<option name="ignore_double_spaces" value="true" /> <option name="ignore_double_spaces" value="true" />
<option name="display_hidden_text" value="false" />
<option name="debug" value="false" /> <option name="debug" value="false" />
<heading-map max-level="5"> <heading-map max-level="5">
<heading-level-map writer-level="1" name="section" level="1" /> <heading-level-map writer-level="1" name="section" level="1" />

View file

@ -27,6 +27,7 @@
<option name="ignore_hard_page_breaks" value="false" /> <option name="ignore_hard_page_breaks" value="false" />
<option name="ignore_hard_line_breaks" value="false" /> <option name="ignore_hard_line_breaks" value="false" />
<option name="ignore_double_spaces" value="false" /> <option name="ignore_double_spaces" value="false" />
<option name="display_hidden_text" value="false" />
<option name="debug" value="false" /> <option name="debug" value="false" />
<heading-map max-level="5"> <heading-map max-level="5">
<heading-level-map writer-level="1" name="section" level="1" /> <heading-level-map writer-level="1" name="section" level="1" />

View file

@ -28,6 +28,7 @@
<option name="ignore_hard_page_breaks" value="false" /> <option name="ignore_hard_page_breaks" value="false" />
<option name="ignore_hard_line_breaks" value="false" /> <option name="ignore_hard_line_breaks" value="false" />
<option name="ignore_double_spaces" value="true" /> <option name="ignore_double_spaces" value="true" />
<option name="display_hidden_text" value="false" />
<option name="debug" value="false" /> <option name="debug" value="false" />
<heading-map max-level="5"> <heading-map max-level="5">
<heading-level-map writer-level="1" name="section" level="1" /> <heading-level-map writer-level="1" name="section" level="1" />

View file

@ -28,6 +28,7 @@
<option name="ignore_hard_page_breaks" value="true" /> <option name="ignore_hard_page_breaks" value="true" />
<option name="ignore_hard_line_breaks" value="true" /> <option name="ignore_hard_line_breaks" value="true" />
<option name="ignore_double_spaces" value="true" /> <option name="ignore_double_spaces" value="true" />
<option name="display_hidden_text" value="false" />
<option name="debug" value="false" /> <option name="debug" value="false" />
<heading-map max-level="5"> <heading-map max-level="5">
<heading-level-map writer-level="1" name="section" level="1" /> <heading-level-map writer-level="1" name="section" level="1" />

View file

@ -20,7 +20,7 @@
* *
* All Rights Reserved. * 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 // Prepend numbering
if (!bUnNumbered) { if (!bUnNumbered) {
if (config.zenHack() && nLevel==2) { insertListLabel(listStyle,nListLevel,"SectionNumber",null,sLabel,heading);
// 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);
}
} }
// Add to toc // Add to toc

View file

@ -20,7 +20,7 @@
* *
* All Rights Reserved. * 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 { public class XhtmlConfig extends writer2latex.base.ConfigBase {
// Implement configuration methods // Implement configuration methods
protected int getOptionCount() { return 57; } protected int getOptionCount() { return 56; }
protected String getDefaultConfigPath() { return "/writer2latex/xhtml/config/"; } protected String getDefaultConfigPath() { return "/writer2latex/xhtml/config/"; }
// Override setOption: To be backwards compatible, we must accept options // 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 UPLINK = 53;
private static final int DIRECTORY_ICON = 54; private static final int DIRECTORY_ICON = 54;
private static final int DOCUMENT_ICON = 55; 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 xheading = addComplexOption("heading-map");
protected ComplexOption xpar = addComplexOption("paragraph-map"); protected ComplexOption xpar = addComplexOption("paragraph-map");
@ -287,7 +286,6 @@ public class XhtmlConfig extends writer2latex.base.ConfigBase {
options[UPLINK] = new Option("uplink",""); options[UPLINK] = new Option("uplink","");
options[DIRECTORY_ICON] = new Option("directory_icon",""); options[DIRECTORY_ICON] = new Option("directory_icon","");
options[DOCUMENT_ICON] = new Option("document_icon",""); options[DOCUMENT_ICON] = new Option("document_icon","");
options[ZEN_HACK] = new BooleanOption("zen_hack", "false");
} }
protected void readInner(Element elm) { 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 getXhtmlUplink() { return options[UPLINK].getString(); }
public String getXhtmlDirectoryIcon() { return options[DIRECTORY_ICON].getString(); } public String getXhtmlDirectoryIcon() { return options[DIRECTORY_ICON].getString(); }
public String getXhtmlDocumentIcon() { return options[DOCUMENT_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 getXParStyleMap() { return getStyleMap(xpar); }
public XhtmlStyleMap getXHeadingStyleMap() { return getStyleMap(xheading); } public XhtmlStyleMap getXHeadingStyleMap() { return getStyleMap(xheading); }

View file

@ -20,7 +20,7 @@
* *
* All Rights Reserved. * 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 Element getFooterNode() { return footerNode; }
public void createHeaderFooter() { public void createHeaderFooter() {
// TODO: Use semantic elements for HTML5? if (nType==HTML5) {
headerNode = getContentDOM().createElement("div"); 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); headerNode.setAttribute("id",sHeaderId);
bodyNode.appendChild(headerNode);
contentNode = getContentDOM().createElement("div"); contentNode = getContentDOM().createElement("div");
contentNode.setAttribute("id",sContentId); contentNode.setAttribute("id",sContentId);
bodyNode.appendChild(contentNode); 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); footerNode.setAttribute("id",sFooterId);
bodyNode.appendChild(footerNode);
} }
public void setContentDOM(Document doc) { public void setContentDOM(Document doc) {
@ -445,7 +462,7 @@ public class XhtmlDocument extends DOMDocument {
else if ("title".equals(sTagName)) { else if ("title".equals(sTagName)) {
titleNode = elm; titleNode = elm;
} }
else if ("div".equals(sTagName)) { else {
String sId = elm.getAttribute("id"); String sId = elm.getAttribute("id");
if (sContentId.equals(sId)) { contentNode = elm; } if (sContentId.equals(sId)) { contentNode = elm; }
else if (sHeaderId.equals(sId)) { headerNode = elm; } else if (sHeaderId.equals(sId)) { headerNode = elm; }

View file

@ -5,7 +5,7 @@
<identifier value="org.openoffice.da.writer2latex.oxt"/> <identifier value="org.openoffice.da.writer2latex.oxt"/>
<version value="1.3.2" /> <version value="1.4" />
<dependencies> <dependencies>
<OpenOffice.org-minimal-version value="3.0" d:name="OpenOffice.org 3.0"/> <OpenOffice.org-minimal-version value="3.0" d:name="OpenOffice.org 3.0"/>

View file

@ -5,7 +5,7 @@
<identifier value="org.openoffice.da.writer2xhtml.oxt" /> <identifier value="org.openoffice.da.writer2xhtml.oxt" />
<version value="1.3.2" /> <version value="1.4" />
<dependencies> <dependencies>
<OpenOffice.org-minimal-version value="3.0" d:name="OpenOffice.org 3.0"/> <OpenOffice.org-minimal-version value="3.0" d:name="OpenOffice.org 3.0"/>

View file

@ -23,18 +23,18 @@
with some special elements:</paragraph> with some special elements:</paragraph>
<list type="unordered"> <list type="unordered">
<listitem> <listitem>
<paragraph role="paragraph" xml-lang="en-US">A <emph>div</emph>-element with the id <emph>content</emph> is used to <paragraph role="paragraph" xml-lang="en-US">An element with the id <emph>content</emph> is used to
fill the text content. fill the text content.
If no such element exists, the <emph>body</emph> element is used. If there is no <emph>body</emph> element If no such element exists, the <emph>body</emph> element is used. If there is no <emph>body</emph> element
in the template, the root element is used.</paragraph> in the template, the root element is used.</paragraph>
</listitem> </listitem>
<listitem> <listitem>
<paragraph role="paragraph" xml-lang="en-US"><emph>div</emph>-elements with the id <emph>header</emph> or <paragraph role="paragraph" xml-lang="en-US">Elements with the id <emph>header</emph> or
<emph>footer</emph> (optional) will be filled with a simple navigation panel using a first/previous/next/last scheme <emph>footer</emph> (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).</paragraph> (for spreadsheet documents, sheet names are used for navigation).</paragraph>
</listitem> </listitem>
<listitem> <listitem>
<paragraph role="paragraph" xml-lang="en-US">A <emph>div</emph>-element with the id <emph>panel</emph> (optional) <paragraph role="paragraph" xml-lang="en-US">An element with the id <emph>panel</emph> (optional)
will be filled with a simple navigation panel using a table of contens-like scheme.</paragraph> will be filled with a simple navigation panel using a table of contens-like scheme.</paragraph>
</listitem> </listitem>
</list> </list>
@ -46,14 +46,31 @@
&#xA0;&#xA0;&#xA0;&#xA0;&lt;title/&gt;<br/> &#xA0;&#xA0;&#xA0;&#xA0;&lt;title/&gt;<br/>
&#xA0;&#xA0;&lt;/head&gt;<br/> &#xA0;&#xA0;&lt;/head&gt;<br/>
&#xA0;&#xA0;&lt;body&gt;<br/> &#xA0;&#xA0;&lt;body&gt;<br/>
&#xA0;&#xA0;&#xA0;&#xA0;&lt;div id='header' /&gt;<br/> &#xA0;&#xA0;&#xA0;&#xA0;&lt;div id='header'/&gt;<br/>
&#xA0;&#xA0;&#xA0;&#xA0;&lt;div id='content' /&gt;<br/> &#xA0;&#xA0;&#xA0;&#xA0;&lt;div id='content'/&gt;<br/>
&#xA0;&#xA0;&lt;/body&gt;<br/> &#xA0;&#xA0;&lt;/body&gt;<br/>
&lt;/html&gt; &lt;/html&gt;
</paragraph> </paragraph>
<paragraph role="paragraph" xml-lang="en-US">As the template does not include footer and panel nodes, these elements will not be included. <paragraph role="paragraph" xml-lang="en-US">As the template does not include footer and panel nodes, these elements will not be included.
</paragraph> </paragraph>
<paragraph role="paragraph" xml-lang="en-US">The absolute mininal template is this:</paragraph>
<paragraph role="paragraph" xml-lang="en-US">A template with all the elements, suitable for HTML5 might look like this:
</paragraph>
<paragraph role="code" xml-lang="en-US">
&lt;html&gt;<br/>
&#xA0;&#xA0;&lt;head&gt;<br/>
&#xA0;&#xA0;&#xA0;&#xA0;&lt;title/&gt;<br/>
&#xA0;&#xA0;&lt;/head&gt;<br/>
&#xA0;&#xA0;&lt;body&gt;<br/>
&#xA0;&#xA0;&#xA0;&#xA0;&lt;header&gt;&lt;nav id='header'/&gt;&lt;/header&gt;<br/>
&#xA0;&#xA0;&#xA0;&#xA0;&lt;aside&gt;&lt;nav id='panel'/&gt;&lt;/aside&gt;<br/>
&#xA0;&#xA0;&#xA0;&#xA0;&lt;div id='content'/&gt;<br/>
&#xA0;&#xA0;&#xA0;&#xA0;&lt;footer&gt;&lt;nav id='footer'/&gt;&lt;/footer&gt;<br/>
&#xA0;&#xA0;&lt;/body&gt;<br/>
&lt;/html&gt;
</paragraph>
<paragraph role="paragraph" xml-lang="en-US">The absolutely mininal template is this:</paragraph>
<paragraph role="code" xml-lang="en-US"> <paragraph role="code" xml-lang="en-US">
&lt;div/&gt; &lt;div/&gt;
</paragraph> </paragraph>

View file

@ -4,7 +4,7 @@
xmlns:xlink="http://www.w3.org/1999/xlink"> xmlns:xlink="http://www.w3.org/1999/xlink">
<identifier value="org.openoffice.da.writer4latex.oxt" /> <identifier value="org.openoffice.da.writer4latex.oxt" />
<version value="1.3.2" /> <version value="1.4" />
<dependencies> <dependencies>
<OpenOffice.org-minimal-version value="3.0" d:name="OpenOffice.org 3.0"/> <OpenOffice.org-minimal-version value="3.0" d:name="OpenOffice.org 3.0"/>
</dependencies> </dependencies>

View file

@ -2,5 +2,5 @@
<description xmlns="http://openoffice.org/extensions/description/2006" <description xmlns="http://openoffice.org/extensions/description/2006"
xmlns:d="http://openoffice.org/extensions/description/2006"> xmlns:d="http://openoffice.org/extensions/description/2006">
<identifier value="org.openoffice.da.writer2latex.xhtml-config-sample.oxt" /> <identifier value="org.openoffice.da.writer2latex.xhtml-config-sample.oxt" />
<version value="1.3.2" /> <version value="1.4" />
</description> </description>

View file

@ -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. Writer2LaTeX is (c) 2002-2014 by Henrik Just.
The source is available under the terms and conditions of the The source is available under the terms and conditions of the