void InsetNote::latex(otexstream & os, OutputParams const & runparams_in) const
{
- if (params_.type == InsetNoteParams::Note)
+ if (params_.type != InsetNoteParams::Greyedout
+ && runparams_in.find_effective()
+ && !runparams_in.find_with_non_output())
+ return;
+
+ if (params_.type == InsetNoteParams::Note) {
+ if (runparams_in.find_with_non_output()) {
+ OutputParams runparams(runparams_in);
+ InsetCollapsible::latex(os, runparams);
+ runparams_in.encoding = runparams.encoding;
+ }
return;
+ }
OutputParams runparams(runparams_in);
if (params_.type == InsetNoteParams::Comment) {
int InsetNote::plaintext(odocstringstream & os,
OutputParams const & runparams_in, size_t max_length) const
{
- if (params_.type == InsetNoteParams::Note)
- return 0;
+ if (!runparams_in.find_with_non_output()) {
+ if (params_.type == InsetNoteParams::Note)
+ return 0;
+ else if (params_.type == InsetNoteParams::Comment
+ && runparams_in.find_effective())
+ return 0;
+ }
OutputParams runparams(runparams_in);
- if (params_.type == InsetNoteParams::Comment) {
+ if (params_.type != InsetNoteParams::Greyedout) {
runparams.inComment = true;
// Ignore files that are exported inside a comment
runparams.exportdata.reset(new ExportData);
}
- os << '[' << buffer().B_("note") << ":\n";
+ if (!runparams_in.find_with_non_output())
+ os << '[' << buffer().B_("note") << ":\n";
InsetText::plaintext(os, runparams, max_length);
- os << "\n]";
+ if (!runparams_in.find_with_non_output())
+ os << "\n]";
return PLAINTEXT_NEWLINE + 1; // one char on a separate line
}
ColorCode c = lcolor.getFromLyXName("notefontcolor");
if (c != Color_none)
font.setColor(c);
+ // This is the local color (not overridden by other documents)
+ ColorCode lc = lcolor.getFromLyXName("notefontcolor@" + buffer().fileName().absFileName());
+ if (lc != Color_none)
+ font.setPaintColor(lc);
}
return font;
}