else if (ot1 && !ot1font_.empty())
return (ot1font_ == "none") ?
true : altFont(ot1font_).available(ot1, nomath);
- else if (requires_.empty() && package_.empty())
+ else if (required_.empty() && package_.empty())
return true;
- else if (!requires_.empty()
- && LaTeXFeatures::isAvailable(to_ascii(requires_)))
+ else if (!required_.empty()
+ && LaTeXFeatures::isAvailable(to_ascii(required_)))
return true;
- else if (requires_.empty() && !package_.empty()
+ else if (required_.empty() && !package_.empty()
&& LaTeXFeatures::isAvailable(to_ascii(package_)))
return true;
else if (!altfonts_.empty()) {
&& altFont(completefont_).available(ot1, nomath))
return completefont_;
else if (switchdefault_) {
- if (requires_.empty()
- || (!requires_.empty()
- && LaTeXFeatures::isAvailable(to_ascii(requires_))))
+ if (required_.empty()
+ || (!required_.empty()
+ && LaTeXFeatures::isAvailable(to_ascii(required_))))
return name_;
}
- else if (!requires_.empty()
- && LaTeXFeatures::isAvailable(to_ascii(requires_)))
+ else if (!required_.empty()
+ && LaTeXFeatures::isAvailable(to_ascii(required_)))
return name_;
else if (!package_.empty()
&& LaTeXFeatures::isAvailable(to_ascii(package_)))
return name_;
else if (!preamble_.empty() && package_.empty()
- && requires_.empty() && !switchdefault_
+ && required_.empty() && !switchdefault_
&& altfonts_.empty()) {
return name_;
}
return string();
string const package = to_ascii(package_);
- if (!requires_.empty() && LaTeXFeatures::isAvailable(to_ascii(requires_)))
+ if (!required_.empty() && LaTeXFeatures::isAvailable(to_ascii(required_)))
return package;
else if (LaTeXFeatures::isAvailable(package))
return package;
else if (dryrun)
return package;
- docstring const req = requires_.empty() ? package_ : requires_;
+ docstring const req = required_.empty() ? package_ : required_;
frontend::Alert::warning(_("Font not available"),
bformat(_("The LaTeX package `%1$s' needed for the font `%2$s'\n"
"is not available on your system. LyX will fall back to the default font."),
frontend::Alert::warning(_("Font not available"),
bformat(_("The LaTeX package `%1$s' needed for the font `%2$s'\n"
"is not available on your system. LyX will fall back to the default font."),
- requires_, guiname_), true);
+ required_, guiname_), true);
} else {
string const package =
getAvailablePackage(dryrun);
break;
}
case LF_REQUIRES:
- lex >> requires_;
+ lex >> required_;
break;
case LF_SCALEOPTION:
lex >> scaleoption_;
/// Does this provide additional options?
bool providesMoreOptions(bool ot1, bool complete, bool nomath);
/// Alternative requirement to test for
- docstring const & required() { return requires_; }
+ docstring const & required() { return required_; }
/// Does this font provide a given \p feature
bool provides(std::string const & name, bool ot1,
bool complete, bool nomath);
///
std::vector<std::string> provides_;
///
- docstring requires_;
+ docstring required_;
///
docstring preamble_;
///
lex.getLongString(from_ascii("EndPreBabelPreamble"));
break;
case LA_REQUIRES:
- lex >> requires_;
+ lex >> required_;
break;
case LA_PROVIDES:
lex >> provides_;
/// active characters
std::string const activeChars() const { return active_chars_; }
/// requirement (package, function)
- std::string const required() const { return requires_; }
+ std::string const required() const { return required_; }
/// provides feature
std::string const provides() const { return provides_; }
/// translatable GUI name
///
trivstring active_chars_;
///
- trivstring requires_;
+ trivstring required_;
///
trivstring provides_;
///
lex.eatLine();
vector<string> const req =
getVectorFromString(lex.getString(true));
- requires_.insert(req.begin(), req.end());
+ required_.insert(req.begin(), req.end());
break;
}
case Spacing::Default:
break;
}
- if (!requires_.empty()) {
+ if (!required_.empty()) {
os << "\tRequires ";
- for (set<string>::const_iterator it = requires_.begin();
- it != requires_.end(); ++it) {
- if (it != requires_.begin())
+ for (set<string>::const_iterator it = required_.begin();
+ it != required_.end(); ++it) {
+ if (it != required_.begin())
os << ',';
os << *it;
}
/// this layout for language \p lang
docstring const babelpreamble() const { return babelpreamble_; }
///
- std::set<std::string> const & required() const { return requires_; }
+ std::set<std::string> const & required() const { return required_; }
///
std::set<docstring> const & autonests() const { return autonests_; }
///
/// Are adjacent paragraphs handled as one group?
bool par_group_;
/// Packages needed for this layout
- std::set<std::string> requires_;
+ std::set<std::string> required_;
/// Layouts that are by default nested after this one
std::set<docstring> autonests_;
/// Layouts that by auto-nest this one
lexrc.eatLine();
vector<string> const req
= getVectorFromString(lexrc.getString());
- requires_.insert(req.begin(), req.end());
+ required_.insert(req.begin(), req.end());
break;
}
/// latex packages loaded by document class.
std::set<std::string> provides_;
/// latex packages requested by document class.
- std::set<std::string> requires_;
+ std::set<std::string> required_;
///
std::map<std::string, std::string> package_options_;
/// default modules wanted by document class
/// is this feature already provided by the class?
bool provides(std::string const & p) const;
/// features required by the class?
- std::set<std::string> const & required() const { return requires_; }
+ std::set<std::string> const & required() const { return required_; }
/// package options to write to LaTeX file
std::map<std::string, std::string> const & packageOptions() const
{ return package_options_; }
lex.eatLine();
vector<string> const req
= getVectorFromString(lex.getString(true));
- requires_.insert(req.begin(), req.end());
+ required_.insert(req.begin(), req.end());
break;
}
case IL_SPELLCHECK:
/// Defaults to true.
bool htmlisblock() const { return htmlisblock_; }
///
- std::set<std::string> required() const { return requires_; }
+ std::set<std::string> required() const { return required_; }
///
bool isMultiPar() const { return multipar_; }
///
///
bool htmlisblock_;
///
- std::set<std::string> requires_;
+ std::set<std::string> required_;
///
bool multipar_;
///
///
mutable std::map<BufferView const *, bool> editing_;
///
- std::string requires_;
+ std::string required_;
/// update macro representation
bool needsUpdate_;
///
d->nesting_ = nesting;
// update requires
- d->requires_ = d->macro_->required();
+ d->required_ = d->macro_->required();
if (!d->needsUpdate_
// non-normal mode? We are done!
// instant preview is on for math, in which case we will be missing
// the corresponding requirements.
// In this case, we get the required info from the global macro table.
- if (!d->requires_.empty())
- features.require(d->requires_);
+ if (!d->required_.empty())
+ features.require(d->required_);
else if (!d->macro_) {
// Update requires for known global macros.
MacroData const * data = MacroTable::globalMacros().get(name());