本文整理汇总了C++中LaTeXFeatures::useLanguage方法的典型用法代码示例。如果您正苦于以下问题:C++ LaTeXFeatures::useLanguage方法的具体用法?C++ LaTeXFeatures::useLanguage怎么用?C++ LaTeXFeatures::useLanguage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LaTeXFeatures
的用法示例。
在下文中一共展示了LaTeXFeatures::useLanguage方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: validate
void Font::validate(LaTeXFeatures & features) const
{
BufferParams const & bparams = features.bufferParams();
Language const * doc_language = bparams.language;
if (bits_.noun() == FONT_ON) {
LYXERR(Debug::LATEX, "font.noun: " << bits_.noun());
features.require("noun");
LYXERR(Debug::LATEX, "Noun enabled. Font: " << to_utf8(stateText(0)));
}
if (bits_.underbar() == FONT_ON) {
LYXERR(Debug::LATEX, "font.underline: " << bits_.underbar());
features.require("ulem");
LYXERR(Debug::LATEX, "Underline enabled. Font: " << to_utf8(stateText(0)));
}
if (bits_.strikeout() == FONT_ON) {
LYXERR(Debug::LATEX, "font.strikeout: " << bits_.strikeout());
features.require("ulem");
LYXERR(Debug::LATEX, "Strikeout enabled. Font: " << to_utf8(stateText(0)));
}
if (bits_.uuline() == FONT_ON) {
LYXERR(Debug::LATEX, "font.uuline: " << bits_.uuline());
features.require("ulem");
LYXERR(Debug::LATEX, "Double underline enabled. Font: " << to_utf8(stateText(0)));
}
if (bits_.uwave() == FONT_ON) {
LYXERR(Debug::LATEX, "font.uwave: " << bits_.uwave());
features.require("ulem");
LYXERR(Debug::LATEX, "Wavy underline enabled. Font: " << to_utf8(stateText(0)));
}
switch (bits_.color()) {
case Color_none:
case Color_inherit:
case Color_ignore:
// probably we should put here all interface colors used for
// font displaying! For now I just add this ones I know of (Jug)
case Color_latex:
case Color_notelabel:
break;
default:
features.require("color");
LYXERR(Debug::LATEX, "Color enabled. Font: " << to_utf8(stateText(0)));
}
// FIXME: Do something for background and soul package?
if (((features.usePolyglossia() && lang_->polyglossia() != doc_language->polyglossia())
|| (features.useBabel() && lang_->babel() != doc_language->babel())
|| (doc_language->encoding()->package() == Encoding::CJK && lang_ != doc_language))
&& lang_ != ignore_language
&& lang_ != latex_language)
{
features.useLanguage(lang_);
LYXERR(Debug::LATEX, "Found language " << lang_->lang());
}
}