w2l: Do not use string substitution or writing direction in math mode for XeTeX backend.Support cross references to list items.

git-svn-id: svn://svn.code.sf.net/p/writer2latex/code/trunk@135 f0f2a975-2e09-46c8-9428-3b39399b9f3c
This commit is contained in:
henrikjust 2012-02-27 14:07:52 +00:00
parent fdf0488bd7
commit 9cb0e43ef2
5 changed files with 49 additions and 19 deletions

View file

@ -16,11 +16,11 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
* Copyright: 2002-2011 by Henrik Just
* Copyright: 2002-2012 by Henrik Just
*
* All Rights Reserved.
*
* Version 1.2 (2011-07-25)
* Version 1.2 (2012-02-27)
*
*/
@ -788,6 +788,10 @@ public class FieldConverter extends ConverterHelper {
// This is safe if the bookmark is contained in a heading
ldp.append("\\ref{bkm:"+bookmarknames.getExportName(sName)+"}");
}
else if (("number".equals(sFormat) || "number-no-superior".equals(sFormat) || "number-all-superior".equals(sFormat)) &&
ofr.bookmarkInList(sName)) {
ldp.append("\\ref{bkm:"+bookmarknames.getExportName(sName)+"}");
}
else { // use current value
palette.getInlineCv().traversePCDATA(node,ldp,oc);
}

View file

@ -16,11 +16,11 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
* Copyright: 2002-2011 by Henrik Just
* Copyright: 2002-2012 by Henrik Just
*
* All Rights Reserved.
*
* Version 1.2 (2011-05-06)
* Version 1.2 (2012-02-27)
*
*/
@ -134,11 +134,16 @@ public class XeTeXI18n extends I18n {
* @return the LaTeX string
*/
public String convert(String s, boolean bMathMode, String sLang){
// TODO: Do we need anything special for math mode?
StringBuffer buf = new StringBuffer();
int nLen = s.length();
char c;
if (bUsePolyglossia) {
if (bMathMode) {
// No string replace or writing direction in math mode
for (int i=0; i<nLen; i++) {
convert(s.charAt(i),buf);
}
}
else if (bUsePolyglossia) {
int i = 0;
while (i<nLen) {
ReplacementTrieNode node = stringReplace.get(s,i,nLen);