On 04/23/2015 03:55 AM, Klaus-Dieter Bauer wrote:
Hello!
I am trying to define an inset, that compiles to \begin{widetext} ...
\end{widetext}.
Doing so with InsetLayout however, results in flexible-width insets
(like the Note inset), which is undesirable. E.g. when creating a such
a widetext inset with a single display-style equation inside, it will
be display a left-aligned equation in lyx, strongly at odds with the
compiled result (a full-width equation in a twocolumn document).
Is there some standard way to change this behaviour to be more like
boxes, i.e. full-width in LyX regardless of the contents?
I also posted the question on stackexchange[1] where an answer pointed
out that the behaviour for boxes is achieved by the code
bool InsetBox::hasFixedWidth() const
{
return !params_.width.empty();
}
in InsetBox.cpp, so I fear it may be hard-coded.
For reference, my current layout is
InsetLayout WideText
LyXType Custom
LabelString WideText
LatexType environment
LatexName widetext
Decoration classic
LabelFont
Color blue
Size Small
EndFont
MultiPar true
OptionalArgs 0
Preamble
\RequirePackage{widetext}
EndPreamble
End
I don't believe there is a way to do this via layouts. You could file an
enhancement request,
though, for a FullWidth layout tag. It'd be very easy to implement.
Richard