Writer2xhtml custom config ui + EPUB export
git-svn-id: svn://svn.code.sf.net/p/writer2latex/code/trunk@55 f0f2a975-2e09-46c8-9428-3b39399b9f3c
This commit is contained in:
parent
a58ea7fa19
commit
ce61f7bc3b
41 changed files with 1118 additions and 212 deletions
|
@ -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-06-05)
|
||||
* Version 1.2 (2010-03-28)
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -103,7 +103,7 @@ public class BibConverter extends ConverterHelper {
|
|||
.append("}").nl();
|
||||
}
|
||||
else {
|
||||
if (bibDoc==null) { bibDoc = new BibTeXDocument(palette.getOutFileName()); }
|
||||
if (bibDoc==null) { bibDoc = new BibTeXDocument(palette.getOutFileName(),false); }
|
||||
ldp.append("\\bibliography{")
|
||||
.append(bibDoc.getName())
|
||||
.append("}").nl();
|
||||
|
@ -129,7 +129,7 @@ public class BibConverter extends ConverterHelper {
|
|||
String sIdentifier = node.getAttribute(XMLString.TEXT_IDENTIFIER);
|
||||
if (sIdentifier!=null) {
|
||||
if (config.externalBibtexFiles().length()==0) {
|
||||
if (bibDoc==null) { bibDoc = new BibTeXDocument(palette.getOutFileName()); }
|
||||
if (bibDoc==null) { bibDoc = new BibTeXDocument(palette.getOutFileName(),false); }
|
||||
if (!bibDoc.containsKey(sIdentifier)) {
|
||||
bibDoc.put(new BibMark(node));
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
*
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Version 1.2 (2010-03-15)
|
||||
* Version 1.2 (2010-03-28)
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -174,7 +174,7 @@ public final class ConverterPalette extends ConverterBase {
|
|||
info = new Info(ofr,config,this);
|
||||
|
||||
// Create master document and add this
|
||||
this.texDoc = new LaTeXDocument(sTargetFileName,config.getWrapLinesAfter());
|
||||
this.texDoc = new LaTeXDocument(sTargetFileName,config.getWrapLinesAfter(),true);
|
||||
if (config.getBackend()!=LaTeXConfig.XETEX) {
|
||||
texDoc.setEncoding(ClassicI18n.writeJavaEncoding(config.getInputencoding()));
|
||||
}
|
||||
|
@ -182,7 +182,7 @@ public final class ConverterPalette extends ConverterBase {
|
|||
texDoc.setEncoding("UTF-8");
|
||||
|
||||
}
|
||||
convertData.addDocument(texDoc);
|
||||
converterResult.addDocument(texDoc);
|
||||
|
||||
// Create other data
|
||||
globalOptions = new CSVList(',');
|
||||
|
@ -288,7 +288,7 @@ public final class ConverterPalette extends ConverterBase {
|
|||
|
||||
// Add BibTeX document if there's any bibliographic data
|
||||
if (bibCv.getBibTeXDocument()!=null) {
|
||||
convertData.addDocument(bibCv.getBibTeXDocument());
|
||||
converterResult.addDocument(bibCv.getBibTeXDocument());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
*
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Version 1.2 (2010-03-15)
|
||||
* Version 1.2 (2010-03-28)
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -42,6 +42,8 @@ public class LaTeXDocument implements Document {
|
|||
private static final String FILE_EXTENSION = ".tex";
|
||||
|
||||
private String sName;
|
||||
|
||||
private boolean bIsMaster;
|
||||
|
||||
private String sEncoding = "ASCII";
|
||||
|
||||
|
@ -57,10 +59,12 @@ public class LaTeXDocument implements Document {
|
|||
*
|
||||
* @param sName The name of the <code>LaTeXDocument</code>.
|
||||
* @param nWrap Lines should be wrapped after this position
|
||||
* @param bIsMaster true if this is a master document
|
||||
*/
|
||||
public LaTeXDocument(String sName,int nWrap) {
|
||||
public LaTeXDocument(String sName,int nWrap,boolean bIsMaster) {
|
||||
this.nWrap = nWrap;
|
||||
this.sName = trimDocumentName(sName);
|
||||
this.bIsMaster = bIsMaster;
|
||||
contents = new LaTeXDocumentPortion(true);
|
||||
}
|
||||
|
||||
|
@ -99,6 +103,10 @@ public class LaTeXDocument implements Document {
|
|||
public String getMIMEType() {
|
||||
return MIMETypes.LATEX;
|
||||
}
|
||||
|
||||
public boolean isMasterDocument() {
|
||||
return bIsMaster;
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>Writes out the <code>Document</code> content to the specified
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
*
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Version 1.2 (2010-03-15)
|
||||
* Version 1.2 (2010-03-28)
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -80,7 +80,7 @@ public class SectionConverter extends ConverterHelper {
|
|||
|
||||
LaTeXDocumentPortion sectionLdp = ldp;
|
||||
if (sFileName!=null) {
|
||||
LaTeXDocument newDoc = new LaTeXDocument(sFileName,config.getWrapLinesAfter());
|
||||
LaTeXDocument newDoc = new LaTeXDocument(sFileName,config.getWrapLinesAfter(),false);
|
||||
if (config.getBackend()!=LaTeXConfig.XETEX) {
|
||||
newDoc.setEncoding(ClassicI18n.writeJavaEncoding(config.getInputencoding()));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue