[l2h] 2 bugs in l2h
Roman Semizarov
Roman Semizarov" <roma7@RS1746.spb.edu
Mon, 4 Dec 2000 05:32:14 +0300 (MSK)
4-Dec-00 11:46 ross@ics.mq.edu.au wrote:
>> 1. If there is a space in the path to miktex, problems occur.
>> E.g. config.pl can not exe_ute dvips for checking its version.
>>
>> I think this is very significant bug, because last versions
>> of MikTeX are installed in "c:\program files\" by default.
> Since that is a configuration that I do not use,
> can you experiment with the configuration options so as to find a way
> to get this working.
> e.g. you may nee to use quotes "......" around the main root path
> for the LaTeX2HTML installation.
It can not help. The thing is that config.pl searchs for dvips.exe,
founds, and gives it to redir.pl.
my $dvips = &find_prog(&get_name('DVIPS',1));
...
@tryopts = ('','--version','-?','-v');
...
foreach $veropt (@tryopts) {
my ($stat,$msg,$err) = &get_out_err("$dvips $veropt");
~~~~~~~~
...
sub get_out_err {
my ($cmd) = @_;
# redir.pl does the redirection for us
unless(open(IN,"$newcfg{PERL} config${dd}redir.pl $cmd |")) {
return(255,'',$!);
}
...
So you are to change code.
Of course you may put quotes around $dvips -^, but I think, that
it is not a good idea. It is better to make the subroutine
check_prog to return name with quote (changing
'return $path' to 'return "\"$path\""
and
'return "$path$ext"' to 'return "\"$path$ext\""
(may be if $newcfg('plat')=~/win32/i)
All this has a little lack: it does not help :)
The reason is that when we give $cmd to redir.pl, quotes disapear,
althouth now our path with spaces lives in ARGV[0]. So, I think we
must add
$ARGV[0]="\"$ARGV[0]\"";
in the very beginning of redir.pl besides.
>> 2. If l2h see one of my favorite definitions
>>
>> \newcommand{\(}{\left(}
> Sorry. This *cannot be fixed*, at least not easily.
> Reason: \( .... \) is standard LaTeX for inline mathematics;
> which is similar to TeX's $ .... $ , but not exactly the same.
> You really should not use this for a different purpose.
You are absolutely right. Sorry.
Roman