diff --git a/source/distro/changelog.txt b/source/distro/changelog.txt
index 735799c..d9c8eed 100644
--- a/source/distro/changelog.txt
+++ b/source/distro/changelog.txt
@@ -2,6 +2,10 @@ Changelog for Writer2LaTeX version 1.0 -> 1.2
---------- version 1.1.1 ----------
+[w2l] Bugfix: Avoid null pointer exception on empty metadata (date)
+
+[w2x] Bugfix: Avoid null pointer exception on empty metadata (subject, keywords)
+
[w2x] Adapted to work with MathML without namespace (fix for change in OOo 3.2)
[w2l] Adapted to work with MathML without namespace (fix for change in OOo 3.2)
diff --git a/source/java/writer2latex/api/ConverterFactory.java b/source/java/writer2latex/api/ConverterFactory.java
index 386ccdc..bfc8d96 100644
--- a/source/java/writer2latex/api/ConverterFactory.java
+++ b/source/java/writer2latex/api/ConverterFactory.java
@@ -20,7 +20,7 @@
*
* All Rights Reserved.
*
- * Version 1.2 (2010-02-19)
+ * Version 1.2 (2010-02-26)
*
*/
@@ -33,7 +33,7 @@ public class ConverterFactory {
// Version information
private static final String VERSION = "1.1.1";
- private static final String DATE = "2010-02-19";
+ private static final String DATE = "2010-02-26";
/** Return version information
* @return the Writer2LaTeX version in the form
diff --git a/source/java/writer2latex/latex/ConverterPalette.java b/source/java/writer2latex/latex/ConverterPalette.java
index 1eba01f..812c9eb 100644
--- a/source/java/writer2latex/latex/ConverterPalette.java
+++ b/source/java/writer2latex/latex/ConverterPalette.java
@@ -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-09-24)
+ * Version 1.2 (2010-02-26)
*
*/
@@ -235,10 +235,12 @@ public final class ConverterPalette extends ConverterBase {
createMeta("author",metaData.getCreator(),declarations);
// According to the spec, the date has the format YYYY-MM-DDThh:mm:ss
String sDate = metaData.getDate();
- if (sDate.length()==19 && sDate.charAt(10)=='T') {
- sDate = sDate.substring(0,10);
+ if (sDate!=null) {
+ if (sDate.length()==19 && sDate.charAt(10)=='T') {
+ sDate = sDate.substring(0,10);
+ }
+ createMeta("date",sDate,declarations);
}
- createMeta("date",sDate,declarations);
}
// Create options for documentclass
diff --git a/source/java/writer2latex/xhtml/Converter.java b/source/java/writer2latex/xhtml/Converter.java
index c0b31b4..a1160e3 100644
--- a/source/java/writer2latex/xhtml/Converter.java
+++ b/source/java/writer2latex/xhtml/Converter.java
@@ -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-09-05)
+ * Version 1.2 (2010-02-26)
*
*/
@@ -504,11 +504,14 @@ public class Converter extends ConverterBase {
// Insert the actual meta data
createMeta("DC.title",metaData.getTitle());
// DC.subject actually contains subject+keywords, so we merge them
- String sDCSubject = metaData.getSubject();
- if (metaData.getSubject().length()>0 && metaData.getKeywords().length()>0) {
- sDCSubject+=", ";
+ String sDCSubject = "";
+ if (metaData.getSubject()!=null && metaData.getSubject().length()>0) {
+ sDCSubject = metaData.getSubject();
+ }
+ if (metaData.getKeywords()!=null && metaData.getKeywords().length()>0) {
+ if (sDCSubject.length()>0) { sDCSubject+=", "; }
+ sDCSubject += metaData.getKeywords();
}
- sDCSubject+=metaData.getKeywords();
createMeta("DC.subject",sDCSubject);
createMeta("DC.description",metaData.getDescription());
createMeta("DC.creator",metaData.getCreator());
diff --git a/source/oxt/writer4latex/help/en/help.tree b/source/oxt/writer4latex/help/en/help.tree
index 5b62a35..77a10db 100644
--- a/source/oxt/writer4latex/help/en/help.tree
+++ b/source/oxt/writer4latex/help/en/help.tree
@@ -6,5 +6,6 @@
Menu referenceGuidelinesUsing the templates
+ Importing TeX files
diff --git a/source/oxt/writer4latex/help/en/org.openoffice.da.writer4latex.oxt/configuration.xhp b/source/oxt/writer4latex/help/en/org.openoffice.da.writer4latex.oxt/configuration.xhp
index 1cd9864..012e432 100644
--- a/source/oxt/writer4latex/help/en/org.openoffice.da.writer4latex.oxt/configuration.xhp
+++ b/source/oxt/writer4latex/help/en/org.openoffice.da.writer4latex.oxt/configuration.xhp
@@ -11,21 +11,11 @@
ConfigurationBefore you can use Writer4LaTeX you must configure it to use your LaTeX
distribution as well as viewers for the different output formats.
-
+
+ Select Tools - Extension Manager - Writer4LaTeX
+ and click Configure
+ Select Tools - Options - %PRODUCTNAME Writer - Writer4LaTeX
+ Automatic Configuration
@@ -75,7 +65,7 @@
OptionsFill out any additional options here. Often you will only need the file name,
- which is denoted %s.
+ which is denoted %s.
Fill out any additional options here, using %s to represent the file nameGuidelines
+ Not every feature in %PRODUCTNAME Writer is supported by LaTeX. To avoid unexpected
+ results follow these guidelines.
+
+
+ Page styles: %PRODUCTNAME Writer offers a sofisticated
+ page style scheme, where every page style can define another style to be used for the next page.
+ You can thus have something like Style A → Style B → Style C.
+ In LaTeX this is only possible in the first step of a page sequence:
+ The example above will produce Style A → Style B → Style B in LaTeX.
+ You should beware of this when you design your page styles. Note that explicit change of page style with
+ Insert - Manual break is not affected by this limitation.
+ In LaTeX the same page geometry is used for all pages. The dimensions are
+ taken from the first page of your document.
+ Do not create headers and footers with more than one line of text,
+ these will not be exported correctly to LaTeX.
+
+
+ Background color: Background color is currently not supported
+ except in table cells. You should avoid using background color elsewhere.
+
+
+ Graphics: Anchor graphics to paragraph or to character if you
+ want a floating graphic. If you want the graphic to be a part of the text flow, anchor it to character. Do not anchor
+ graphics to page as this will make the graphics turn up the wrong place in your document.
+ You are advised not to wrap text around graphics as this is not exported to LaTeX anyway.
+ Also, do not use drawing objects inserted directly in the text (using the
+ Drawing toolbar). These will not be converted to LaTeX.
+ If you need to insert a drawing, insert an embedded Draw object (Insert - Object).
+
+
+ Tables: Avoid using cells spanning several rows, as this
+ is currently not supported. Cells spanning several columns are fully supported.
+
+
+ In general you should be aware that not all formatting is exported. The export of formatting
+ depends on the selected LaTeX format.
- About Writer4LaTeX
+ Introduction to Writer4LaTeXThe purpose of the Writer4LaTeX extension is to turn Writer into a frontend for LaTeX.
By installing Writer4LaTeX you will thus be available to author well-structured LaTeX documents using (almost) the full power of
@@ -41,9 +41,13 @@
LaTeX import
- You can import existing LaTeX documents into Writer.
- This feature uses Eitan M. Gurari's excellent TeX4ht system. Note however, that this doesn't mean that roundtrip
- editing %PRODUCTNAME Writer ↔ LaTeX is possible. The intended use of the import feature is to be able to work on documents
+ You can
+ import
+ existing LaTeX documents into Writer.
+ This feature uses Eitan M. Gurari's excellent
+ TeX4ht
+ system. Note however, that this feature doesn't make roundtrip
+ editing %PRODUCTNAME Writer ↔ LaTeX is possible. The intended use of the import feature to make it possible to work on documents
that were orginally authored in LaTeX.
diff --git a/source/oxt/writer4latex/help/en/org.openoffice.da.writer4latex.oxt/menu.xhp b/source/oxt/writer4latex/help/en/org.openoffice.da.writer4latex.oxt/menu.xhp
index e1c224c..7604af6 100644
--- a/source/oxt/writer4latex/help/en/org.openoffice.da.writer4latex.oxt/menu.xhp
+++ b/source/oxt/writer4latex/help/en/org.openoffice.da.writer4latex.oxt/menu.xhp
@@ -13,17 +13,20 @@
Run LaTeX...
- ...
- Run LaTeX
+ Convert the document to LaTeX and display the result in an external viewer.
+ You can configure the export in the dialog.
+ Run LaTeX and display the resultRun LaTeX directly
- ...
- Run LaTeX directly
+ Convert the document to LaTeX and display the result in an external viewer.
+ This command does not display the configuration dialog, but reuses the last settings.
+ Run LaTeX directly and display the resultView Log files
- ...
- View log files
+ In case of any problems in the conversion process, you can view the log files created by
+ LaTeX, MakeIndex and BibTeX here
+ View log files created by LaTeX, MakeIndex and BibTeXUsing the templatesThe article template
+
+ Choose File - New - Templates and Documents
+ This template contains a number of styles that corresponds to LaTeX code.
If you use these styles and makes sure to use the configuration W4L: Article when you convert your document
(this is selected automatically) with Writer2LaTeX, you will get a result that resembles a handwritten LaTeX file.
- Note that hard formatting and any other styles will be ignored. The available styles are summarized in the following table.
-
+ Note that hard formatting and any other styles will be ignored. The available styles are summarized in the following tables.
+ The use of italics in these tables indicates styles that are predefined in %PRODUCTNAME Writer.
+ The names of these styles will be localized if you use a non-english version of %PRODUCTNAME.
+ Paragraph styles
-
-
-
+ Note that also \maketitle is added at the end of a sequence of Title, author and date.
+ For the verbatim environment, only characters available in the input encoding are accepted.
+ Other characters are converted to question marks and other content is discarded, eg. footnotes.
+ Text styles
+
+ For the \verb command, only characters available in the input encoding are accepted.
+ Other characters are converted to question marks and other content is discarded, eg. footnotes.