info.bliki.wiki.filter
Class LaTeXConverter

java.lang.Object
  extended by info.bliki.wiki.filter.LaTeXConverter
All Implemented Interfaces:
ITextConverter

public class LaTeXConverter
extends java.lang.Object
implements ITextConverter

A converter which renders the internal node representation as LaTeX text


Field Summary
static java.lang.String[] CHAR_REPLACEMENTS
          Escaped characters which can be used inside LaTeX
static java.lang.String CHARS_TO_REPLACE
          Original chars which have to be escaped, because they have a special meaning in LaTeX
static java.lang.String[] STRING_REPLACEMENTS
           
static java.lang.String[] STRINGS_TO_REPLACE
          replacements for whole Strings
static java.lang.String TEMP_BRACES
           
 
Constructor Summary
LaTeXConverter()
           
 
Method Summary
 void imageNodeToText(TagNode imageTagNode, ImageFormat imageFormat, java.lang.Appendable resultBuffer, IWikiModel model)
          Convert the imageTagNode into a given HTML string buffer
 void nodesToText(java.util.List<BaseToken> nodes, java.lang.Appendable resultBuffer, IWikiModel model)
          Convert the list of TagTokens into a given HTML string buffer
 boolean noLinks()
          If this method returns true, then the <a> tag should only render the title of the link and not a link to another HTML document, but only the link text.
static java.lang.String texEscapeString(java.lang.String s)
          Escapes characters or whole strings that otherwise have a special meaning in tex.
static java.lang.String verbToText(java.lang.String s)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TEMP_BRACES

public static final java.lang.String TEMP_BRACES
See Also:
Constant Field Values

CHAR_REPLACEMENTS

public static final java.lang.String[] CHAR_REPLACEMENTS
Escaped characters which can be used inside LaTeX


CHARS_TO_REPLACE

public static final java.lang.String CHARS_TO_REPLACE
Original chars which have to be escaped, because they have a special meaning in LaTeX

See Also:
Constant Field Values

STRING_REPLACEMENTS

public static final java.lang.String[] STRING_REPLACEMENTS

STRINGS_TO_REPLACE

public static final java.lang.String[] STRINGS_TO_REPLACE
replacements for whole Strings

Constructor Detail

LaTeXConverter

public LaTeXConverter()
Method Detail

nodesToText

public void nodesToText(java.util.List<BaseToken> nodes,
                        java.lang.Appendable resultBuffer,
                        IWikiModel model)
                 throws java.io.IOException
Description copied from interface: ITextConverter
Convert the list of TagTokens into a given HTML string buffer

Specified by:
nodesToText in interface ITextConverter
Parameters:
nodes - list of TagToken
resultBuffer - the rendered HTML string
model - the current wiki model
Throws:
java.io.IOException

imageNodeToText

public void imageNodeToText(TagNode imageTagNode,
                            ImageFormat imageFormat,
                            java.lang.Appendable resultBuffer,
                            IWikiModel model)
                     throws java.io.IOException
Description copied from interface: ITextConverter
Convert the imageTagNode into a given HTML string buffer

Specified by:
imageNodeToText in interface ITextConverter
Parameters:
imageTagNode - the tag which carries the imageFormat wiki object as an object attribute
resultBuffer - the rendered HTML string
model - the current wiki model
Throws:
java.io.IOException

verbToText

public static java.lang.String verbToText(java.lang.String s)
Returns:
The String 's' with all special characters escaped and linebreaks converted to "\\"

texEscapeString

public static java.lang.String texEscapeString(java.lang.String s)
Escapes characters or whole strings that otherwise have a special meaning in tex.


noLinks

public boolean noLinks()
Description copied from interface: ITextConverter
If this method returns true, then the <a> tag should only render the title of the link and not a link to another HTML document, but only the link text.

Specified by:
noLinks in interface ITextConverter
Returns: