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:
parent
51f960d510
commit
2f5ab8c518
18 changed files with 77 additions and 38 deletions
|
@ -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
|
||||
|
|
|
@ -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); }
|
||||
|
|
|
@ -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; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue