On Tue, Mar 10, 2015 at 07:09:59PM +0100, Enrico Forestieri wrote:
> On Mon, Feb 16, 2015 at 09:13:13PM +0100, Jean-Marc Lasgouttes wrote:
> > Le 16/02/2015 21:10, Enrico Forestieri a écrit :
> > >On Mon, Feb 16, 2015 at 04:40:35PM +0100, Stephan Witt wrote:
> > >>
> > >>In principle this is ok, but
> > >>1. it doesn't solve the problem with HiRes-display on Mac and
> > >
> > >Why?
> > >
> > >>2. did you check the effect on Tutorial.lyx where the icons are rendered 
> > >>as
> > >>part of the document?
> > >>
> > >>I'll attach an screenshot excerpt to give you an impression.
> > >
> > >Yes, the math icons seem to be problematic.
> > 
> > With the info inset, I suspect that the icon size should be set to
> > match the font ascent as well as possible. Currently, we use
> > whatever icon gets loaded.
> 
> The attached patch solves this issue. It makes sure that the size of
> the icons displayed in the info inset matches the nominal size.
> It has no effect with png icons, which are still displayed as before
> (unless they are bigger than the nominal size).
> 
> However, I need using Qt in the insets dir. Is this OK?

I assume the answer is yes.

> BTW, when using the compressed svg icons in an info inset, LyX crashes
> when trying to preview the document. The crash is very bad and produces
> no backtrace, so I don't know what happens. Anyway, I traced this down
> to the fact that the icons are compressed. Indeed, uncompressing them
> (through, e.g., gunzip -c foo.svgz > foo.svg) and applying the svgicons
> patch after replacing everywhere "svgz" with "svg", everything is fine.
> 
> However, something fishy is occurring here. I did some experiments to
> try to understand the matter. I summarize here my findings.
> Inserting a svgz file through the graphics inset is Ok if the file is
> on a local file system. If, instead, the file is on an nfs mounted
> directory, then LyX crashes in the same bad manner when previewing.
> This also occurs for files that are on the same disk but on an NTFS
> partition (mounted using the linux ntfs-3g driver).
> 
> I also found that Linux is able to display svgz files on screen in both
> the graphics inset and the info inset, while Windows and Solaris are
> not able to display them in the info inset (but the graphics inset is Ok).

I discovered the reason of this last thing. It is not related to the
platform or the kind of inset (graphics or info) but to whether the
directory containing the compressed svg is writable or not. Indeed,
LyX uncompresses the file before using it, but uses a temporary file
located in the same directory. Of course, if the directory is not
writable, the operation fails and the image is not displayed.

However, the problem that documents with svgz files used in the info
inset are not compilable is still unsolved. Anyway, I have a clue.
If you load in a graphics inset a svgz file residing in the lib/images
directory, the document does not compile. But, if you copy the exact
same svgz file in your home directory and load it, then the document
compiles. This is independent of the writability of the directory and
I have to still understand why this happens, but I feel it is something
as stupid as the temporary file thing.

-- 
Enrico

Reply via email to