当前位置: 首页>>代码示例>>C++>>正文


C++ LaTeXFeatures::bufferParams方法代码示例

本文整理汇总了C++中LaTeXFeatures::bufferParams方法的典型用法代码示例。如果您正苦于以下问题:C++ LaTeXFeatures::bufferParams方法的具体用法?C++ LaTeXFeatures::bufferParams怎么用?C++ LaTeXFeatures::bufferParams使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在LaTeXFeatures的用法示例。


在下文中一共展示了LaTeXFeatures::bufferParams方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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());
	}
}
开发者ID:hashinisenaratne,项目名称:HSTML,代码行数:56,代码来源:Font.cpp

示例2: validate

void InsetCitation::validate(LaTeXFeatures & features) const
{
	switch (features.bufferParams().citeEngine()) {
	case ENGINE_BASIC:
		break;
	case ENGINE_NATBIB_AUTHORYEAR:
	case ENGINE_NATBIB_NUMERICAL:
		features.require("natbib");
		break;
	case ENGINE_JURABIB:
		features.require("jurabib");
		break;
	}
}
开发者ID:rpavlik,项目名称:lyx-lucid-backport,代码行数:14,代码来源:InsetCitation.cpp


注:本文中的LaTeXFeatures::bufferParams方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。