Michael Gerz wrote:

> Hi Angus,
> 
>> Have a look at extract_metrics_info in lib/scripts/lyxpreview2bitmap.py.
>> It's trying to parse the info passed to STDOUT by dvipng.
>>
>> Add
>>  print dvipng_stdout
>> to see what this data is.
> 
> Oh, damn! Metafont fails to create a font:
> 
> 
> This is C:\programme\texmf\miktex\bin\dvipng.exe (dvipng) 1.6 Copyright
> 2002-200
> 5 Jan-Ake Larsson
> [1 (preview-latex beginning-of-page-hook detected)Trying to make PK font
> "cmr10"
>  (at 516 DPI)...
> Creating "cmr10.pk"...
> "mf" \mode:=cx; \mag:=1+216/300;nonstopmode;input cmr10
> This is METAFONT, Version 2.71828 (MiKTeX 2.4)
> 
> (C:\programme\texmf\fonts\source\public\cm\cmr10.mf
> (C:\programme\texmf\fonts\source\public\cm\cmbase.mf)
> (C:\programme\texmf\fonts\source\public\cm\roman.mf
> ! Missing `:' has been inserted
> ! This can't happen (copy).
> mode_param->if.unknown.mode_guard_(EXPR5000)
>                                             
(EXPR5000):=(EXPR1);mode_guard_...
> 
> cx_->mode_param(pixels_per_inch,300)
>                                     
> ;mode_param(blacker,0);mode_param(fillin...
> <scantokens> cx_
> 
> <to be read again>
>                    ;
> mode_setup->...nput "&mode)else:mode_name[mode]fi;
>                                                  
if.unknown.mag:mag=1;fi.if...
> l.12 mode_setup
>                ; font_setup;
> Transcript written on cmr10.log.
> METAFONT failed for some reason
>  depth=2147483647 height=-2147483646]
> 
> Failed to extract metrics info from dvipng
> 
> 
> 
> There is not too much we can do about it, I guess (except for disabling
> dvipng)...

You're running on Windows, right? With MikTeX? I've seen similar problems
before after upgrading the packages. Try rebuilding the various databases
from the MikTeX package manager. There's lots of stuff in the MikTeX
mailing list archives.

> I tried to disable dvipng support and encountered two more problems:
> 
> 1. "configure" checks for dvipng and adds converters correspondingly;
> however lyxpreview2bitmap.py _also_ checks for dvipng. That means it is
> not enough to remove the dvipng converter in LyX in order to run the
> legacy script.
> 
> 2. The legacy conversion script works but the output is not aligned with
> the baseline of the surrounding text. It is printed too low.

<shrug>So fix it</shrug>

-- 
Angus

Reply via email to