Streamline your model-building workflow

tex2solver makes it easy to transfer your beautiful LaTeX-typeset optimization models to programming code for use in a solver. Simply copy-and-paste your LaTeX code, then choose your desired solver and programming language. tex2solver will generate the code you need to be able to solve instances of your model.

With tex2solver, it's easy to keep your math model and solver code in sync.

tex2solver currently works with AIMMS, PuLP, and Gurobi (Python). Support for other popular solvers (including CPLEX), modeling languages (including Pyomo), and programming languages (like R) is forthcoming.

tex2solver is made possible by a grant from our friends at AIMMS.

AIMMS is a rapid model building and deployment platform perfected over 30 years. The AIMMS Developer environment possesses a unique combination of advanced features and design tools, such as the graphical model explorer, which allow you to build applications in a fraction of the time required by conventional programming tools.

AIMMS is proud to support the global academic, OR and analytics community. Our software is used by students and researchers in over 60 countries and hundreds of universities with our free academic license for your course and project work.




Solve linear and integer programs from your phone

tex2solver is now integrated with the NEOS Server. This means you can take a picture of an optimization problem and receive a solution from the CPLEX or MOSEK solvers...without writing any code.



Copy LaTeX from Any Editor

tex2solver converts LaTeX code to solver code. So, if you already have your model in LaTeX, simply copy/paste or drag-and-drop the LaTeX code of your model into the input box. Works great with Overleaf, TeXstudio, or your favorite text editor.



Don’t know LaTeX? No problem!

Grab a screenshot of your model and let tex2solver convert the image to LaTeX code.

The screenshot utility is perfect for importing linear or integer programming problems from class notes, journal articles, and other electronic documents. Use the keyboard shortcuts to highlight and copy a model from your screen, then use the "Load form Image" tool to convert the screenshot to LaTeX code.



Capture a Math Model on the Go

tex2solver works with your smartphone, too. Take a picture of a model from a textbook or whiteboard. The "Load from Image" tool allows you to import and crop your picture. You can even save the model for later.



Generate Solver Code...and Solve!

After you provide your model, it's time to convert it to solver code. tex2solver currently uses AIMMS and PuLP, which support a wide array of solvers (like CPLEX, Gurobi, GLPK, lp_solve, and more). Direct support of Gurobi's Python library (gurobipy) is also now included within tex2solver!



Solving an LP, from a screenshot, without writing a single line of code

The video below provides an end-to-end example of how to use tex2solver to solve a linear programming problem.