[TxMt] [Macro] HTLM to LaTeX

Sune Foldager cryo at diku.dk
Fri Nov 12 04:00:56 UTC 2004


On 11. nov 2004, at 22:09, José Campos wrote:

>     Hi All,
>     Using my fingers and RegEx, I hardly manage to convert simple HTML
> file to TeX file, something like :
>     find : <h1>([^<]+)</h1> replace : \\section{$1}
>     find : <h2>([^<]+)</h2> replace : \\subsection{$1}
>     find : <ul> replace : \\begin{itemize}
>     find : <blockquote>([^<]+)</blockquote>
>         replace : \\begin{quotation}\n$1\n\\end{quotation}
>     and so on...
>     Has someone here written a macro that does that job? It would be
> very helpfull :)

This is where it starts getting easier if we had a macro 
language/applescript, with big macros like this. Alternatively, calling 
an external shell script which used e.g. sed or something like that to 
do all the replacing could be useful I think.

-- 
Sune.
"Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn"
http://cyanite.org
.: Amor Fati :.




More information about the textmate mailing list