Package writer2latex.latex
Class IndexConverter
- java.lang.Object
-
- writer2latex.latex.ConverterHelper
-
- writer2latex.latex.IndexConverter
-
public class IndexConverter extends ConverterHelper
This class handles indexes (table of contents, list of tables, list of illustrations, object index, user index, alphabetical index) as well as their associated index marks.
-
-
Field Summary
-
Fields inherited from class writer2latex.latex.ConverterHelper
config, ofr, palette
-
-
Constructor Summary
Constructors Constructor Description IndexConverter(OfficeReader ofr, LaTeXConfig config, ConverterPalette palette)
Construct a newIndexConverter
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
appendDeclarations(LaTeXDocumentPortion pack, LaTeXDocumentPortion decl)
Append declarations needed by theIndexConverter
to the preamble.void
flushIndexMarks(LaTeXDocumentPortion ldp, Context oc)
void
handleAlphabeticalIndex(org.w3c.dom.Element node, LaTeXDocumentPortion ldp, Context oc)
Process Alphabetical Index (text:alphabetical-index tag)void
handleAlphabeticalIndexMark(org.w3c.dom.Element node, LaTeXDocumentPortion ldp, Context oc)
Process an Alphabetical Index Mark (text:alphabetical-index-mark{-start} tag)void
handleLOF(org.w3c.dom.Element node, LaTeXDocumentPortion ldp, Context oc)
Process List of Illustrations (text:list-of-illustrations tag)void
handleLOT(org.w3c.dom.Element node, LaTeXDocumentPortion ldp, Context oc)
Process List of Tables (text:list-of-tables tag)void
handleObjectIndex(org.w3c.dom.Element node, LaTeXDocumentPortion ldp, Context oc)
Process Object Index (text:object index tag)void
handleTOC(org.w3c.dom.Element node, LaTeXDocumentPortion ldp, Context oc)
Process Table of Contents (text:table-of-content tag)void
handleUserIndex(org.w3c.dom.Element node, LaTeXDocumentPortion ldp, Context oc)
Process User Index (text:user-index tag)boolean
hasPendingIndexMarks(Context oc)
Do we have any pending index marks, that may be inserted in this context?
-
-
-
Constructor Detail
-
IndexConverter
public IndexConverter(OfficeReader ofr, LaTeXConfig config, ConverterPalette palette)
Construct a new
IndexConverter
.- Parameters:
config
- the configuration to usepalette
- theConverterPalette
to link to if such a document is created by theIndexConverter
-
-
Method Detail
-
appendDeclarations
public void appendDeclarations(LaTeXDocumentPortion pack, LaTeXDocumentPortion decl)
Append declarations needed by the
IndexConverter
to the preamble.- Overrides:
appendDeclarations
in classConverterHelper
- Parameters:
pack
- theLaTeXDocumentPortion
to which declarations of packages should be added (\\usepackage
).decl
- theLaTeXDocumentPortion
to which other declarations should be added.
-
handleTOC
public void handleTOC(org.w3c.dom.Element node, LaTeXDocumentPortion ldp, Context oc)
Process Table of Contents (text:table-of-content tag)- Parameters:
node
- The element containing the Table of Contentsldp
- theLaTeXDocumentPortion
to which LaTeX code should be addedoc
- the current context
-
handleLOF
public void handleLOF(org.w3c.dom.Element node, LaTeXDocumentPortion ldp, Context oc)
Process List of Illustrations (text:list-of-illustrations tag)- Parameters:
node
- The element containing the List of Illustrationsldp
- theLaTeXDocumentPortion
to which LaTeX code should be addedoc
- the current context
-
handleLOT
public void handleLOT(org.w3c.dom.Element node, LaTeXDocumentPortion ldp, Context oc)
Process List of Tables (text:list-of-tables tag)- Parameters:
node
- The element containing the List of Tablesldp
- theLaTeXDocumentPortion
to which LaTeX code should be addedoc
- the current context
-
handleObjectIndex
public void handleObjectIndex(org.w3c.dom.Element node, LaTeXDocumentPortion ldp, Context oc)
Process Object Index (text:object index tag)- Parameters:
node
- The element containing the Object Indexldp
- theLaTeXDocumentPortion
to which LaTeX code should be addedoc
- the current context
-
handleUserIndex
public void handleUserIndex(org.w3c.dom.Element node, LaTeXDocumentPortion ldp, Context oc)
Process User Index (text:user-index tag)- Parameters:
node
- The element containing the User Indexldp
- theLaTeXDocumentPortion
to which LaTeX code should be addedoc
- the current context
-
handleAlphabeticalIndex
public void handleAlphabeticalIndex(org.w3c.dom.Element node, LaTeXDocumentPortion ldp, Context oc)
Process Alphabetical Index (text:alphabetical-index tag)- Parameters:
node
- The element containing the Alphabetical Indexldp
- theLaTeXDocumentPortion
to which LaTeX code should be addedoc
- the current context
-
handleAlphabeticalIndexMark
public void handleAlphabeticalIndexMark(org.w3c.dom.Element node, LaTeXDocumentPortion ldp, Context oc)
Process an Alphabetical Index Mark (text:alphabetical-index-mark{-start} tag)- Parameters:
node
- The element containing the Markldp
- theLaTeXDocumentPortion
to which LaTeX code should be addedoc
- the current context
-
hasPendingIndexMarks
public boolean hasPendingIndexMarks(Context oc)
Do we have any pending index marks, that may be inserted in this context?- Parameters:
oc
- the context to verify against- Returns:
- true if there are pending index marks
-
flushIndexMarks
public void flushIndexMarks(LaTeXDocumentPortion ldp, Context oc)
-
-