Class JaxoGreek

java.lang.Object
net.sf.jaxodraw.util.JaxoGreek

public final class JaxoGreek extends Object
Defines a number of greek letters and some methods to convert them into LaTeX strings and back.
Since:
2.0
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final char
    The greek letter alpha.
    static final char
    The greek letter beta.
    static final char
    The greek letter chi.
    static final char
    The greek letter delta.
    static final char
    The greek letter epsilon.
    static final char
    The greek letter eta.
    static final char
    The greek letter gamma.
    static final char
    The greek letter iota.
    static final char
    The greek letter kappa.
    static final char
    The greek letter lambda.
    static final char
    The greek letter mu.
    static final char
    The greek letter nu.
    static final char
    The greek letter omega.
    static final char
    The greek letter omikron.
    static final char
    The greek letter phi.
    static final char
    The greek letter pi.
    static final char
    The greek letter psi.
    static final char
    The greek letter rho.
    static final char
    The greek letter sigma.
    static final char
    The greek letter tau.
    static final char
    The greek letter theta.
    static final char
    The greek upper case letter delta.
    static final char
    The greek upper case letter gamma.
    static final char
    The greek upper case letter lambda.
    static final char
    The greek upper case letter omega.
    static final char
    The greek upper case letter phi.
    static final char
    The greek upper case letter pi.
    static final char
    The greek upper case letter psi.
    static final char
    The greek upper case letter sigma.
    static final char
    The greek upper case letter theta.
    static final char
    The greek upper case letter xi.
    static final char
    The greek letter upsilon.
    static final char
    The greek letter phi (corresponding to LaTeX's \varphi).
    static final char
    The greek letter sigma (corresponding to LaTeX's \varsigma).
    static final char
    The greek letter theta (corresponding to LaTeX's \vartheta).
    static final char
    The greek letter xi.
    static final char
    The greek letter zeta.
  • Method Summary

    Modifier and Type
    Method
    Description
    static char
    Returns the greek character whose LaTex command is s.
    static String
    Gets the LaTeX command for the greek character a.
    static boolean
    Tests whether the given character corresponds to one of the greek characters defined in this class.
    static boolean
    Tests whether the given latex command corresponds to one of the greek characters defined in this class.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Method Details

    • getLatexCommand

      public static String getLatexCommand(char a)
      Gets the LaTeX command for the greek character a.
      Parameters:
      a - The greek character whose LaTex command is to be returned.
      Returns:
      The LaTeX command of the greek character a or null if a does not correspond to any greek character.
    • getCharacter

      public static char getCharacter(String command)
      Returns the greek character whose LaTex command is s.
      Parameters:
      command - The LaTeX command whose corresponding greek character is to be returned.
      Returns:
      The greek character corresponding to the LaTex command or '' (NUL) if command does not correspond to any greek character.
    • isGreekCharacter

      public static boolean isGreekCharacter(char a)
      Tests whether the given character corresponds to one of the greek characters defined in this class.
      Parameters:
      a - A character.
      Returns:
      True if a corresponds to one of the greek characters defined in this class, false otherwise.
    • isLatexCommand

      public static boolean isLatexCommand(String command)
      Tests whether the given latex command corresponds to one of the greek characters defined in this class.
      Parameters:
      command - a latex string (\\alpha etc.)
      Returns:
      True if command corresponds to one of the greek characters defined in this class, false otherwise.