If you're familiar with XSLT then that should also be a good candidate. The problem there is that things could get complicated, if the HTML document is not a well-formed XML document.
On 08/03/07, Kjell Magne Fauske <[EMAIL PROTECTED]> wrote: > > > > On Mar 7, 8:17 pm, "Ramdas S" <[EMAIL PROTECTED]> wrote: > > Hi, > > > > I have a web site, which needs to output HTML content as Latex > > > > Ramdas S > > I don't know of any Python library that converts from HTML to LaTeX. > However, writing one should not be that difficult. It is at least much > easier than writing a LaTeX2Html translator. You could parse the HTML > code using for instance elementree[1] and Beautifulsoup[2]. You can > then iterate over the parsed html tree and output corresponding LaTeX > markup: > <h1>name</h2> -> \section{name} > <h2>name</h2> -> \subsection {name} > <ul> -> \begin{itemize} > <li>text</li> -> \item text > .... > > [1] http://effbot.org/zone/element-index.htm > [2] http://www.crummy.com/software/BeautifulSoup/ > > reStructuredText(http://docutils.sourceforge.net/rst.html ) can > generate both LaTeX and HTML from simple text files. It is used to > document Django. > > > - Kjell Magne Fauske > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---