LyX Layout Editor Introduction LyX is an open source graphical frontend for LaTeX. Each document edited in LyX document processor has assigned its appropriate LaTeX class which will be used when typesetting the final document. To have a proper GUI outlook of such a document on the screen LyX uses layouts - files which desribe how the LaTeX elements should be visualized on the screen. This way the most popular LaTeX classes have their correspondent lyx layouts, however creating a new layout for some unknown/personal class is a complicated task and expects lot of experience from the user side. Naturally there arose demand in the users community to have some tool which simplify this workflow. Goal To create layout editor which will improve the possibility to create LyX layouts for users which have very little previous experience with layout format itself and comfort advanced users, which can use only plain text editors for such a task now. Constraints As the layout format is evolving with the consecutive versions of LyX itself there is a need to keep the editor code close to the LyX code itself. (The final goal would be to make it part of LyX distribution itself - not for this project though.) From that follows in particular: * portable code in C++ and usage of Qt library (primarily LyX runs on Linux, lately Windows and OS X are natively supported too). * GPL-2 license * to share some of LyX libraries if possible - mainly for data structures describing layout itself. Something similar can be currently seen with tex2lyx utility. The idea behind is that the compilation should break as soon as an incompatible change is done to LyX layout system. If this point is not taken seriously, the whole software is going to experience bitrot rather rapidly. * be opened to the LyX community, which ideally means that some beta versions of the application are publicly exposed before the final version is released/defended. This somewhat advance the difficulty of the project, but it is needed if the project team intend to build something useful and used. Features Specification Generally 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. Also all layout commands (Customization manual, sec. Layout) should be somehow accessible through GUI (either some menu strucutre or context menu or combo boxes etc.) with easily accessible online reference for each particular command (e.g. tooltips). In more detail: - technical * modules support (LyX 1.6) * The workflow should encourage smart usage, not stupid. In other words 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. Example: Needed a charstyle with green text for marking stuff in next book. The smart approach is a "layout module" implementing this. The 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. * support of layout formats conversion from previous LyX versions (natural start is LyX 1.4, where the format version tag was introduced). * extending should be easy, for sure the next versions of LyX will have more layout options. Design should be done with this in mind. - GUI * syntax highlight (keywords, arguments , strings, comments) * intelligent auto-indentation * system for keywords and arguments (e.g. menu) * context help * some wizard or template system for - often used type of layouts (e.g. character styles) - creation of a new *.layout, [optionally also *.inc, or *.module] file typically based on an existing one. * some preview mechanism (e.g. via LyX pipes, launching new LyX instance etc.) * the user need to know LaTeX in order to tell this layout editor what should happen when this new kind of paragraph is used. It would be nice if the editor knows some of the easier tricks in LaTeX, such as colors, font sizes and font attributes, etc. - Robustness * 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). * 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."