Class NoteConverter
This class handles conversion of footnotes and endnotes, including
references. It takes advantage of the packages endnotes.sty
and perpage.sty
if allowed in the configuration.
-
Field Summary
Fields inherited from class writer2latex.latex.ConverterHelper
config, ofr, palette
-
Constructor Summary
ConstructorsConstructorDescriptionNoteConverter
(OfficeReader ofr, LaTeXConfig config, ConverterPalette palette) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addEndnoteName
(String sName) Add an endnote name.void
addFootnoteName
(String sName) Add a footnote name.void
Append declarations needed by theNoteConverter
to the preamble.void
flushFootnotes
(LaTeXDocumentPortion ldp, Context oc) Flush the queue of postponed footnotesvoid
handleEndnote
(Element node, LaTeXDocumentPortion ldp, Context oc) Process an endnote (text:endnote tag)void
handleEndnoteRef
(Element node, LaTeXDocumentPortion ldp, Context oc) Process an endnote reference (text:endnote-ref tag)void
handleFootnote
(Element node, LaTeXDocumentPortion ldp, Context oc) Process a footnote (text:footnote tag)void
handleFootnoteRef
(Element node, LaTeXDocumentPortion ldp, Context oc) Process a footnote reference (text:footnote-ref tag)void
handleNoteRef
(Element node, LaTeXDocumentPortion ldp, Context oc) Process a note reference (text:note-ref tag, oasis)void
Insert the endnotes into the documents.
-
Constructor Details
-
NoteConverter
-
-
Method Details
-
appendDeclarations
Append declarations needed by the
NoteConverter
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.
-
handleFootnote
Process a footnote (text:footnote tag)
- Parameters:
node
- The element containing the footnoteldp
- theLaTeXDocumentPortion
to which LaTeX code should be addedoc
- the current context
-
flushFootnotes
Flush the queue of postponed footnotes -
handleEndnote
Process an endnote (text:endnote tag)
- Parameters:
node
- The element containing the endnoteldp
- theLaTeXDocumentPortion
to which LaTeX code should be addedoc
- the current context
-
insertEndnotes
Insert the endnotes into the documents.
- Parameters:
ldp
- theLaTeXDocumentPortion
to which the endnotes should be added.
-
handleNoteRef
Process a note reference (text:note-ref tag, oasis)
- Parameters:
node
- The element containing the note referenceldp
- theLaTeXDocumentPortion
to which LaTeX code should be addedoc
- the current context
-
handleFootnoteRef
Process a footnote reference (text:footnote-ref tag)
- Parameters:
node
- The element containing the footnote referenceldp
- theLaTeXDocumentPortion
to which LaTeX code should be addedoc
- the current context
-
handleEndnoteRef
Process an endnote reference (text:endnote-ref tag)
- Parameters:
node
- The element containing the endnote referenceldp
- theLaTeXDocumentPortion
to which LaTeX code should be addedoc
- the current context
-
addFootnoteName
Add a footnote name. The method
handleFootnote
includes a\label
only if the footnote name is already known to theNoteConverter
. Hence this method is invoked by the prepass for each footnote reference. The end result is, that only necessary labels will be included.- Parameters:
sName
- the name (id) of the footnote
-
addEndnoteName
Add an endnote name. The method
handleEndnote
includes a\label
only if the endnote name is already known to theNoteConverter
. Hence this method is invoked by the prepass for each endnote reference. The end result is, that only necessary labels will be included.- Parameters:
sName
- the name (id) of the endnote
-