22

This year, LyX participates in the Google Summer of Code. This is a great opportunity to get improvements and new features implemented. I appreciate that LyX makes entering the TeX and LaTeX world easier, I'm sure there are many LaTeX users who started with it. And for sure, many LaTeX friends use LyX for rapid writing.

So this question goes to both LyX and LaTeX users, who are interested in supporting the GUI way of TeX and LaTeX:

Which improvements would you suggest to the LyX project?

I.e. which feature do you miss, what would you suggest as a project idea? We will make sure that the LyX project will see the ideas here.

Postscript (added by Charles)

The LyX team have put up a page with their project proposals at LyX 2013 Summer of Code Ideas. The deadline (May 3rd) has passed.

  • Should this be community wiki? – Jake Apr 12 '13 at 10:04
  • @Jake I thought about it (in the reflex, list -> CW). I just think the main meaning of CW is collaborative editing. And I guess the projects suggestions might not be community-developed but personal effort to create one. – Stefan Kottwitz Apr 12 '13 at 10:08
  • 2
    This isn't a proper question according to the guidelines, but it is good for the community to leave it open while it might be useful. I suggest we leave the question open until autumn, and then close it as "not a real question". – Charles Stewart Apr 15 '13 at 11:45
9

I know there are already many LaTeX online compilers. Once I thought, it would be great to have an online LyX editor, so I don't need to install a whole TeX distribution and the LyX software on my computer. But I know it would be challenging to port a complete GUI to the web. So my suggestion would be:

Making the LyX program capable of using online LaTeX compilers.

This means having an API and usable connections to existing online services. I'm sure the vendors of such services would support it. So a user could simply install LyX, and benefit from the newest TeX version without installing it - slim but capable and up-to-date installations would be possible.

File storage services such as dropbox could be connected, the storage of an online compiling service used, or files could simply be uploaded each time when being compiled - LaTeX files are small, and compressed uploads or syncs would be quick.

7

Simplification and extension of module support

Motivation: "LyX can hardly support all LaTeX packages". For example, users want to use the following LaTeX packages but they have no native support in LyX at the moment: "mdframe" (Create new paragraph style in LyX), "parallel" (Cornell Notes - A lyx or latex solution needed), "glossaries", "chapterbib", ...

Therefore, LyX can be extended by modules. A user can write such a module and publish it to the benefit of others. This should be more encouraged and modules should be made more powerful.

Goals:

  1. Make modules more powerful by introducing configuration options for modules in the GUI.
  2. Extending (certain) "Style" constructs (defined by modules) such that they can be configured during use by a GUI dialog.
  3. Simplify the selection and installation of modules such that they can be more easily distributed to the benefit of other users.

Overall, this project would integrate LaTeX better into LyX and would allow for easier community contributions.


1. Configuration options of module in GUI

It should be possible that a module can register an own configuration page under "Documents Settings". Such a "configuration page" should be separated from the native "configuration pages". Certain configuration settings in the module file (to be introduced) should be displayed by LyX on such a configuration page. Graphical elements like check boxes or items of a drop down list should be mapped automatically to LaTeX code blocks. Furthermore, there should be beginning (pre-) code blocks and ending (post-) code blocks. Here is how the configuration of "theorem" might look like in future using this project. This would replace the bunch of existing "theorem" modules by only one:

configuration of theorems

A good candidate to look at might be the "PDF Properties" page that translates to the settings of the "hyperref" package. This package is important but not always used. Hence, if this project were realized one could decide whether "PDF Properties" / "hyperref" package should be provided as module - instead of selecting "Use Hyperref Support" one would activate it as module.

2. Extending "Style" constructs with GUI dialog

With similar techniques as for the configuration page of modules, it should be possible that "Style" constructs (especially, when "LatexType" is set to "Command" or "Environment") have configuration options (via context menu).

At the moment, LaTeX commands or environments with several arguments are not supported (see also Parameterised Enviroments in Lyx). An example that might be helpful to study is the "minipage" environment. It is supported natively by LyX but cannot be supported by a module at the moment. Furthermore, it should be possible in some way for a "Style" of a module to hook into menus (again, for an example see "Insert > Box > ....").

3. Selection and installation of modules

Improve the "Modules" page of "Document Settings". Basically make a list with following columns (some fields needed to be introduced in the module files): "Used (Position)" shows whether module is active (if so then the position among the active modules); "Module-Name"; "Category": "all" or a combination of "LaTeX", "HTML", ... (i.e., supported output formats of LyX); "Version/Release Date". For a selected module, the description, the required module(s), the excluded module(s), and the location (file name) should be displayed similar as in the following picture...

loading modules

One should think about the possibility of automatic download of new modules from a site like http://wiki.lyx.org/Layouts/Modules (going a little bit into the direction of CTAN or CRAN or ...; see also this question). Furthermore, one should state clearly the license of a module, and consider introducing some status about modules on the website (quality/rating of module, most downloaded). Finally, a little module documentation should become mandatory as it is for LaTeX packages!

  • 1
    BTW, I'd offer to co-supervise the project... – e-birk Apr 23 '13 at 18:44
5

Something fairly easy to do that can't be done now and that would be very useful in collaborative editing of Latex documents: write a Latex highlighter that takes any Latex document and turns it into a Lyx document whose contents are the original document, with highlighting as appropriate and as far as the parse allows. If it were supported by some additional features in the LyX user interface, this would let us use Lyx as a Latex IDE (cf. Can I think of LyX as a LaTeX IDE?).

Highlighter

This could be implemented as a command-line program, say one that when invoked lyx-highlighter somedoc will create a highlighted somedoc.lyx file from the somedoc.tex source.

UI mockup

The highlighter should ensure the first two of the following properties, and satisfy as many of the others as possible:

  1. Ensure that all Latex source would be represented character for character in the output, even when the tex2lyx parser fails;
  2. Ensure, where the tex2lyx parser allows, that it is easy to distinguish textual content from Latex markup. For example, in the chapter heads, while the \chapter{ and } markup would be the same size as the chapter name, they would be highlighted in a different colour to make their status in the text clear (see example mock screenshot above);
  3. Represent chapter/ section heads as Lyx chapter/ sections;
  4. Represent title/ author/ date in the preamble; and
  5. I think it is not straightforward to represent arbitrary Latex colours in Lyx, and the UI aspect is tricky (conflict with second point), but it would be nice if Latex colour macros could be displayed in an intuitive manner.
  6. Support for latexdiff or similar change-marking markup.

LaTeX IDE

With such a highlighter, Lyx could be used function as a Latex source editor somewhat comparable to Kile or Texshop, by besides also carrying out its existing role as a WYSIWYM editor, and bringing its features such as change-tracking to this new role.

Additional changes to the main Lyx application could support this: these marked up files could be treated specially, and offering new specialised menu items to support such tasks as compiling the source (which differs from the Lyx file) or reparsing the Latex (could this be done only in a section?) after changes are made.

Implementing such a highlighter would get the SoC coder familiar with how the tex2lyx parser works and how Lyx represents text internally. It might be a good "first deliverable" as part of a more ambitious Lyx project.

  • Should the "highlighter" be a standalone program? Do you mean "highlighter" in the sense of syntax highlighting? (Probably not, since "View Source" in Lyx already provides such for the generated LaTeX code.) Or do you mean "highlighter" in the sense of selection of some text? If you provided a small example or the workflow you have in mind, this would help to understand your suggestion better. Since you are also talking about editing LaTeX source code, you might consider to give it a different name. What about "Highlighter and Source Code Editor"? – e-birk Apr 18 '13 at 12:56
  • In my opinion, selecting text in a LyX document and simultaneously having its exact counter-part selected in the "View Source" window would be a helpful feature. (At the moment a selection in LyX will only the corresponding paragraph(s) in LaTeX source - and a paragraph can be long...) Of course, vice versa, a selection in "View Source" should also make the corresponding LyX part selected. BTW, note that in LyX 2.1 inserting/pasting TeX code can be converted to native LyX. – e-birk Apr 18 '13 at 13:01
  • @e-birk: Thanks for your comments. I do mean highlighter in the sense of syntax highlighter. Lyx will not allow you to edit the Latex you get from "View Source", nor (without use of ERT) can just any document be generated that way. I agree about the value of putting up a workflow - what I suggest can be approximated in Word via a Latex->HTML highlighter - maybe it is best to illustrate the idea that way. – Charles Stewart Apr 18 '13 at 13:07
  • Okay, I understand it now as follows: "Reverse editing" the LaTeX code generated by LyX should be made possible. Furthermore, the import (tex2lyx) (and maybe export) should be improved that one can collaborate easier with a colleague who is not using LyX. – e-birk Apr 18 '13 at 13:15
  • @e-birk: What I propose can be done just by changing the tex2lyx implementation (and adding an option), but the usefulness of that new functionality could be supported by extra features in the main Lyx program. – Charles Stewart Apr 18 '13 at 13:45
4

Provide auto formatting feature that behaves like what Microsoft Visual Studio does.

For example, if we type or paste the following code snippet inside the editor,

\psset{arrows=->,linecolor=red,fillstyle=solid,fillcolor=blue,}

\def\function#1{%
\psclip{%
\pscustom[#1]{%
\psframe(1,2)(3,4)
\pspolygon(1,2)(3,4)(5,6)(7,8)
}%
}
\psframe*(4,4)
\endpsclip
}

LyX will automatically reformat it as follows,

\psset
{
    arrows=->,
    linecolor=red,
    fillstyle=solid,
    fillcolor=blue,
}

\def\function#1%
{%
    \psclip
    {%
        \pscustom[#1]
        {%
            \psframe(1,2)(3,4)
            \pspolygon(1,2)(3,4)(5,6)(7,8)
        }%
    }%
        \psframe*(4,4)
    \endpsclip
}

It makes coding in TeX syntax more fun, doesn't it?

Edit:

The code snippet above was accidentally chosen in PSTricks syntax but my intent is not specific to PSTricks.

  • 12
    It's nice but you don't actually code in LyX (as minimal as possible). The whole idea is to avoid coding. So I think it doesn't really matter how the code looks like for LyX users. – percusse Apr 12 '13 at 9:52
  • @percusse: So LyX is not for drawing with PSTricks? It is too bad. :-) – kiss my armpit Apr 12 '13 at 9:52
  • @Karl'sstudents Although that drawing capability might not be a bad idea!! – Sean Allred Apr 12 '13 at 10:04
  • LyZ should be an Integrated Development Environment (IDE) with which we do everything rather than switching among some editors to do our projects. – kiss my armpit Apr 12 '13 at 10:58
  • 2
    tug.org/PSTricks/main.cgi?file=LyX/lyx shows how PSTricks can be used inside LyX – user2478 Apr 18 '13 at 13:36
4

Even though LyX provides with its WYSIWYM (what you see is what you mean) philosophy a much more visual feedback of the document structure than plain LaTeX, this is not at all close to WYSIWYG. What I really miss in LyX is a continuous compilation mode, so that the PDF gets updated while editing. So my proposal is:

Implement a continuous background compilation mode for LyX

  • Continuous compilation degrades smooth user interface response. There will be a long delay because editing a single character will trigger a huge number of lines to be recompiled (especially for drawing). – kiss my armpit Apr 18 '13 at 14:39
  • @Bugbusters It's already been used in physics.SE and maths.SE with mathjax and it works really well. Compiling a total ball-ache. Also, would you really need to recompile everything? – User 17670 Apr 18 '13 at 14:50
  • 2
    @Bugbusters: No, it won't! Of course, the compilation should take place in a background process with lower priority to not disturb user interface response; as even cheap laptops have at least two cores in these days, there won't be any user interface latencies. I also would not trigger it after every single character, but employ some clever heuristics. There already are TeX IDEs who have implemented this pretty well (beginning with the famous, but unfortunately discontinued iTeXMac) – Daniel Apr 18 '13 at 14:51
  • @User17670: How can we edit a single character in PSTricks' pspicture (for example) without having to recompile the whole environment? Assume the PSTricks code is very time-consuming. – kiss my armpit Apr 18 '13 at 14:56
  • @Bugbusters In the case of a pspicture, sure, it would (I presume) need the whole environment recompiling. Like Daniel said though, the chance of that taking 'too long' is small. – User 17670 Apr 18 '13 at 15:11
2

I don't know if this is possible, but it would be really nice to be able to edit the source directly. Currently, LyX only supports inputting LaTeX codes through the ERT box, but not editing the codes generated by LyX itself.

In my experience, the .lyx to .tex export works more or less smoothly, but importing .tex into .lyx doesn't work very well, especially when the .tex document is large and contains a lot of user defined macros.

I would like to see these two aspects of LyX improved, in addition to the above suggestions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.