mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
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:
parent
bbe36ce6ce
commit
db12707655
@ -115,6 +115,7 @@ InsetLayout Note:Comment
|
|||||||
LabelString Comment
|
LabelString Comment
|
||||||
LatexType environment
|
LatexType environment
|
||||||
LatexName comment
|
LatexName comment
|
||||||
|
Requires verbatim
|
||||||
BgColor commentbg
|
BgColor commentbg
|
||||||
LabelFont
|
LabelFont
|
||||||
Color comment
|
Color comment
|
||||||
@ -150,6 +151,7 @@ InsetLayout Note:Greyedout
|
|||||||
LabelString Greyedout
|
LabelString Greyedout
|
||||||
LatexType environment
|
LatexType environment
|
||||||
LatexName lyxgreyedout
|
LatexName lyxgreyedout
|
||||||
|
Requires color,lyxgreyedout
|
||||||
BgColor greyedoutbg
|
BgColor greyedoutbg
|
||||||
Font
|
Font
|
||||||
Color greyedouttext
|
Color greyedouttext
|
||||||
|
@ -328,15 +328,15 @@ void InsetNote::validate(LaTeXFeatures & features) const
|
|||||||
{
|
{
|
||||||
switch (params_.type) {
|
switch (params_.type) {
|
||||||
case InsetNoteParams::Comment:
|
case InsetNoteParams::Comment:
|
||||||
features.require("verbatim");
|
|
||||||
if (features.runparams().flavor == OutputParams::HTML)
|
if (features.runparams().flavor == OutputParams::HTML)
|
||||||
// we do output this but set display to "none" by default,
|
// we do output this but set display to "none" by default,
|
||||||
// but people might want to use it.
|
// but people might want to use it.
|
||||||
InsetCollapsable::validate(features);
|
InsetCollapsable::validate(features);
|
||||||
|
else
|
||||||
|
// Only do the requires
|
||||||
|
features.useInsetLayout(getLayout());
|
||||||
break;
|
break;
|
||||||
case InsetNoteParams::Greyedout:
|
case InsetNoteParams::Greyedout:
|
||||||
features.require("color");
|
|
||||||
features.require("lyxgreyedout");
|
|
||||||
InsetCollapsable::validate(features);
|
InsetCollapsable::validate(features);
|
||||||
break;
|
break;
|
||||||
case InsetNoteParams::Note:
|
case InsetNoteParams::Note:
|
||||||
|
Loading…
Reference in New Issue
Block a user