w2x hidden text and split on page breaks + some w2l bugfixes

git-svn-id: svn://svn.code.sf.net/p/writer2latex/code/trunk@77 f0f2a975-2e09-46c8-9428-3b39399b9f3c
This commit is contained in:
henrikjust 2010-11-22 18:51:18 +00:00
parent 2174e5cbf5
commit a3a6b0befc
18 changed files with 202 additions and 94 deletions

View file

@ -20,7 +20,7 @@
*
* All Rights Reserved.
*
* Version 1.2 (2010-03-28)
* Version 1.2 (2010-11-21)
*
*/
@ -206,6 +206,7 @@ public final class ConverterPalette extends ConverterBase {
// Add declarations from our helpers
i18n.appendDeclarations(packages,declarations);
colorCv.appendDeclarations(packages,declarations);
noteCv.appendDeclarations(packages,declarations);
charSc.appendDeclarations(packages,declarations);
headingCv.appendDeclarations(packages,declarations);
parCv.appendDeclarations(packages,declarations);
@ -216,7 +217,6 @@ public final class ConverterPalette extends ConverterBase {
bibCv.appendDeclarations(packages,declarations);
sectionCv.appendDeclarations(packages,declarations);
tableCv.appendDeclarations(packages,declarations);
noteCv.appendDeclarations(packages,declarations);
captionCv.appendDeclarations(packages,declarations);
inlineCv.appendDeclarations(packages,declarations);
fieldCv.appendDeclarations(packages,declarations);

View file

@ -16,14 +16,16 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
* Copyright: 2002-2008 by Henrik Just
* Copyright: 2002-2010 by Henrik Just
*
* All Rights Reserved.
*
* Version 1.0 (2008-11-23)
* Version 1.2 (2010-11-21)
*
*/
// TODO: Get the styles for footnotes and endnotes and use Context.resetFormattingFromStyle...
package writer2latex.latex;
import java.util.LinkedList;
@ -276,6 +278,8 @@ public class NoteConverter extends ConverterHelper {
}
if (nodeName.equals(XMLString.TEXT_P)) {
StyleWithProperties style = ofr.getParStyle(node.getAttribute(XMLString.TEXT_STYLE_NAME));
oc.resetFormattingFromStyle(style);
palette.getInlineCv().traverseInlineText(child,ldp,oc);
if (i<len-1) {
if (nList.item(i+1).getNodeName().startsWith(XMLString.TEXT_)) {

View file

@ -16,11 +16,11 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
* Copyright: 2002-2009 by Henrik Just
* Copyright: 2002-2010 by Henrik Just
*
* All Rights Reserved.
*
* Version 1.2 (2009-03-26)
* Version 1.2 (2010-11-21)
*
*/
@ -52,10 +52,11 @@ public class XeTeXI18n extends I18n {
* @param decl other declarations
*/
public void appendDeclarations(LaTeXDocumentPortion pack, LaTeXDocumentPortion decl) {
pack.append("\\usepackage{fontspec}").nl()
pack.append("\\usepackage{amsmath,amssymb,amsfonts}").nl()
.append("\\usepackage{fontspec}").nl()
.append("\\usepackage{xunicode}").nl()
.append("\\usepackage{xltxtra}").nl()
.append("\\usepackage{amsmath,amssymb,amsfonts}").nl();
.append("\\usepackage{xltxtra}").nl();
}
/** Apply a language language
@ -94,22 +95,17 @@ public class XeTeXI18n extends I18n {
for (int i=0; i<nLen; i++) {
c = s.charAt(i);
switch (c) {
case '"' : buf.append("\\textquotedbl{}"); break;
case '#' : buf.append("\\#"); break;
case '$' : buf.append("\\$"); break;
case '%' : buf.append("\\%"); break;
case '&' : buf.append("\\&"); break;
case '\'' : buf.append("\\textbackslash{}"); break;
case '<' : buf.append("\\textless{}"); break;
case '>' : buf.append("\\textgreater{}"); break;
case '\\' : buf.append("\\textbackslash{}"); break;
case '\u005e' : buf.append("\\^{}"); break;
case '_' : buf.append("\\_"); break;
case '\u0060' : buf.append("\\textasciigrave{}"); break;
case '{' : buf.append("\\{"); break;
case '|' : buf.append("\\textbar{}"); break;
case '}' : buf.append("\\}"); break;
case '~' : buf.append("\\~{}"); break;
case '#' : buf.append("\\#"); break; // Parameter
case '$' : buf.append("\\$"); break; // Math shift
case '%' : buf.append("\\%"); break; // Comment
case '&' : buf.append("\\&"); break; // Alignment tab
case '\\' : buf.append("\\textbackslash{}"); break; // Escape
case '^' : buf.append("\\^{}"); break; // Superscript
case '_' : buf.append("\\_"); break; // Subscript
case '{' : buf.append("\\{"); break; // Begin group
case '}' : buf.append("\\}"); break; // End group
case '~' : buf.append("\\textasciitilde{}"); break; // Active (non-breaking space)
case '\u00A0' : buf.append('~'); break; // Make non-breaking spaces visible
default: buf.append(c);
}
}