Re: merging of external material and graphics interfaces

2011-09-05 Thread Helge Hafting

On 02. sep. 2011 02:45, Tommaso Cucinotta wrote:
[...]

I'm not sure why some of the external material contents are not
previewed on the screen.


External material is not necessarily images.

The spreadsheet inset is converted to a longtable, for example. A 
longtable may get broken up over several pages, and location of the 
breaks depends on where the previous pagebreak (in the document) 
happens. As we all know, LyX doesn't break the document into pages

in advance.

Helge Hafting


Re: merging of external material and graphics interfaces

2011-09-05 Thread Georg Baum
Tommaso Cucinotta wrote:

 Il 31/08/2011 21:19, Georg Baum ha scritto:
 This plan exists for ages. The graphics inset even was already ditched at
 some point in time, but it got reintroduced later, because the external
 inset did not work that well back then. IIRC there is also a bug entry
 for that. You will be a hero if you finally manage to do this!
 which bug number ? Or, what to exactly search for in the database ?

I searched now and did not find it, so probably my memory was wrong.

 that's also my feeling: external material seems more generic than
 graphics, and after all each graphics may be handled via the RasterImage
 external material, or probably a variation of it that merges together at
 least the RasterImage, Dia and XFig external material types (or the
 other way round, i.e., each different file type into its own external
 material kind -- which one is best?).

IMHO one template per file type is overkill. There should be as little 
templates as possible, and each template should handle a group of file types 
that have something in common. The RasterImage is a good example. A similar 
VectorImage template for generic vector images would also be useful. I 
believe that the Dia template is in fact a generic vector image template (or 
could be changed to be one). Only programs that support inline LaTeX and/or 
produce more than one file like XFig need a dedicated template

 I'm not sure why some of the external material contents are not
 previewed on the screen.

Which templates?


Georg



Re: merging of external material and graphics interfaces

2011-09-05 Thread Helge Hafting

On 02. sep. 2011 02:45, Tommaso Cucinotta wrote:
[...]

I'm not sure why some of the external material contents are not
previewed on the screen.


External material is not necessarily images.

The spreadsheet inset is converted to a longtable, for example. A 
longtable may get broken up over several pages, and location of the 
breaks depends on where the previous pagebreak (in the document) 
happens. As we all know, LyX doesn't break the document into pages

in advance.

Helge Hafting


Re: merging of external material and graphics interfaces

2011-09-05 Thread Georg Baum
Tommaso Cucinotta wrote:

> Il 31/08/2011 21:19, Georg Baum ha scritto:
>> This plan exists for ages. The graphics inset even was already ditched at
>> some point in time, but it got reintroduced later, because the external
>> inset did not work that well back then. IIRC there is also a bug entry
>> for that. You will be a hero if you finally manage to do this!
> which bug number ? Or, what to exactly search for in the database ?

I searched now and did not find it, so probably my memory was wrong.

> that's also my feeling: external material seems more generic than
> graphics, and after all each graphics may be handled via the RasterImage
> external material, or probably a variation of it that merges together at
> least the RasterImage, Dia and XFig external material types (or the
> other way round, i.e., each different file type into its own external
> material kind -- which one is best?).

IMHO one template per file type is overkill. There should be as little 
templates as possible, and each template should handle a group of file types 
that have something in common. The RasterImage is a good example. A similar 
VectorImage template for generic vector images would also be useful. I 
believe that the Dia template is in fact a generic vector image template (or 
could be changed to be one). Only programs that support inline LaTeX and/or 
produce more than one file like XFig need a dedicated template

> I'm not sure why some of the external material contents are not
> previewed on the screen.

Which templates?


Georg



Re: merging of external material and graphics interfaces

2011-09-01 Thread Tommaso Cucinotta

Il 31/08/2011 21:19, Georg Baum ha scritto:

This plan exists for ages. The graphics inset even was already ditched at
some point in time, but it got reintroduced later, because the external
inset did not work that well back then. IIRC there is also a bug entry for
that. You will be a hero if you finally manage to do this!

which bug number ? Or, what to exactly search for in the database ?
Please don't give up the generality of the external inset. If I would 
do the

conversion I would remove the graphics inset completely, write some lyx2lyx
to convert graphics insets to external insets, and then improve the user
interface of the external inset, possibly using some ideas from the graphics
inset.


that's also my feeling: external material seems more generic than 
graphics, and after all each graphics may be handled via the RasterImage 
external material, or probably a variation of it that merges together at 
least the RasterImage, Dia and XFig external material types (or the 
other way round, i.e., each different file type into its own external 
material kind -- which one is best?).


I'm not sure why some of the external material contents are not 
previewed on the screen.


T.


Re: merging of external material and graphics interfaces

2011-09-01 Thread Tommaso Cucinotta

Il 31/08/2011 21:19, Georg Baum ha scritto:

This plan exists for ages. The graphics inset even was already ditched at
some point in time, but it got reintroduced later, because the external
inset did not work that well back then. IIRC there is also a bug entry for
that. You will be a hero if you finally manage to do this!

which bug number ? Or, what to exactly search for in the database ?
Please don't give up the generality of the external inset. If I would 
do the

conversion I would remove the graphics inset completely, write some lyx2lyx
to convert graphics insets to external insets, and then improve the user
interface of the external inset, possibly using some ideas from the graphics
inset.


that's also my feeling: external material seems more generic than 
graphics, and after all each graphics may be handled via the RasterImage 
external material, or probably a variation of it that merges together at 
least the RasterImage, Dia and XFig external material types (or the 
other way round, i.e., each different file type into its own external 
material kind -- which one is best?).


I'm not sure why some of the external material contents are not 
previewed on the screen.


T.


merging of external material and graphics interfaces

2011-08-31 Thread Julien Rioux

Is anybody working on this? Any strong discouraging opinions?

Tommaso, were you working on achieving this? Where can I find your 
latest patch?


Thanks,
Julien



Re: merging of external material and graphics interfaces

2011-08-31 Thread Jürgen Spitzmüller
Julien Rioux wrote:
 Is anybody working on this? Any strong discouraging opinions?

On the contrary, I'd like to encourage you on this.

Jürgen


Re: merging of external material and graphics interfaces

2011-08-31 Thread Pavel Sanda
Julien Rioux wrote:
 Is anybody working on this? Any strong discouraging opinions?

i'm not sure what exactly you have in mind.
- ditching the whole external material stuff? what will be done with non 
graphics templates?
- or just moving some graphics format from external to internal? there was 
some sense
  in distinguishing these in the sense that for external material we need some 
specialized
  3rd party app, while the other we know internally (either by wt or by 
imagemagick which
  is mandatory part).

pavel


Re: merging of external material and graphics interfaces

2011-08-31 Thread Tommaso Cucinotta

Il 31/08/2011 16:37, Julien Rioux ha scritto:
No, not ditching it completely. But some external templates are really 
graphic formats and it's confusing to have them appear elsewhere. 
Also, chunks of the user interface are similar and could be merged.


Hello,

my last patch was attached to #5962:

  http://www.lyx.org/trac/ticket/5962
  
http://www.lyx.org/trac/attachment/ticket/5962/lyx-create-external-material-v2.patch


It was not at all a merge of the two, but merely a single patch 
addressing the same issue both in the external material and in the 
graphics insertion dialogs (i.e., a new Edit/Create button -- even 
though it doesn't behave exactly in the same way -- I wanted to keep 
working on it but I couldn't find further time for that).


My last thoughts on this were along the line that, assuming it is 
impossible to do an actual merge of the 2 functionalities because of the 
too big impact on the current code (not to mention the file format), 
especially compared to my availability of time, then I would just 
replicate what I need in both of them (the Edit/Create button, which 
also allows for automatic creation of the file by copying an empty 
sample, when needed).


T.



Re: merging of external material and graphics interfaces

2011-08-31 Thread Tommaso Cucinotta

Il 31/08/2011 14:17, Julien Rioux ha scritto:

Is anybody working on this? Any strong discouraging opinions?

Tommaso, were you working on achieving this? Where can I find your 
latest patch?


I forgot to mention the wiki note:

  http://wiki.lyx.org/Devel/CreateFromEmptySample

Bye,

T.



Re: merging of external material and graphics interfaces

2011-08-31 Thread Julien Rioux

On 31/08/2011 3:25 PM, Pavel Sanda wrote:

Julien Rioux wrote:

Is anybody working on this? Any strong discouraging opinions?


i'm not sure what exactly you have in mind.
- ditching the whole external material stuff? what will be done with non 
graphics templates?
- or just moving some graphics format from external to internal? there was 
some sense
   in distinguishing these in the sense that for external material we need some 
specialized
   3rd party app, while the other we know internally (either by wt or by 
imagemagick which
   is mandatory part).

pavel



No, not ditching it completely. But some external templates are really 
graphic formats and it's confusing to have them appear elsewhere. Also, 
chunks of the user interface are similar and could be merged.

See this post by Tommaso:

http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg170264.html

For myself, I came to the same interpretation as Tommaso regarding the 
differences between external template and graphics, namely that in one 
case LyX creates only latex code to be processed by latex, and in the 
other case LyX generates an image in the correct format for includegraphics.


The idea that you bring forward to distinguish these two, internal vs. 
3rd party, is new to me. I must say that as a user I did not understand 
this distinction.


--
Julien



Re: merging of external material and graphics interfaces

2011-08-31 Thread Pavel Sanda
Julien Rioux wrote:
 No, not ditching it completely. But some external templates are really 
 graphic formats and it's confusing to have them appear elsewhere. Also, 

can you name which particular templates you have in mind?

 I must say that as a user I did not understand this distinction.

if you install lyx you get imagemagick automatically - either as
part of installer (windows) or as compulsory dependency (linux);
(not sure how is this done in mac).

if you push some .dia/.xfig diagram you need something additional
to be installed for you .lyx file to work. it might not even work on
other archs (is xfig for win, is installed dia properly detected
in win?). so having it under external material has the advantage
that you signalize user that
1) we know such format at all
2) he is entering more dangerous area as far as exchanging .lyx
   document with other people is concerned.

pavel


Re: merging of external material and graphics interfaces

2011-08-31 Thread Georg Baum
Julien Rioux wrote:

 On 31/08/2011 3:25 PM, Pavel Sanda wrote:
 Julien Rioux wrote:
 Is anybody working on this? Any strong discouraging opinions?

This plan exists for ages. The graphics inset even was already ditched at 
some point in time, but it got reintroduced later, because the external 
inset did not work that well back then. IIRC there is also a bug entry for 
that. You will be a hero if you finally manage to do this!

 No, not ditching it completely. But some external templates are really
 graphic formats and it's confusing to have them appear elsewhere. Also,
 chunks of the user interface are similar and could be merged.
 See this post by Tommaso:
 
 http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg170264.html
 
 For myself, I came to the same interpretation as Tommaso regarding the
 differences between external template and graphics, namely that in one
 case LyX creates only latex code to be processed by latex, and in the
 other case LyX generates an image in the correct format for
 includegraphics.

No, that was not the idea behind the external inset. The idea was to be able 
to include _any_ material, and make it user configurable. This could be some 
LaTeX code (as e.g. for the GNumeric template), or it could be an image (or 
movie!) in any format that the used LaTeX flavour understands. Therefore, 
the graphics inset can be viewed as a simplified version of the external 
inset, offering only a subset of the features. IIRC there was one single 
feature of the graphics inset that was not supported by the external inset, 
but I can't remember which one. Maybe it was the don't uncompress button, 
but since this is gone anyway it does not matter anymore.

Please don't give up the generality of the external inset. If I would do the 
conversion I would remove the graphics inset completely, write some lyx2lyx 
to convert graphics insets to external insets, and then improve the user 
interface of the external inset, possibly using some ideas from the graphics 
inset.

 The idea that you bring forward to distinguish these two, internal vs.
 3rd party, is new to me. I must say that as a user I did not understand
 this distinction.

Me neither.


Georg




merging of external material and graphics interfaces

2011-08-31 Thread Julien Rioux

Is anybody working on this? Any strong discouraging opinions?

Tommaso, were you working on achieving this? Where can I find your 
latest patch?


Thanks,
Julien



Re: merging of external material and graphics interfaces

2011-08-31 Thread Jürgen Spitzmüller
Julien Rioux wrote:
> Is anybody working on this? Any strong discouraging opinions?

On the contrary, I'd like to encourage you on this.

Jürgen


Re: merging of external material and graphics interfaces

2011-08-31 Thread Pavel Sanda
Julien Rioux wrote:
> Is anybody working on this? Any strong discouraging opinions?

i'm not sure what exactly you have in mind.
- ditching the whole external material stuff? what will be done with non 
graphics templates?
- or just moving some graphics format from external to "internal"? there was 
some sense
  in distinguishing these in the sense that for external material we need some 
specialized
  3rd party app, while the other we know internally (either by wt or by 
imagemagick which
  is mandatory part).

pavel


Re: merging of external material and graphics interfaces

2011-08-31 Thread Tommaso Cucinotta

Il 31/08/2011 16:37, Julien Rioux ha scritto:
No, not ditching it completely. But some external templates are really 
graphic formats and it's confusing to have them appear elsewhere. 
Also, chunks of the user interface are similar and could be merged.


Hello,

my last patch was attached to #5962:

  http://www.lyx.org/trac/ticket/5962
  
http://www.lyx.org/trac/attachment/ticket/5962/lyx-create-external-material-v2.patch


It was not at all a merge of the two, but merely a single patch 
addressing the same issue both in the external material and in the 
graphics insertion dialogs (i.e., a new Edit/Create button -- even 
though it doesn't behave exactly in the same way -- I wanted to keep 
working on it but I couldn't find further time for that).


My last thoughts on this were along the line that, assuming it is 
impossible to do an actual merge of the 2 functionalities because of the 
too big impact on the current code (not to mention the file format), 
especially compared to my availability of time, then I would just 
replicate what I need in both of them (the Edit/Create button, which 
also allows for automatic creation of the file by copying an empty 
sample, when needed).


T.



Re: merging of external material and graphics interfaces

2011-08-31 Thread Tommaso Cucinotta

Il 31/08/2011 14:17, Julien Rioux ha scritto:

Is anybody working on this? Any strong discouraging opinions?

Tommaso, were you working on achieving this? Where can I find your 
latest patch?


I forgot to mention the wiki note:

  http://wiki.lyx.org/Devel/CreateFromEmptySample

Bye,

T.



Re: merging of external material and graphics interfaces

2011-08-31 Thread Julien Rioux

On 31/08/2011 3:25 PM, Pavel Sanda wrote:

Julien Rioux wrote:

Is anybody working on this? Any strong discouraging opinions?


i'm not sure what exactly you have in mind.
- ditching the whole external material stuff? what will be done with non 
graphics templates?
- or just moving some graphics format from external to "internal"? there was 
some sense
   in distinguishing these in the sense that for external material we need some 
specialized
   3rd party app, while the other we know internally (either by wt or by 
imagemagick which
   is mandatory part).

pavel



No, not ditching it completely. But some external templates are really 
graphic formats and it's confusing to have them appear elsewhere. Also, 
chunks of the user interface are similar and could be merged.

See this post by Tommaso:

http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg170264.html

For myself, I came to the same interpretation as Tommaso regarding the 
differences between external template and graphics, namely that in one 
case LyX creates only latex code to be processed by latex, and in the 
other case LyX generates an image in the correct format for includegraphics.


The idea that you bring forward to distinguish these two, internal vs. 
3rd party, is new to me. I must say that as a user I did not understand 
this distinction.


--
Julien



Re: merging of external material and graphics interfaces

2011-08-31 Thread Pavel Sanda
Julien Rioux wrote:
> No, not ditching it completely. But some external templates are really 
> graphic formats and it's confusing to have them appear elsewhere. Also, 

can you name which particular templates you have in mind?

> I must say that as a user I did not understand this distinction.

if you install lyx you get imagemagick automatically - either as
part of installer (windows) or as compulsory dependency (linux);
(not sure how is this done in mac).

if you push some .dia/.xfig diagram you need something additional
to be installed for you .lyx file to work. it might not even work on
other archs (is xfig for win, is installed dia properly detected
in win?). so having it under external material has the advantage
that you signalize user that
1) we know such format at all
2) he is entering more dangerous area as far as exchanging .lyx
   document with other people is concerned.

pavel


Re: merging of external material and graphics interfaces

2011-08-31 Thread Georg Baum
Julien Rioux wrote:

> On 31/08/2011 3:25 PM, Pavel Sanda wrote:
>> Julien Rioux wrote:
>>> Is anybody working on this? Any strong discouraging opinions?

This plan exists for ages. The graphics inset even was already ditched at 
some point in time, but it got reintroduced later, because the external 
inset did not work that well back then. IIRC there is also a bug entry for 
that. You will be a hero if you finally manage to do this!

> No, not ditching it completely. But some external templates are really
> graphic formats and it's confusing to have them appear elsewhere. Also,
> chunks of the user interface are similar and could be merged.
> See this post by Tommaso:
> 
> http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg170264.html
> 
> For myself, I came to the same interpretation as Tommaso regarding the
> differences between external template and graphics, namely that in one
> case LyX creates only latex code to be processed by latex, and in the
> other case LyX generates an image in the correct format for
> includegraphics.

No, that was not the idea behind the external inset. The idea was to be able 
to include _any_ material, and make it user configurable. This could be some 
LaTeX code (as e.g. for the GNumeric template), or it could be an image (or 
movie!) in any format that the used LaTeX flavour understands. Therefore, 
the graphics inset can be viewed as a simplified version of the external 
inset, offering only a subset of the features. IIRC there was one single 
feature of the graphics inset that was not supported by the external inset, 
but I can't remember which one. Maybe it was the "don't uncompress" button, 
but since this is gone anyway it does not matter anymore.

Please don't give up the generality of the external inset. If I would do the 
conversion I would remove the graphics inset completely, write some lyx2lyx 
to convert graphics insets to external insets, and then improve the user 
interface of the external inset, possibly using some ideas from the graphics 
inset.

> The idea that you bring forward to distinguish these two, internal vs.
> 3rd party, is new to me. I must say that as a user I did not understand
> this distinction.

Me neither.


Georg