writer2latex.latex.i18n
Class I18n
java.lang.Object
writer2latex.latex.i18n.I18n
public abstract class I18n
extends java.lang.Object
This abstract class takes care of i18n in the LaTeX export.
Since i18n is handled quite differently in LaTeX "Classic"
and XeTeX, we use two different classes
bAlwaysUseDefaultLang
protected boolean bAlwaysUseDefaultLang
bGreekMath
protected boolean bGreekMath
languages
protected HashSet languages
sDefaultLanguage
protected String sDefaultLanguage
I18n
public I18n(OfficeReader ofr,
LaTeXConfig config,
ConverterPalette palette)
Construct a new I18n as ConverterHelper
ofr
- the OfficeReader to get language information fromconfig
- the configuration which determines the symbols to usepalette
- the ConverterPalette (unused)
appendDeclarations
public abstract void appendDeclarations(LaTeXDocumentPortion pack,
LaTeXDocumentPortion decl)
Add declarations to the preamble to load the required packages
pack
- usepackage declarationsdecl
- other declarations
applyLanguage
public abstract void applyLanguage(StyleWithProperties style,
boolean bDecl,
boolean bInherit,
BeforeAfter ba)
Apply a language language
style
- the OOo style to read attributesfrombDecl
- true if declaration form is requiredbInherit
- true if inherited properties should be usedba
- the BeforeAfter
to add LaTeX code to.
convert
public abstract String convert(String s,
boolean bMathMode,
String sLang)
Convert a string of characters into LaTeX
s
- the source stringbMathMode
- true if the string should be rendered in math modesLang
- the iso language of the string
popSpecialTable
public abstract void popSpecialTable()
Pop a font from the font stack
pushSpecialTable
public abstract void pushSpecialTable(String sName)
Push a font to the font stack
sName
- the name of the font