SnuggleSession (e.g. SnuggleSession#buildDOMSubtree(org.w3c.dom.Element)
| Modifier and Type | Class and Description |
|---|---|
| public static enum | DOMOutputOptions.
Enumerates the various options for representing |
| Modifier and Type | Field and Description |
|---|---|
| private boolean | addingMathSourceAnnotations
Set to true to annotate MathML elements with the original SnuggleTeX source. |
| private boolean | applyingFirefox3SemanticsWorkaround
Set to true to apply a workaround to the MathML to make it render better in Firefox 3
whenever |
| public static final String | DEFAULT_MATHML_PREFIX
Default prefix to use if/when prefixing MathML elements |
| public static final String | DEFAULT_SNUGGLETEX_XML_PREFIX
Default prefix to use if/when prefixing SnuggleTeX XML elements |
| public static final String | DEFAULT_XHTML_PREFIX
Default prefix to use if/when prefixing XHTML elements |
| private DOMPostProcessor[] | domPostProcessors
List of optional |
| private DOMOutputOptions. | errorOutputOptions
Specifies how errors should be represented in the resulting DOM. |
| private Properties | inlineCSSProperties
If non-null, then the given |
| private boolean | inliningCSS
Set to true to inline CSS styling (i.e. uses style attributes). |
| private LinkResolver | linkResolver
Optional helper to "resolve" (i.e. munge) any XHTML links found during page creation. |
| private String | mathMLPrefix
Prefix to use when prefixing MathML element names. |
| private boolean | mathVariantMapping
Set to true to perform automatic mappings of (safe) Unicode characters when applying "stylings" like \\mathcal and \\mathbb. |
| private boolean | prefixingMathML
Set to true if you want MathML element names to be prefixed. |
| private boolean | prefixingSnuggleXML
Set to true if you want any SnuggleTeX-specific XML elements, such as error messages and certain MathML annotations to be prefixed. |
| private boolean | prefixingXHTML
Set to true if you want XHTML element names to be prefixed. |
| private String | snuggleXMLPrefix
Prefix to use when prefixing SnuggleTeX-specific XML element names. |
| private String | xhtmlPrefix
Prefix to use when prefixing XHTML element names. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | addDOMPostProcessors(DOMPostProcessor...
array of domPostProcessors)DOMPostProcessor to append to currently specified
DOMPostProcessors, which may be empty.Appends to the currently specified |
| public Object | |
| public DOMPostProcessor[] | getDOMPostProcessors()
Returns the array of |
| public DOMOutputOptions. | getErrorOutputOptions()
Gets the current |
| public Properties | getInlineCSSProperties()
Gets the |
| public LinkResolver | getLinkResolver()
Gets the currently specified "link resolver" which can fix up any XHTML links created by certain LaTeX inputs. |
| public String | |
| public String | getSnuggleXMLPrefix()
Gets the prefix to use for custom SnuggleTeX XML elements when |
| public String | |
| public boolean | |
| public boolean | isAddingMathSourceAnnotations()
Returns whether the MathML math elements generated by SnuggleTeX should be annotated with the LaTeX input used to generate them. |
| public boolean | Returns: true if applying the workaround described above when, false otherwise.Returns whether we should wrap "display math" MathML content within an additional <mstyle displaystyle="true">.... |
| public boolean | |
| public boolean | isMathVariantMapping()
Returns whether we should perform automatic mappings of (safe) Unicode characters when applying "stylings" like \\mathcal and \\mathbb. |
| public boolean | |
| public boolean | |
| public boolean | |
| public void | setAddingMathAnnotations(boolean addingMathSourceAnnotations)
Deprecated
Use
setAddingMathSourceAnnotations(boolean) instead
|
| public void | setAddingMathSourceAnnotations(boolean
set true to include source annotations, false
otherwise. addingMathSourceAnnotations)Sets whether the MathML math elements generated by SnuggleTeX should be annotated with the LaTeX input used to generate them. |
| public void | setApplyingFirefox3SemanticsWorkaround(boolean
true to applying the workaround described above when, false otherwise. applyingFirefox3SemanticsWorkaround)Specifies whether we should wrap "display math" MathML content within an additional <mstyle displaystyle="true">.... |
| public void | setDOMPostProcessors(DOMPostProcessor...
array of domPostProcessors)DOMPostProcessor to use, which may be empty.Sets the array of |
| public void | setErrorOutputOptions(DOMOutputOptions.
new errorOutputOptionsErrorOutputOptions, which must not be null.Sets the current |
| public void | setInlineCSSProperties(Properties
Properties file used to determine inline CSS properties, which
should be null if you want to use the SnuggleTeX defaults. inlineCSSProperties)Sets the |
| public void | setInliningCSS(boolean
true to inline CSS, false otherwise inliningCSS)Set whether CSS styling is to be inlined via style attributes or not. |
| public void | setLinkResolver(LinkResolver
new linkResolver)LinkResolver to use, which may be null to indicate you
want links left as-is.Sets the "link resolver" that will be given a chance to fix up any XHTML links created by certain LaTeX inputs. |
| public void | setMathMLPrefix(String
desired prefix, which must be non-null and a valid XML NCName. mathMLPrefix)Sets the prefix to use for MathML elements when |
| public void | setMathVariantMapping(boolean
set true to perform mappings, false otherwise. mathVariantMapping)Sets whether we should perform automatic mappings of (safe) Unicode characters when applying "stylings" like \\mathcal and \\mathbb. |
| public void | setPrefixingMathML(boolean
true to prefix MathML elements, false otherwise. prefixingMathML)Sets whether MathML elements should be prefixed or not. |
| public void | setPrefixingSnuggleXML(boolean
true to prefix custom SnuggleTeX XML elements, false otherwise. prefixingSnuggleXML)Sets whether custom SnuggleTeX XML elements should be prefixed or not. |
| public void | setPrefixingXHTML(boolean
true to prefix XHTML elements, false otherwise. prefixingXHTML)Sets whether XHTML elements should be prefixed or not. |
| public void | setSnuggleXMLPrefix(String
desired prefix, which must be non-null and a valid XML NCName. snuggleXMLPrefix)Sets the prefix to use for custom SnuggleTeX XML elements when |
| public void | setXHTMLPrefix(String
desired prefix, which must be non-null and a valid XML NCName. xhtmlPrefix)Sets the prefix to use for XHTML elements when |
| addingMathSourceAnnotations | back to summary |
|---|---|
| private boolean addingMathSourceAnnotations Set to true to annotate MathML elements with the original SnuggleTeX source. | |
| applyingFirefox3SemanticsWorkaround | back to summary |
|---|---|
| private boolean applyingFirefox3SemanticsWorkaround Set to true to apply a workaround to the MathML to make it render better in Firefox 3
whenever | |
| DEFAULT_MATHML_PREFIX | back to summary |
|---|---|
| public static final String DEFAULT_MATHML_PREFIX Default prefix to use if/when prefixing MathML elements | |
| DEFAULT_SNUGGLETEX_XML_PREFIX | back to summary |
|---|---|
| public static final String DEFAULT_SNUGGLETEX_XML_PREFIX Default prefix to use if/when prefixing SnuggleTeX XML elements | |
| DEFAULT_XHTML_PREFIX | back to summary |
|---|---|
| public static final String DEFAULT_XHTML_PREFIX Default prefix to use if/when prefixing XHTML elements | |
| domPostProcessors | back to summary |
|---|---|
| private DOMPostProcessor[] domPostProcessors List of optional
One use of this is by registering a The SnuggleTeX Up-Conversion module also includes an "UpConvertingPostProcessor" that may be used here as well.
| |
| errorOutputOptions | back to summary |
|---|---|
| private DOMOutputOptions. Specifies how errors should be represented in the resulting DOM. | |
| inlineCSSProperties | back to summary |
|---|---|
| private Properties inlineCSSProperties If non-null, then the given | |
| inliningCSS | back to summary |
|---|---|
| private boolean inliningCSS Set to true to inline CSS styling (i.e. uses style attributes). This is useful if your output is going to end up embedded in someone else's page or in a system where you have no control over stylesheets. | |
| linkResolver | back to summary |
|---|---|
| private LinkResolver linkResolver Optional helper to "resolve" (i.e. munge) any XHTML links found during page creation. This may be useful if generating a set of hyperlinked pages. | |
| mathMLPrefix | back to summary |
|---|---|
| private String mathMLPrefix Prefix to use when prefixing MathML element names.
Only used if
Default is | |
| mathVariantMapping | back to summary |
|---|---|
| private boolean mathVariantMapping Set to true to perform automatic mappings of (safe) Unicode characters when applying "stylings" like \\mathcal and \\mathbb. Doing this can help if you don't have control over CSS and if clients may not have appropriate fonts installed as it forces the mapping of certain characters to glyphs that may be available. (Firefox by default does not change fonts for these cases as it is not clear what font to map to so setting this to true can help with some characters.) Todo Revisit how best to do mathvariant with Firefox. | |
| prefixingMathML | back to summary |
|---|---|
| private boolean prefixingMathML Set to true if you want MathML element names to be prefixed. If false, then the default namespace is changed when entering a MathML element scope. Default is false. | |
| prefixingSnuggleXML | back to summary |
|---|---|
| private boolean prefixingSnuggleXML Set to true if you want any SnuggleTeX-specific XML elements, such as error messages and certain MathML annotations to be prefixed. If false, then the default namespace is changed when entering the scope of these elements. Default is false. | |
| prefixingXHTML | back to summary |
|---|---|
| private boolean prefixingXHTML Set to true if you want XHTML element names to be prefixed. If false, then the default namespace is changed when entering an XHTML element scope. Default is false. | |
| snuggleXMLPrefix | back to summary |
|---|---|
| private String snuggleXMLPrefix Prefix to use when prefixing SnuggleTeX-specific XML element names.
Only used if (Note that this currently has no effect on any SnuggleTeX elements generated within MathML elements.)
Default is | |
| xhtmlPrefix | back to summary |
|---|---|
| private String xhtmlPrefix Prefix to use when prefixing XHTML element names.
Only used if
Default is | |
| DOMOutputOptions | back to summary |
|---|---|
| public DOMOutputOptions() | |
| addDOMPostProcessors | back to summary |
|---|---|
| public void addDOMPostProcessors(DOMPostProcessor... domPostProcessors) Appends to the currently specified
| |
| clone | back to summary |
|---|---|
| public Object clone() Overrides java. Doc from java. Creates and returns a copy of this object. The precise meaning
of "copy" may depend on the class of the object. The general
intent is that, for any object will be true, and that the expression:x.clone() != x will bex.clone().getClass() == x.getClass() true, but these are not absolute requirements.
While it is typically the case that:
will bex.clone().equals(x) true, this is not an absolute requirement.
By convention, the returned object should be obtained by calling
By convention, the object returned by this method should be independent
of this object (which is being cloned). To achieve this independence,
it may be necessary to modify one or more fields of the object returned
by
| |
| getDOMPostProcessors | back to summary |
|---|---|
| public DOMPostProcessor[] getDOMPostProcessors() Returns the array of The default is null, which is treated the same as an empty array here.
One use of this is by registering a The SnuggleTeX Up-Conversion module also includes an "UpConvertingPostProcessor" that may be used here as well.
| |
| getErrorOutputOptions | back to summary |
|---|---|
| public DOMOutputOptions. Gets the current | |
| getInlineCSSProperties | back to summary |
|---|---|
| public Properties getInlineCSSProperties() Gets the | |
| getLinkResolver | back to summary |
|---|---|
| public LinkResolver getLinkResolver() Gets the currently specified "link resolver" which can fix up any XHTML links created by certain LaTeX inputs. Default is null, which does nothing. | |
| getMathMLPrefix | back to summary |
|---|---|
| public String getMathMLPrefix() Gets the prefix to use for MathML elements when | |
| getSnuggleXMLPrefix | back to summary |
|---|---|
| public String getSnuggleXMLPrefix() Gets the prefix to use for custom SnuggleTeX XML elements when | |
| getXHTMLPrefix | back to summary |
|---|---|
| public String getXHTMLPrefix() Gets the prefix to use for XHTML elements when | |
| isAddingMathAnnotations | back to summary |
|---|---|
| public boolean isAddingMathAnnotations()
Deprecated Use
| |
| isAddingMathSourceAnnotations | back to summary |
|---|---|
| public boolean isAddingMathSourceAnnotations() Returns whether the MathML math elements generated by SnuggleTeX should be annotated with the LaTeX input used to generate them. Default is false. | |
| isApplyingFirefox3SemanticsWorkaround | back to summary |
|---|---|
| public boolean isApplyingFirefox3SemanticsWorkaround() Returns whether we should wrap "display math" MathML content within an additional
<mstyle displaystyle="true">....</mstyle> wrapper when generating
annotated MathML when This is a workaround for Bug 468059 which first seemed to appear in Firefox 3 and MathML within semantics elements to effectively ignore any display="block" attribute on the enclosing MathML element.
This property is ignored if Use this if having annotations and good rendering in Firefox 3 is important to you.
| |
| isInliningCSS | back to summary |
|---|---|
| public boolean isInliningCSS() Get whether CSS styling is being inlined via style attributes or not. This is useful if your output is going to end up embedded in someone else's page or in a system where you have no control over stylesheets. The default is false. | |
| isMathVariantMapping | back to summary |
|---|---|
| public boolean isMathVariantMapping() Returns whether we should perform automatic mappings of (safe) Unicode characters when applying "stylings" like \\mathcal and \\mathbb. Doing this can help if you don't have control over CSS and if clients may not have appropriate fonts installed as it forces the mapping of certain characters to glyphs that may be available. (Firefox by default does not change fonts for these cases as it is not clear what font to map to so setting this to true can help with some characters.) Default is false. | |
| isPrefixingMathML | back to summary |
|---|---|
| public boolean isPrefixingMathML() Returns whether MathML elements should be prefixed or not. Default is false. | |
| isPrefixingSnuggleXML | back to summary |
|---|---|
| public boolean isPrefixingSnuggleXML() Returns whether custom SnuggleTeX XML elements should be prefixed or not. Default is false. | |
| isPrefixingXHTML | back to summary |
|---|---|
| public boolean isPrefixingXHTML() Returns whether XHTML elements should be prefixed or not. Default is false. | |
| setAddingMathAnnotations | back to summary |
|---|---|
| public void setAddingMathAnnotations(boolean addingMathSourceAnnotations)
Deprecated Use
| |
| setAddingMathSourceAnnotations | back to summary |
|---|---|
| public void setAddingMathSourceAnnotations(boolean addingMathSourceAnnotations) Sets whether the MathML math elements generated by SnuggleTeX should be annotated with the LaTeX input used to generate them.
| |
| setApplyingFirefox3SemanticsWorkaround | back to summary |
|---|---|
| public void setApplyingFirefox3SemanticsWorkaround(boolean applyingFirefox3SemanticsWorkaround) Specifies whether we should wrap "display math" MathML content within an additional
<mstyle displaystyle="true">....</mstyle> wrapper when generating
annotated MathML when This is a workaround for Bug 468059 which first seemed to appear in Firefox 3 and MathML within semantics elements to effectively ignore any display="block" attribute on the enclosing MathML element.
This property is ignored if Use this if having annotations and good rendering in Firefox 3 is important to you.
| |
| setDOMPostProcessors | back to summary |
|---|---|
| public void setDOMPostProcessors(DOMPostProcessor... domPostProcessors) Sets the array of
One use of this is by registering a The SnuggleTeX Up-Conversion module also includes an "UpConvertingPostProcessor" that may be used here as well.
| |
| setErrorOutputOptions | back to summary |
|---|---|
| public void setErrorOutputOptions(DOMOutputOptions. Sets the current
| |
| setInlineCSSProperties | back to summary |
|---|---|
| public void setInlineCSSProperties(Properties inlineCSSProperties) Sets the
| |
| setInliningCSS | back to summary |
|---|---|
| public void setInliningCSS(boolean inliningCSS) Set whether CSS styling is to be inlined via style attributes or not. This is useful if your output is going to end up embedded in someone else's page or in a system where you have no control over stylesheets.
| |
| setLinkResolver | back to summary |
|---|---|
| public void setLinkResolver(LinkResolver linkResolver) Sets the "link resolver" that will be given a chance to fix up any XHTML links created by certain LaTeX inputs.
| |
| setMathMLPrefix | back to summary |
|---|---|
| public void setMathMLPrefix(String mathMLPrefix) Sets the prefix to use for MathML elements when
| |
| setMathVariantMapping | back to summary |
|---|---|
| public void setMathVariantMapping(boolean mathVariantMapping) Sets whether we should perform automatic mappings of (safe) Unicode characters when applying "stylings" like \\mathcal and \\mathbb. Doing this can help if you don't have control over CSS and if clients may not have appropriate fonts installed as it forces the mapping of certain characters to glyphs that may be available. (Firefox by default does not change fonts for these cases as it is not clear what font to map to so setting this to true can help with some characters.)
| |
| setPrefixingMathML | back to summary |
|---|---|
| public void setPrefixingMathML(boolean prefixingMathML) Sets whether MathML elements should be prefixed or not.
| |
| setPrefixingSnuggleXML | back to summary |
|---|---|
| public void setPrefixingSnuggleXML(boolean prefixingSnuggleXML) Sets whether custom SnuggleTeX XML elements should be prefixed or not.
| |
| setPrefixingXHTML | back to summary |
|---|---|
| public void setPrefixingXHTML(boolean prefixingXHTML) Sets whether XHTML elements should be prefixed or not.
| |
| setSnuggleXMLPrefix | back to summary |
|---|---|
| public void setSnuggleXMLPrefix(String snuggleXMLPrefix) Sets the prefix to use for custom SnuggleTeX XML elements when
| |
| setXHTMLPrefix | back to summary |
|---|---|
| public void setXHTMLPrefix(String xhtmlPrefix) Sets the prefix to use for XHTML elements when
| |
InputErrors in the resulting
DOM.
| Modifier and Type | Field and Description |
|---|---|
| public static final DOMOutputOptions. | NO_OUTPUT
No error information is appended to the DOM. |
| public static final DOMOutputOptions. | XHTML
Each error is marked up as an XHTML div element associated to the error CSS class. |
| public static final DOMOutputOptions. | XML_FULL
Full error information is appended to the DOM as a text XML element containing the error code (as an attribute) plus full textual information of the error's location. |
| public static final DOMOutputOptions. | XML_SHORT
Basic error information is appended to the DOM as an empty XML element containing just the error code. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static DOMOutputOptions. | |
| public static DOMOutputOptions. |
| NO_OUTPUT | back to summary |
|---|---|
| public static final DOMOutputOptions. No error information is appended to the DOM. (Clients can still get at error information
via | |
| XHTML | back to summary |
|---|---|
| public static final DOMOutputOptions. Each error is marked up as an XHTML div element associated to the error CSS class. Errors occurring inside MathML expressions will be represented by a merror placeholder, with a full XHTML element appended immediately after the MathML. | |
| XML_FULL | back to summary |
|---|---|
| public static final DOMOutputOptions. Full error information is appended to the DOM as a text XML element containing the error code (as an attribute) plus full textual information of the error's location. | |
| XML_SHORT | back to summary |
|---|---|
| public static final DOMOutputOptions. Basic error information is appended to the DOM as an empty XML element containing just the error code. | |
| ErrorOutputOptions | back to summary |
|---|---|
| private ErrorOutputOptions() | |
| valueOf | back to summary |
|---|---|
| public static DOMOutputOptions. | |
| values | back to summary |
|---|---|
| public static DOMOutputOptions. | |