Statistics Help
Question: Problem 2: HTML Markup to LaTeX Translation
You will write a Python module which will do a simple translation of an HTML markup string into a LaTeX string. The module prompts the user to enter:
the HTML string to be translated
The module will read the string, then:
Translate the string in HTML to LaTeX for the subset of special symbols listed in the table below.
Print out the string in LaTeX format.
Character HTML LaTeX Description
“ “ `` left double quote
” ” '' right double quote
' ' ' apostrophe
& & & ampersand
< < < less-than
> > > greater-than
{ { \{ left curly bracket
} } \} right curly bracket
% % \% percent sign
Name this program html2latex.py
Examples of output after step 2:
The string Edit
TutorTeddy.com & Boston Predictive Analytics
[ Email your Statistics or Math problems to help@teddycan.com (camera phone photos are OK) ]
Boston Office (Near MIT/Kendall 'T'):
Cambridge Innovation Center,
One Broadway, 14th Floor,
Cambridge, MA 02142,
Phone: 617-395-8864
Dallas Office (Near Galleria):
15950 Dallas Parkway,
Suite 400,
Dallas, TX 75248,
Phone: 866-930-6363