Hello all,
        during the last weeks I have used lyx, with small modifications
that will be merged later, to make my webpages (that for this moment
are in portuguese and are addressed to my math students).

        I have used the website dtd from Norman Walsh (the Docbook book
guy) http://www.nwalsh.com/website/index.html that is mainly derived
from the docbook xml version.

        So using the docbook support, with very little ert I have been
able to produce valid code. I only use a script to strip the headers
but even that will not be needed as soon as the include file support
is done for docbook.

        Yes, that means that in the future lyx will be able to export
xml, since it already does. :)

        One other thing that I have done was a write a (very very) simple
perl script to translate the netscape bookmarks file into a valid lyx file.

        It works very well to me, but it will possibly blow up your
computer, so take it with care. To the best of my knowleage it is safe,
and works as it should, but you never know.

        Comments? 
-- 
José
#!/usr/bin/perl -w

print << "EOF";
#LyX 1.1 created this file. For more info see http://www.lyx.org/
\\lyxformat 2.16
\\textclass article
\\language default
\\inputencoding latin1
\\fontscheme default
\\graphics default
\\paperfontsize default
\\spacing single
\\papersize Default
\\paperpackage a4
\\use_geometry 0
\\use_amsmath 0
\\paperorientation portrait
\\secnumdepth 3
\\tocdepth 3
\\paragraph_separation indent
\\defskip medskip
\\quotes_language english
\\quotes_times 2
\\papercolumns 1
\\papersides 1
\\paperpagestyle default

EOF

$depth=-1;
@sect=("Section","Subsection","Subsubsection");

while(<>)
  {
        $depth++ if(m/<DL>/g);
        $depth-- if(m/<\/DL>/g);
        if(m/H3[^>]*>(.*)<\/H3>/g)
        {
                print "\\layout $sect[$depth]\n\n$1\n";
        }
        if(m/HREF="([^"]*).*>(.*)</g)
        {
                print << "EOL";
\\layout Itemize


\\begin_inset LatexCommand \\url[$2]{$1}
 
\\end_inset 


EOL
        }
  }

print "\\the_end"

Reply via email to