Do not hardcode required packages for Note inset

This does not change the default behavior, but allows to customize it.
This commit is contained in:
Jean-Marc Lasgouttes 2016-09-21 16:11:53 +02:00
parent bbe36ce6ce
commit db12707655
2 changed files with 5 additions and 3 deletions

View File

@ -115,6 +115,7 @@ InsetLayout Note:Comment
LabelString Comment
LatexType environment
LatexName comment
Requires verbatim
BgColor commentbg
LabelFont
Color comment
@ -150,6 +151,7 @@ InsetLayout Note:Greyedout
LabelString Greyedout
LatexType environment
LatexName lyxgreyedout
Requires color,lyxgreyedout
BgColor greyedoutbg
Font
Color greyedouttext

View File

@ -328,15 +328,15 @@ void InsetNote::validate(LaTeXFeatures & features) const
{
switch (params_.type) {
case InsetNoteParams::Comment:
features.require("verbatim");
if (features.runparams().flavor == OutputParams::HTML)
// we do output this but set display to "none" by default,
// but people might want to use it.
InsetCollapsable::validate(features);
else
// Only do the requires
features.useInsetLayout(getLayout());
break;
case InsetNoteParams::Greyedout:
features.require("color");
features.require("lyxgreyedout");
InsetCollapsable::validate(features);
break;
case InsetNoteParams::Note: