Skip to content

Instantly share code, notes, and snippets.

@ryosan-470
Created May 4, 2014 07:07
Show Gist options
  • Save ryosan-470/c3f32e8d00dcae8f3618 to your computer and use it in GitHub Desktop.
Save ryosan-470/c3f32e8d00dcae8f3618 to your computer and use it in GitHub Desktop.
LaTeX Equation Editor

LaTeX Equation Editor

LaTeX Equation Editor likes codecogs editor.

Requirements

  • Python 3.3 or higher
  • NumPy
  • pylatex

Plan

  • To implement real time convert.
  • GUI(Tck/Tk, GTK+ or Qt4)
  • To use YaTeX keybinding in this apps.
  • Packaging for Windows, Mac OSX, Linux.

Licence

The Public Licence

About

Ryosuke SATO : tango[at]jtwp470.net or Twitter:@jtwp470

I cannot use English so well.

#!/usr/bin/env python3
'''
Requirements
* Python 3.3 or higher
* numpy
* pylatex from pypi
'''
import numpy as np
from pylatex import Document,Math
from pylatex.numpy import Matrix
from pylatex.utils import italic
def generate_pdf(equation):
doc = Document()
math = Math(data=[equation])
doc.append(math)
doc.generate_pdf()
def main():
print ("Input Equation ")
eq = input()
generate_pdf(eq)
# main function
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment