haitian-sun / LaTeX_Transformer

This project takes in screenshot of formula in PDF, and output the LaTeX codes. The project is implemented in MATLAB. Please refer README for more information.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

############################################
######    LaTeX Transformer v0.1.0    ######
############################################

Introduction
------------
LaTeX Transformer translates image of standardized math formulas into corresponding LaTeX code.

Requirement
------------
We require the toolbox vlfeat-0.9.20. We provide it in our submission, please download from http://www.vlfeat.org/ and replace in case of any error.

Setup
------------
Open the Matlab IDE and run setup.m in the command window. Please ignore any warning.

Usage
------------
The function transform.m takes an image and returns a string of LaTeX code. (Please use imread to read the image first!)
Example:
im = imread("FILEPATH/FILENAME");
latex_code = transform(im);

Quick Run
------------
You can quickly test the functionality using the images we provide in the folder "test":
Example:
im = imread("test/test1.png");
latex_code = transform(im);
(Please ignore any warning.)

Test Result Replication
------------
To replicate  the main result in our report, simply run test.m in the command window (after running setup.m). Note that the way we calculate the accuracy is by averaging score = (# correct symbols)/(total # symbols) of the test data. Please ignore any warning.


About

This project takes in screenshot of formula in PDF, and output the LaTeX codes. The project is implemented in MATLAB. Please refer README for more information.


Languages

Language:C 62.2%Language:MATLAB 20.0%Language:HTML 7.0%Language:Python 3.4%Language:Makefile 3.0%Language:CSS 1.4%Language:Objective-C 1.4%Language:Groff 0.5%Language:C++ 0.3%Language:TeX 0.3%Language:Clean 0.3%Language:Shell 0.1%Language:M 0.0%