On 2010-12-16, Helge Hafting wrote:

> Here is a patch for LyX 2.0, that adds "multicol.module" and support for 
> it. The module provides custom insets for 2,3,4,5,6,7 and 8 columns.

Good. Thanks.

> In addition to the module itself, the patch touches these 3 files:
> src/LaTeXFeatures.cpp   (support for multicol.sty)

Isn't there a requires keyword in the layout syntax or am I missing
something. E.g. the enumitem module in LyX 2 starts with

#\DeclareLyXModule[enumitem.sty]{Customizable Lists (enumitem)}

> lib/doc/LaTeXConfig.lyx (document multicol.sty)
> lib/Makefile.am         (makefile support for multicol.module)

> I can update our existing examples of multicol documents, if this goes 
> in. Currently, they use ERT which is no longer needed. And maybe it 
> should move from "Additional" to "UserGuide" ?

> Making this module showed that a couple of things are missing from the 
> module system, that would be really nice to have:
> 1. It seems to be impossible to add support for \columnbreak,
>     because this is a command that doesn't take any text as
>     parameter. In the LyX GUI, it should look similar to \newpage.
>     Or am I missing something?

Maybe make it a dummy style similar to "-- separator --"?
but with "columnbreak" as LaTeX command?

> 2. It'd be very useful to specify "this insets takes a
>     mandatory integer parameter" and have the LyX GUI
>     provide a mechanism for editing that integer. (I.e.
>     an editable field in the inset label.)
>     That way, we could do with a single inset for multicols
>     instead of one for two columns, one for three columns and so on.
>     I guess it is probably too late for that now?

LyX Styles can take an optional argument. Again citing from
enumitem.module:

Style Description
        OptionalArgs          1
        Requires        enumitem
End

The optional argument can be set with the misleadingly named "short
title" menu entry.

I don't know whether it works for Insets, though.

Günter

Reply via email to