From: Jean-Marc Lasgouttes Date: Wed, 21 Sep 2016 14:11:53 +0000 (+0200) Subject: Do not hardcode required packages for Note inset X-Git-Tag: 2.3.0alpha1~974 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=db1270765573eafc453fe903fcfb6f9ba91f9f31;p=features.git Do not hardcode required packages for Note inset This does not change the default behavior, but allows to customize it. --- diff --git a/lib/layouts/stdinsets.inc b/lib/layouts/stdinsets.inc index c5bf68df38..06ab62c498 100644 --- a/lib/layouts/stdinsets.inc +++ b/lib/layouts/stdinsets.inc @@ -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 diff --git a/src/insets/InsetNote.cpp b/src/insets/InsetNote.cpp index a2916fd921..d5e7fb324c 100644 --- a/src/insets/InsetNote.cpp +++ b/src/insets/InsetNote.cpp @@ -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: