A few XeTeX and Writer4LaTeX changes

git-svn-id: svn://svn.code.sf.net/p/writer2latex/code/trunk@12 f0f2a975-2e09-46c8-9428-3b39399b9f3c
This commit is contained in:
henrikjust 2009-04-01 20:33:34 +00:00
parent 9241a44f6c
commit 42236bbce5
5 changed files with 45 additions and 5 deletions

View file

@ -20,7 +20,7 @@
*
* All Rights Reserved.
*
* Version 1.2 (2009-03-30)
* Version 1.2 (2009-03-31)
*
*/
@ -44,6 +44,9 @@ public final class TeXify {
/** Backend format pdfTeX (pdf) */
public static final short PDFTEX = 3;
/** Backend format XeTeX (also pdf, usually) */
public static final short XETEX = 4;
// Define the applications to run for each backend
private static final String[] genericTexify = {
@ -56,6 +59,9 @@ public final class TeXify {
ExternalApps.LATEX, ExternalApps.BIBTEX, ExternalApps.MAKEINDEX,
ExternalApps.LATEX, ExternalApps.MAKEINDEX, ExternalApps.LATEX,
ExternalApps.DVIPS };
private static final String[] xeTexify = {
ExternalApps.XELATEX, ExternalApps.BIBTEX, ExternalApps.MAKEINDEX,
ExternalApps.XELATEX, ExternalApps.MAKEINDEX, ExternalApps.XELATEX };
// Global objects
//private XComponentContext xContext;
@ -107,6 +113,14 @@ public final class TeXify {
throw new IOException("Error executing postscript viewer");
}
}
else if (nBackend==XETEX) {
doTeXify(xeTexify, file);
if (externalApps.execute(ExternalApps.PDFVIEWER,
new File(file.getParentFile(),file.getName()+".pdf").getPath(),
file.getParentFile(), false)>0) {
throw new IOException("Error executing pdf viewer");
}
}
}