程序包 net.top_t

类 LaTexConvert

java.lang.Object
net.top_t.LaTexConvert

public class LaTexConvert
extends java.lang.Object
LaTextConvert used to convert LaTex code
  • 字段概要

    字段
    修饰符和类型 字段 说明
    private static int EPS  
    private static int PDF  
    private static int PS  
  • 构造器概要

    构造器
    构造器 说明
    LaTexConvert()  
  • 方法概要

    修饰符和类型 方法 说明
    static java.lang.String latexToSvgCode​(java.lang.String latex, boolean fontAsShapes, boolean bkgTransparent)
    convert LaTex code to .svg code
    static void main​(java.lang.String[] args)  
    private static void svgTo​(java.lang.String latexCode, boolean fontAsShapes, boolean bkgTransparent, int type, java.io.File output)
    convert LaTex code to given file type. support PDF/PS/EPS file
    static void toEps​(java.lang.String latexCode, boolean fontAsShapes, boolean bkgTransparent, java.io.File epsFile)
    convert LaTex code to eps file
    static void toPdf​(java.lang.String latexCode, boolean fontAsShapes, boolean bkgTransparent, java.io.File pdfFile)
    convert LaTex code to a .pdf file
    static void toPngFile​(java.lang.String latexString, java.io.File pngFile, boolean isTransparent)
    convert LaTex code to .png file
    static void toPs​(java.lang.String latexCode, boolean fontAsShapes, boolean bkgTransparent, java.io.File psFile)
    convert LaTex code to ps file
    static void toSvgFile​(java.lang.String latexCode, boolean fontAsShapes, boolean bkgTransparent, java.io.File svgFile)
    convert LaTex code to .svg file

    从类继承的方法 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 字段详细资料

  • 构造器详细资料

    • LaTexConvert

      public LaTexConvert()
  • 方法详细资料

    • latexToSvgCode

      public static java.lang.String latexToSvgCode​(java.lang.String latex, boolean fontAsShapes, boolean bkgTransparent) throws java.io.IOException
      convert LaTex code to .svg code
      参数:
      latex - LaTex code
      fontAsShapes - use shape
      bkgTransparent - if set background color to be transparent
      返回:
      抛出:
      java.io.IOException
    • toSvgFile

      public static void toSvgFile​(java.lang.String latexCode, boolean fontAsShapes, boolean bkgTransparent, java.io.File svgFile)
      convert LaTex code to .svg file
      参数:
      latexCode - LaTex formula
      fontAsShapes - font as shapes
      bkgTransparent - set background to be transparent
      svgFile -
    • toPngFile

      public static void toPngFile​(java.lang.String latexString, java.io.File pngFile, boolean isTransparent) throws java.io.IOException
      convert LaTex code to .png file
      参数:
      latexString - LaTex formula
      pngFile - File object, where the png file will be stored to
      isTransparent - set the background color to be transparent
      抛出:
      java.io.IOException
    • toPdf

      public static void toPdf​(java.lang.String latexCode, boolean fontAsShapes, boolean bkgTransparent, java.io.File pdfFile) throws org.apache.batik.transcoder.TranscoderException, java.io.IOException
      convert LaTex code to a .pdf file
      参数:
      latexCode - LaTex code
      fontAsShapes - it can be set to true/false
      bkgTransparent - background color is transparent or not
      pdfFile - File object of PDF
      抛出:
      org.apache.batik.transcoder.TranscoderException
      java.io.IOException
    • toPs

      public static void toPs​(java.lang.String latexCode, boolean fontAsShapes, boolean bkgTransparent, java.io.File psFile) throws java.io.IOException, org.apache.batik.transcoder.TranscoderException
      convert LaTex code to ps file
      参数:
      latexCode - LaTex code
      fontAsShapes - it can be set to true/false
      bkgTransparent - background color is transparent or not
      psFile - File object of ps
      抛出:
      java.io.IOException
      org.apache.batik.transcoder.TranscoderException
    • toEps

      public static void toEps​(java.lang.String latexCode, boolean fontAsShapes, boolean bkgTransparent, java.io.File epsFile) throws java.io.IOException, org.apache.batik.transcoder.TranscoderException
      convert LaTex code to eps file
      参数:
      latexCode - LaTex code
      fontAsShapes - it can be set to true/false
      bkgTransparent - background color is transparent or not
      epsFile - file object of eps
      抛出:
      java.io.IOException
      org.apache.batik.transcoder.TranscoderException
    • svgTo

      private static void svgTo​(java.lang.String latexCode, boolean fontAsShapes, boolean bkgTransparent, int type, java.io.File output) throws java.io.IOException, org.apache.batik.transcoder.TranscoderException
      convert LaTex code to given file type. support PDF/PS/EPS file
      参数:
      latexCode - LaTex code
      fontAsShapes - it can be set to true/false
      bkgTransparent - background color is transparent or not
      type - file type of PDF, PS, EPS
      output - file of output
      抛出:
      java.io.IOException
      org.apache.batik.transcoder.TranscoderException
    • main

      public static void main​(java.lang.String[] args)