java.lang.Object
be.kuleuven.cs.distrinet.sparta.io.util.LaTeX

public class LaTeX extends Object
Util class to perform some LaTeX escaping for exporting.
  • Constructor Details

    • LaTeX

      public LaTeX()
  • Method Details

    • ltxEscape

      public static Function<String,String> ltxEscape(String e, String r)
      Helper function to construct a function to escape a latex sequence. This function can then be concatenated or applied to strings that require escaping.
      Parameters:
      e - The pattern that must be escaped.
      r - The replacement.
      Returns:
    • latexEscape

      public static String latexEscape(String text)
      Escape the LaTeX characters in the provided text. Currently \,_,invalid input: '&',$,%,#,{,}, and ~ are escaped.
      Parameters:
      text - the text which requires escaping.
      Returns:
      The escaped text.