LaTeX to CAS translator

Jump to navigation Jump to search

This mockup demonstrates the concept of TeX to Computer Algebra System (CAS) conversion.

The demo-application converts LaTeX functions which directly translate to CAS counterparts.

Functions without explicit CAS support are available for translation via a DRMF package (under development).

The following LaTeX input ...

{\displaystyle \begin{bmatrix} 1 & \frac{y_1 - y_2}{x_1 - x_2} \\ \frac{x_1 - x_3}{y_1 - y_3} & 1 \end{bmatrix} \begin{bmatrix} x_\circ \\ y_\circ \end{bmatrix} = \begin{bmatrix} \frac{x_1^2 - x_2^2 + y_1^2 - y_2^2}{2(x_1 - x_2)} \\ \frac{y_1^2 - y_3^2 + x_1^2 - x_3^2}{2(y_1 - y_3)} \end{bmatrix}. }

... is translated to the CAS output ...

Semantic latex: \begin{bmatrix} 1 & \frac{y_1 - y_2}{x_1 - x_2} \\ \frac{x_1 - x_3}{y_1 - y_3} & 1 \end{bmatrix} \begin{bmatrix} x_\circ \\ y_\circ \end{bmatrix} = \begin{bmatrix} \frac{x_1^2 - x_2^2 + y_1^2 - y_2^2}{2(x_1 - x_2)} \\ \frac{y_1^2 - y_3^2 + x_1^2 - x_3^2}{2(y_1 - y_3)} \end{bmatrix}

Confidence: 0

Mathematica

Translation:

Information

Symbol info

  • (LaTeX -> Mathematica) An unknown or missing element occurred: Reached unknown or not yet supported expression tag: matrix

Tests

Symbolic
Numeric

SymPy

Translation:

Information

Symbol info

  • (LaTeX -> SymPy) An unknown or missing element occurred: Reached unknown or not yet supported expression tag: matrix

Tests

Symbolic
Numeric

Maple

Translation:

Information

Symbol info

  • (LaTeX -> Maple) An unknown or missing element occurred: Reached unknown or not yet supported expression tag: matrix

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Is part of

Complete translation information:

{
  "id" : "FORMULA_106c4427ff15929b6caae83af4993ef2",
  "formula" : "\\begin{bmatrix} \n    1 & \\frac{y_1 - y_2}{x_1 - x_2} \\\\ \n    \\frac{x_1 - x_3}{y_1 - y_3} & 1 \n  \\end{bmatrix}\n  \\begin{bmatrix} x_\\circ \\\\ y_\\circ \\end{bmatrix}\n  = \n  \\begin{bmatrix}\n    \\frac{x_1^2 - x_2^2 + y_1^2 - y_2^2}{2(x_1 - x_2)} \\\\ \n    \\frac{y_1^2 - y_3^2 + x_1^2 - x_3^2}{2(y_1 - y_3)} \n  \\end{bmatrix}",
  "semanticFormula" : "\\begin{bmatrix} \n    1 & \\frac{y_1 - y_2}{x_1 - x_2} \\\\ \n    \\frac{x_1 - x_3}{y_1 - y_3} & 1 \n  \\end{bmatrix}\n  \\begin{bmatrix} x_\\circ \\\\ y_\\circ \\end{bmatrix}\n  = \n  \\begin{bmatrix}\n    \\frac{x_1^2 - x_2^2 + y_1^2 - y_2^2}{2(x_1 - x_2)} \\\\ \n    \\frac{y_1^2 - y_3^2 + x_1^2 - x_3^2}{2(y_1 - y_3)} \n  \\end{bmatrix}",
  "confidence" : 0.0,
  "translations" : {
    "Mathematica" : {
      "translation" : "",
      "translationInformation" : {
        "tokenTranslations" : {
          "Error" : "(LaTeX -> Mathematica) An unknown or missing element occurred: Reached unknown or not yet supported expression tag: matrix"
        }
      },
      "numericResults" : {
        "overallResult" : "SKIPPED",
        "numberOfTests" : 0,
        "numberOfFailedTests" : 0,
        "numberOfSuccessfulTests" : 0,
        "numberOfSkippedTests" : 0,
        "numberOfErrorTests" : 0,
        "wasAborted" : false,
        "crashed" : false,
        "testCalculationsGroups" : [ ]
      },
      "symbolicResults" : {
        "overallResult" : "SKIPPED",
        "numberOfTests" : 0,
        "numberOfFailedTests" : 0,
        "numberOfSuccessfulTests" : 0,
        "numberOfSkippedTests" : 0,
        "numberOfErrorTests" : 0,
        "crashed" : false,
        "testCalculationsGroup" : [ ]
      }
    },
    "SymPy" : {
      "translation" : "",
      "translationInformation" : {
        "tokenTranslations" : {
          "Error" : "(LaTeX -> SymPy) An unknown or missing element occurred: Reached unknown or not yet supported expression tag: matrix"
        }
      },
      "numericResults" : {
        "overallResult" : "SKIPPED",
        "numberOfTests" : 0,
        "numberOfFailedTests" : 0,
        "numberOfSuccessfulTests" : 0,
        "numberOfSkippedTests" : 0,
        "numberOfErrorTests" : 0,
        "wasAborted" : false,
        "crashed" : false,
        "testCalculationsGroups" : [ ]
      },
      "symbolicResults" : {
        "overallResult" : "SKIPPED",
        "numberOfTests" : 0,
        "numberOfFailedTests" : 0,
        "numberOfSuccessfulTests" : 0,
        "numberOfSkippedTests" : 0,
        "numberOfErrorTests" : 0,
        "crashed" : false,
        "testCalculationsGroup" : [ ]
      }
    },
    "Maple" : {
      "translation" : "",
      "translationInformation" : {
        "tokenTranslations" : {
          "Error" : "(LaTeX -> Maple) An unknown or missing element occurred: Reached unknown or not yet supported expression tag: matrix"
        }
      },
      "numericResults" : {
        "overallResult" : "SKIPPED",
        "numberOfTests" : 0,
        "numberOfFailedTests" : 0,
        "numberOfSuccessfulTests" : 0,
        "numberOfSkippedTests" : 0,
        "numberOfErrorTests" : 0,
        "wasAborted" : false,
        "crashed" : false,
        "testCalculationsGroups" : [ ]
      },
      "symbolicResults" : {
        "overallResult" : "SKIPPED",
        "numberOfTests" : 0,
        "numberOfFailedTests" : 0,
        "numberOfSuccessfulTests" : 0,
        "numberOfSkippedTests" : 0,
        "numberOfErrorTests" : 0,
        "crashed" : false,
        "testCalculationsGroup" : [ ]
      }
    }
  },
  "positions" : [ ],
  "includes" : [ "\\begin{bmatrix}     1 & \\frac{y_1 - y_2}{x_1 - x_2} \\\\     \\frac{x_1 - x_3}{y_1 - y_3} & 1   \\end{bmatrix}  \\begin{bmatrix} x_\\circ \\\\ y_\\circ \\end{bmatrix}  =   \\begin{bmatrix}    \\frac{x_1^2 - x_2^2 + y_1^2 - y_2^2}{2(x_1 - x_2)} \\\\     \\frac{y_1^2 - y_3^2 + x_1^2 - x_3^2}{2(y_1 - y_3)}   \\end{bmatrix}", "y", "x_{2}", "x", "x_{1}" ],
  "isPartOf" : [ "\\begin{bmatrix}     1 & \\frac{y_1 - y_2}{x_1 - x_2} \\\\     \\frac{x_1 - x_3}{y_1 - y_3} & 1   \\end{bmatrix}  \\begin{bmatrix} x_\\circ \\\\ y_\\circ \\end{bmatrix}  =   \\begin{bmatrix}    \\frac{x_1^2 - x_2^2 + y_1^2 - y_2^2}{2(x_1 - x_2)} \\\\     \\frac{y_1^2 - y_3^2 + x_1^2 - x_3^2}{2(y_1 - y_3)}   \\end{bmatrix}" ],
  "definiens" : [ ]
}

Specify your own input