Re: LyX layout editor - specification
On Mon, Sep 22, 2008 at 08:48:46PM +0200, Pavel Sanda wrote: > call for help, > > it would be possible for me to lead lyx layout editor as a small > school project provided that it is work complicated enough. > > i know there are people mastering layouts better than me, so it would > help if you can help to write down some specification of features it > should have. > > by 'complicated enough' i mean it should know more than just provide > database sheet for the attributes described in our customization > manual, since that is trivial to write and won't need more > people/months to code... so its a question whether we can produce such > a feature-list :) > > Helge, iirc you have advertised small java beast some time ago - do > you have some specification? i'm also CC-ing Guenter and Steve as our > layout power users from the second maillist. No Java please. It should be maintainable by the regular folks here, and even if some are somewhat fluent in Java, most know C++. Python would be the only acceptable alternative, but having a Gui cries for C++. Andre'
Re: LyX layout editor - specification
Andre Poenitz <[EMAIL PROTECTED]> schrieb: > On Mon, Sep 22, 2008 at 08:48:46PM +0200, Pavel Sanda wrote: >> it would be possible for me to lead lyx layout editor as a small >> school project provided that it is work complicated enough. Instead of a specialised editor, I would suggest a lyx-layout "mode" for an existing text editor (Jed, Emacs, Scintilla, ...). >> i know there are people mastering layouts better than me, so it would >> help if you can help to write down some specification of features it >> should have. * syntax highlight (keywords, arguments , strings, comments) * auto-indentation * menu system for keywords and arguments * context help >> by 'complicated enough' i mean it should know more than just provide >> database sheet for the attributes described in our customization >> manual, since that is trivial to write and won't need more >> people/months to code... so its a question whether we can produce such >> a feature-list :) The good thing about a mode for an editor is that it is "scaling" * you can start with hunting down suitable editors, (user base, extension langugage, hard- and software needs, documentation, ...) * you can choose to program modes for different editors by different sub-groups, * you can start with simple parts and add more challenging things later Günter
Re: LyX layout editor - specification
G Milde wrote: > Andre Poenitz <[EMAIL PROTECTED]> schrieb: > > On Mon, Sep 22, 2008 at 08:48:46PM +0200, Pavel Sanda wrote: > > >> it would be possible for me to lead lyx layout editor as a small > >> school project provided that it is work complicated enough. > > Instead of a specialised editor, I would suggest a lyx-layout "mode" for an > existing text editor (Jed, Emacs, Scintilla, ...). no, the project has to be self contained, otherwise the best would be make part of lyx itself. > >> i know there are people mastering layouts better than me, so it would > >> help if you can help to write down some specification of features it > >> should have. > > * syntax highlight (keywords, arguments , strings, comments) > * auto-indentation > * menu system for keywords and arguments > * context help hmm, up to now i hasn't been thinking about editor in a classical sense, but some kind of database sheet, so you don't have to care about any style-formating of the layout file. are there some advantages to have such editor? > >> by 'complicated enough' i mean it should know more than just provide > >> database sheet for the attributes described in our customization > >> manual, since that is trivial to write and won't need more > >> people/months to code... so its a question whether we can produce such > >> a feature-list :) > > The good thing about a mode for an editor is that it is "scaling" > > * you can start with hunting down suitable editors, (user base, extension > langugage, hard- and software needs, documentation, ...) > * you can choose to program modes for different editors by different > sub-groups, > * you can start with simple parts and add more challenging things later on a different note, are there any things which could be done wrt latex, i.e. some intelligence for the arguments of the attributes? pavel
Re: LyX layout editor - specification
Pavel Sanda <[EMAIL PROTECTED]> writes: > it would be possible for me to lead lyx layout editor as a small > school project provided that it is work complicated enough. If the goal is to build something useful (!) and maintained, I think it should be coded in C++ and part of LyX, or at least using parts of LyX, like tex2lyx does. In particular, the compilation should break as soon as an incompatible change is done to our Layout system changes. If this is not done, you are going to experience bitrot rather rapidly. > by 'complicated enough' i mean it should know more than just provide > database sheet for the attributes described in our customization > manual, since that is trivial to write and won't need more > people/months to code... so its a question whether we can produce such > a feature-list :) Having a wysiwlwd (what you see is what LyX will do) mechanism that shows an example layout would be nice (and require to hook into LyX itself). Also, it is important to support and encourage mechanisms to inherit styles (Input and CopyStyle). The styles should be cumulative and the code produced by the editor should be as minimal as possible. JMarc
Re: LyX layout editor - specification
Jean-Marc Lasgouttes wrote: > like tex2lyx does. In particular, the compilation should break as soon > as an incompatible change is done to our Layout system changes. yes, something like this i had in my mind - to share lyx libs and data structure definitions. tex2lyx is a very good hint. > If this is not done, you are going to experience bitrot rather rapidly. > > > by 'complicated enough' i mean it should know more than just provide > > database sheet for the attributes described in our customization > > manual, since that is trivial to write and won't need more > > people/months to code... so its a question whether we can produce such > > a feature-list :) > > Having a wysiwlwd (what you see is what LyX will do) mechanism that > shows an example layout would be nice (and require to hook into LyX > itself). you mean layout reload through lyx pipe or launch new lyx instance with some sample (automatically generated?) document? > Also, it is important to support and encourage mechanisms to inherit > styles (Input and CopyStyle). you have some examples about the "encourage mechanisms"? > The styles should be cumulative and the > code produced by the editor should be as minimal as possible. you mean something more then automatical deletion of identical command in descendants? (the more examples the better...) thanks, pavel
Re: LyX layout editor - specification
Pavel Sanda wrote: G Milde wrote: Andre Poenitz <[EMAIL PROTECTED]> schrieb: On Mon, Sep 22, 2008 at 08:48:46PM +0200, Pavel Sanda wrote: it would be possible for me to lead lyx layout editor as a small school project provided that it is work complicated enough. Instead of a specialised editor, I would suggest a lyx-layout "mode" for an existing text editor (Jed, Emacs, Scintilla, ...). hmm, up to now i hasn't been thinking about editor in a classical sense, but some kind of database sheet, so you don't have to care about any style-formating of the layout file. are there some advantages to have such editor? That is what the people who have asked for such a thing have really wanted: Something that makes layout construction vastly easier than it is now, and the only way to do that is to have a point-and-click sort of interface that knows what options there are. Speaking for myself, I think a simple-minded database sheet would be a huge step in the right direction, and then it could be tweaked later. Richard
Re: LyX layout editor - specification
Jean-Marc Lasgouttes wrote: Pavel Sanda <[EMAIL PROTECTED]> writes: it would be possible for me to lead lyx layout editor as a small school project provided that it is work complicated enough. If the goal is to build something useful (!) and maintained, I think it should be coded in C++ and part of LyX, or at least using parts of LyX, like tex2lyx does. In particular, the compilation should break as soon as an incompatible change is done to our Layout system changes. This seems absolutely correct. One thing I'll add here is that I've been intending anyway to code a set of validate() routines that would take a layout file (module, etc) and read it solely for the purpose of validating it. This could also be used by the layout editor, to make sure nothing important had been omitted. by 'complicated enough' i mean it should know more than just provide database sheet for the attributes described in our customization manual, since that is trivial to write and won't need more people/months to code... so its a question whether we can produce such a feature-list :) Having a wysiwlwd (what you see is what LyX will do) mechanism that shows an example layout would be nice (and require to hook into LyX itself). LyX can read the layout you create and then a Lorem ipsum paragraph can be displayed using that layout. That would of course use the existing codebase. Richard
Re: LyX layout editor - specification
Pavel Sanda <[EMAIL PROTECTED]> writes: > you mean layout reload through lyx pipe or launch new lyx instance with some > sample (automatically generated?) document? Or make LyX display a lorem ipsum in a canvas that we provide. >> Also, it is important to support and encourage mechanisms to inherit >> styles (Input and CopyStyle). > > you have some examples about the "encourage mechanisms"? If I make a copy of a Theorem layout to make a Proposition layout, I'd like LyX to remember this fact by using CopyStyle internally. Basically, if I one of LyX' layout files, I'd like to be able to write it back in mostly the same form. JMarc
Re: LyX layout editor - specification
Vincent van Ravesteijn - TNW <[EMAIL PROTECTED]> schrieb: it would be possible for me to lead lyx layout editor as a small school project provided that it is work complicated enough. >>Instead of a specialised editor, I would suggest a lyx-layout "mode" >> for an existing text editor (Jed, Emacs, Scintilla, ...). > I also know a good and existing 'text editor' ... www.lyx.org No, this is a WYSIWYM editor or Document Processor (see www.lyx.org ;-). A text editor gives you direct access to the source file. GM
Re: LyX layout editor - specification
On Tue, Sep 23, 2008 at 07:24:17AM +, G Milde wrote: > Andre Poenitz <[EMAIL PROTECTED]> schrieb: > > On Mon, Sep 22, 2008 at 08:48:46PM +0200, Pavel Sanda wrote: > > >> it would be possible for me to lead lyx layout editor as a small > >> school project provided that it is work complicated enough. > > Instead of a specialised editor, I would suggest a lyx-layout "mode" for an > existing text editor (Jed, Emacs, Scintilla, ...). > > >> i know there are people mastering layouts better than me, so it would > >> help if you can help to write down some specification of features it > >> should have. > > * syntax highlight (keywords, arguments , strings, comments) > * auto-indentation > * menu system for keywords and arguments > * context help Close-to-WYSISYG feedback seems to be hard this way, and we are talking mainly about the visual appearance of layouts. I also doubt that the extension framework for any of the mentioned editors would be as flexible and easy to use as a, say, QPlainTextEdit with a few random menus and toolbars and some preview widget or such... > >> by 'complicated enough' i mean it should know more than just provide > >> database sheet for the attributes described in our customization > >> manual, since that is trivial to write and won't need more > >> people/months to code... so its a question whether we can produce such > >> a feature-list :) > > The good thing about a mode for an editor is that it is "scaling" > > * you can start with hunting down suitable editors, (user base, extension > langugage, hard- and software needs, documentation, ...) That effort I can skip. I also know in advance that emacs users won't like anything else than emacs, vim users anything else than vim etc. > * you can choose to program modes for different editors by different > sub-groups, And do all work multiple times, and fight all the editor's extension interface and would never get something a flexible as a real GUI. > * you can start with simple parts and add more challenging things later That I can do with a stand-alone application as well... No, sorry, I don't think this is a good idea at all. Andre'
Re: LyX layout editor - specification
On Tue, 23 Sep 2008, Pavel Sanda wrote: G Milde wrote: Andre Poenitz <[EMAIL PROTECTED]> schrieb: On Mon, Sep 22, 2008 at 08:48:46PM +0200, Pavel Sanda wrote: it would be possible for me to lead lyx layout editor as a small school project provided that it is work complicated enough. Instead of a specialised editor, I would suggest a lyx-layout "mode" for an existing text editor (Jed, Emacs, Scintilla, ...). no, the project has to be self contained, otherwise the best would be make part of lyx itself. Would it be a part of the project to determine user requirements? Or should everything just be "ready"? (I was recently on a seminar on requirements, so now I sometimes find myself thinkin in terms of * 'market requirements' * 'system requirements' * 'software design requirements' * the code Or, of course, the purpose of the project could be to code a prototype, that is used to test on people to see what the requirements really are. sorry.. /Christian -- Christian Ridderström, +46-8-768 39 44http://www.md.kth.se/~chr
Re: LyX layout editor - specification
Christian Ridderström wrote: >> no, the project has to be self contained, otherwise the best would be make >> part of lyx itself. > > Would it be a part of the project to determine user requirements? no, thats not technically possible. in way i'm doing it right now by this thread :) pavel
Re: LyX layout editor - specification
Andre Poenitz <[EMAIL PROTECTED]> schrieb: > On Tue, Sep 23, 2008 at 07:24:17AM +, G Milde wrote: >> Andre Poenitz <[EMAIL PROTECTED]> schrieb: >> > On Mon, Sep 22, 2008 at 08:48:46PM +0200, Pavel Sanda wrote: >> >> it would be possible for me to lead lyx layout editor as a small >> >> school project provided that it is work complicated enough. >> Instead of a specialised editor, I would suggest a lyx-layout "mode" >> for an existing text editor (Jed, Emacs, Scintilla, ...). > Close-to-WYSISYG feedback seems to be hard this way, and we are talking > mainly about the visual appearance of layouts. I also doubt that > the extension framework for any of the mentioned editors would be as > flexible and easy to use as a, say, QPlainTextEdit with a few random > menus and toolbars and some preview widget or such... Coming from the LaTeX and programming world, I prefer working on the source with a text editor that highlights and helps. IMO this is far more flexible and also faster. On the other side would be a "wizard" like layout-creator with drop-down and selection lists (like the citation insert dialogue) for GUI creation of layouts without exposure to the syntax. (However, I would not call this an editor -- hence my alternative suggestion.) >> * you can start with hunting down suitable editors, (user base, >> extension langugage, hard- and software needs, documentation, ...) > That effort I can skip. I also know in advance that emacs users won't > like anything else than emacs, vim users anything else than vim etc. And they have a reason - they know how to handle it. A new editor would mean new efforts to get to know and customise it. (BTW: I like Jed;-) > And do all work multiple times, and fight all the editor's extension > interface and would never get something a flexible as a real GUI. ... direct editing of the source is IMO still the most flexible way. > No, sorry, I don't think this is a good idea at all. So I'll have to write the lyx-layouts.sl extension mode for Jed myself :-( But I am looking forward for the "Layout wizard". Günter
Re: LyX layout editor - specification
G Milde wrote: On the other side would be a "wizard" like layout-creator with drop-down and selection lists (like the citation insert dialogue) for GUI creation of layouts without exposure to the syntax. (However, I would not call this an editor -- hence my alternative suggestion.) A "wizard" is pretty much what people have been wanting, and is really what Pavel was asking about. But layout syntax highlighting and the like would also be welcome. Richard
Re: LyX layout editor - specification
Richard Heck wrote: > G Milde wrote: >> On the other side would be a "wizard" like layout-creator with >> drop-down and selection lists (like the citation insert dialogue) for >> GUI creation of layouts without exposure to the syntax. (However, I >> would not call this an editor -- hence my alternative suggestion.) >> >> > A "wizard" is pretty much what people have been wanting, and is really what > Pavel was asking about. But layout syntax highlighting and the like would > also be welcome. can you enumerate for what particular things you would use wizard? pavel
Re: LyX layout editor - specification
Pavel Sanda wrote: Richard Heck wrote: G Milde wrote: On the other side would be a "wizard" like layout-creator with drop-down and selection lists (like the citation insert dialogue) for GUI creation of layouts without exposure to the syntax. (However, I would not call this an editor -- hence my alternative suggestion.) A "wizard" is pretty much what people have been wanting, and is really what Pavel was asking about. But layout syntax highlighting and the like would also be welcome. can you enumerate for what particular things you would use wizard? I think a lot of our users just find layout creation and editing to be a black art. That's certainly the sense you get on the user list. So I think some kind of simple "wizard"---that is, more or less what you're calling a database sheet, if I understand you correctly---would already go a long way towards helping people create simple layouts. Richard
Re: LyX layout editor - specification
rgheck wrote: I think a lot of our users just find layout creation and editing to be a black art. Which is likely due to lack of documentation... /Konrad
Re: LyX layout editor - specification
Konrad Hofbauer wrote: rgheck wrote: I think a lot of our users just find layout creation and editing to be a black art. Which is likely due to lack of documentation... Revert. Customization manual! Sorry for the noise. /Konrad
Re: LyX layout editor - specification
Pavel Sanda <[EMAIL PROTECTED]> schrieb: > Richard Heck wrote: >> G Milde wrote: >>> On the other side would be a "wizard" like layout-creator with >>> drop-down and selection lists (like the citation insert dialogue) for >>> GUI creation of layouts without exposure to the syntax. >> A "wizard" is pretty much what people have been wanting > can you enumerate for what particular things you would use wizard? 1. Creation of a new *.layout, [optionally also *.inc, or *.module] file typically based on an existing one. 2. [optionally] Editing an existing *.layout, *.inc, or *.module file In both cases, the resulting file should be saved in LyXHome/layouts. Draft - (using the Documents>Settings dialogue in LyX 1.6 as example): * "Edit Layout" window styled after "Document Class" tab: + First line: instead of a Document class, you choose a base layout (*.layout) or New from a drop down list. + Second line: choose matching latex class from a drop-down list. + (Options and preamble) + instead of the Modules selection widget, there are two: - *.inc files (what GUI name should these get?) · with *.inc files included in the base layout pre-selected · with tool-tips ([docstring], list of provided Styles) - Styles (with all styles in the layout file and the included files pre-selected). Additional buttons allow editing of Styles (opening a "Style Edit" window: [Edit] edit the selected style and store changes in the layout file under the same name. [New] ask for a new name [Copy] like "new", but pre-select the selected style as base-style in the "Style Edit" window (see below). "Style Edit" window + First line: base style - drop down list of available styles. - default Standard, - other Styles map to a "CopyStyle" key in the written file. + List of keys and values, - pre-set values updated according to the chosen base style, - depending on the permitted values with either drop-down list, number-selector, or free-form text entry. Günter
Re: LyX layout editor - specification
Richard Heck wrote: > Pavel Sanda wrote: >> Richard Heck wrote: >> >>> G Milde wrote: >>> On the other side would be a "wizard" like layout-creator with drop-down and selection lists (like the citation insert dialogue) for GUI creation of layouts without exposure to the syntax. (However, I would not call this an editor -- hence my alternative suggestion.) >>> A "wizard" is pretty much what people have been wanting, and is really >>> what Pavel was asking about. But layout syntax highlighting and the like >>> would also be welcome. >>> >> >> can you enumerate for what particular things you would use wizard? >> >> > black art. That's certainly the sense you get on the user list. So I think > some kind of simple "wizard"---that is, more or less what you're calling a > database sheet, if I understand you correctly---would already go a long way > towards helping people create simple layouts. no my question was different. i hoped fort list of templates for: - character style - ... just trying to collect as many ideas as possible. pavel
Re: LyX layout editor - specification
Pavel Sanda wrote: call for help, it would be possible for me to lead lyx layout editor as a small school project provided that it is work complicated enough. If the end goal is a working, complete and useful layout editor then I can't see how that wouldn't be "complicated enough"? i know there are people mastering layouts better than me, so it would help if you can help to write down some specification of features it should have. by 'complicated enough' i mean it should know more than just provide database sheet for the attributes described in our customization manual, since that is trivial to write and won't need more people/months to code... so its a question whether we can produce such a feature-list :) Not just a database sheet - a working C++ app that can read all of the existing layout files that comes with LyX, and allow any kind of supported modification that we today do with text editors. Helge, iirc you have advertised small java beast some time ago - do you have some specification? i'm also CC-ing Guenter and Steve as our layout power users from the second maillist. The spec was small - basically to be able to open a layout file in a GUI, and modify it and save it. It should support the stuff found in existing layout files at the time. Due to limited time, my students didn't have to implement _everything_. And they used java, so nobody picked it up later. The program they made could open and modify layout files, but not those that comes with LyX. First - it doesn't support every construct. Secondly, it is not robust at all, so an extra blank line and so on will trip it up and crash. So, for a more serious spec: * support all layout files in todays LyX and earlier. Because users already have homegrown .layouts for earlier versions of LyX. * The user should be able to: - create complete new document classes - make and maintain layout modules - modify existing classes and make changes like a new paragraph type or charstyle * The user should not need to know about the .layout file format at all. All the options for how LyX displays a paragraph type should be contained in the GUI. * The user may need to know latex in order to tell this layout editor what should happen when this new kind of paragraph is used. Still, it'd be nice if this app knows quite a few of the easier tricks in latex, such as colors, font sizes and font attributes. * Write the thing in C++, so that it can be integrated in LyX later. * Extending this thing should be easy, for surely the next version of LyX will have more layout options. Design with this in mind. * The workflow should encourage smart usage, not stupid. Example: I need a charstyle with green text for marking stuff in my next online book. The smart approach is a "layout module" implementing this. The ecessively stupid way is to copy the entire book.layout and add this functionality to the otherwise identical copy. But sometimes, a new class is in place because many changes is needed compared to existing document classes. It is still smart to use "copystyle" to refer to existing unchanged constructs, instead of copying everything and then modifying some items. * Be robust. - The program should not get in trouble if the file has some errors because the user messed it up with a text editor. - Skipping over some errors (but logging them) is nice. - Missing "end_something" can be added when something new unexpectedly begins. - Crashing should not happen, and a file should be really bad to get rejected as "apparently not a .layout file at all." * If it isn't too complex already - document the software well too. :-) Helge Hafting
Re: LyX layout editor - specification
Helge Hafting wrote: > So, for a more serious spec: thanks, i was waiting for such kind of mail ;) > * If it isn't too complex already - document the software well too. :-) this is mandatory anyway. pavel
Re: LyX layout editor - specification
Pavel Sanda wrote: > call for help, thanks to all involved, i compiled proposal from this thread. pavel
RE: Re: LyX layout editor - specification
>>> it would be possible for me to lead lyx layout editor as a small >>> school project provided that it is work complicated enough. > >Instead of a specialised editor, I would suggest a lyx-layout "mode" for an existing text editor (Jed, Emacs, Scintilla, ...). > I also know a good and existing 'text editor' ... www.lyx.org Isn't that a possibility ? Vincent