# When loaded to jeHEP IDE, this script accesses internal IDE
# classes. This is really interesting: the script acceses the same textarea
# which is used to display this script!
from jehep.ui import Editor
# Doc name
print Editor.DocName()
print Editor.DocDir()
# this script prints itself!
print view.getText()
# there are about 100 methods of the object "view" to work with the
# text area which is used to display this script!
# Now we will generate a LaTeX equation
# Use multiline comments for this!
"""
This is an equation
Our equation is
$$
y=\frac{\sin(x)}{2*\sqrt(x)}
$$
"""
# 1 means to display HTML file
view.generateHtml(1)
# the HTML file with equation is located in "cachedir" directory
Ads help maintain this website.