Create a HTML file using DMelt IDE with LaTeX equations
Code: "jehep_latex.py". Programming language: Python DMelt Version 1. Last modified: 08/20/2017. License: Pro
https://datamelt.org/code/cache/jehep_latex_1280.py
To run this script using the DMelt IDE, copy the above URL link to the menu [File]→[Read script from URL] of the DMelt IDE.



# 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.