Hi

I recently tried to use lyx to generate some uncomplex html
pages.  Ran into what appears to be a known but unfixed bug getting 
URL's to appear as links in my html.

It still seems to be there with cvs 1_2_x lyx and latest latex2html.

this appears to have been discussed but I have not seen posted a 
useable solution yet.    Here is a workaround, improvements welcome.


Problem appears to be lyx outputs a  \IfFileExists command which 
latex2html does not understand. The edit is trivial but not automated.

A workaround is a tiny perl script as inlined later called noexist.
make it executeable, put it somewhere in your search path
then within lyx edit your 
preferences => conversion => converters =>  LaTeX->HTML
  add to the start of the converter command 
  noexist $$i ;     
       prior to the latex2html, right at the start of the line. 
  modify/apply/save that.
then html export works for me with URL's.
john

############# Script noexist ########
#!/usr/bin/perl
# touchup TeX prior to latex2html
# replace  
#\IfFileExists{url.sty}{\usepackage{url}}
#                      {\newcommand{\url}{\texttt}}
# with 
#\usepackage{url}
# [EMAIL PROTECTED]   Tue Jul 30 20:12:39 EST 2002
# edit the file inplace so I don't need to play latex2html path tricks.

$file=shift(@ARGV);
rename($file, "$file.orig");
open IN, "<$file.orig" || die "could not open $file";
open OUT, ">$file" || die "cannot open $file for output";
while (<IN>)  {
   if (/^\\IfFileExists{url.sty}{\\usepackage{url}}/) {
        <IN> ; # gulp the next line too
        $_="\\usepackage{url}\n";
   }
print OUT $_;
}
unlink("$file.orig");
close IN;
close OUT;

#######################################


 
 

Reply via email to