Package parsing
Class LatexReplacer
Object
LatexReplacer
public class LatexReplacer
extends Object
LatexReplacer
contains tools regarding the use of LaTeX escapes. See method documentation for more details.-
Field Summary
Fields Modifier and Type Field Description static Map<Pattern,String>
encodings
Contains all encodingPattern
s and their replacement characters -
Method Summary
Modifier and Type Method Description static String
addEscapes(String input)
Adds LaTeX escapes to all operations that should be escaped, and topi
.static String
encodeAll(String input)
Performs all of the methods in this class on the input according to the settings inSettings
static String
encodeMappings(String input)
Replaces LaTeX-escaped encodings in a string with their actual special characters, as long as they aren't followed by an allowed name character
-
Field Details
-
encodings
public static final Map<Pattern,String> encodingsContains all encodingPattern
s and their replacement characters
-
-
Method Details
-
encodeAll
public static String encodeAll(String input)Performs all of the methods in this class on the input according to the settings inSettings
- Parameters:
input
- the input to be encoded- Returns:
- the encoded input
-
encodeMappings
public static String encodeMappings(String input)Replaces LaTeX-escaped encodings in a string with their actual special characters, as long as they aren't followed by an allowed name character- Parameters:
input
- a LaTeX-escaped string- Returns:
- the encoded string
-
addEscapes
public static String addEscapes(String input)Adds LaTeX escapes to all operations that should be escaped, and topi
.- Parameters:
input
- the unescaped input- Returns:
- the input with LaTeX escapes inserted as specified above
-