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


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

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


在下文中一共展示了LaTeXFeatures::addCSSSnippet方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: validate

void InsetMathBig::validate(LaTeXFeatures & features) const
{
	if (features.runparams().math_flavor == OutputParams::MathAsHTML)
		features.addCSSSnippet(
			"span.bigsymbol{font-size: 150%;}\n"
			"span.biggsymbol{font-size: 200%;}\n"
			"span.bigggsymbol{font-size: 225%;}");
}
开发者ID:apex-hughin,项目名称:LyX,代码行数:8,代码来源:InsetMathBig.cpp

示例2: validate

void InsetMathCases::validate(LaTeXFeatures & features) const
{
	features.require("amsmath");
	InsetMathGrid::validate(features);
	if (features.runparams().math_flavor == OutputParams::MathAsHTML)
		// CSS based on eLyXer's
		features.addCSSSnippet(
			"table.cases{display: inline-block; text-align: center;"
			"border-left: thin solid black; vertical-align: middle; padding-left: 0.5ex;}\n"
			"table.cases td {text-align: left;}");
}
开发者ID:apex-hughin,项目名称:LyX,代码行数:11,代码来源:InsetMathCases.cpp

示例3: validate

// ideas borrowed from the eLyXer code
void InsetMathDecoration::validate(LaTeXFeatures & features) const
{
	if (features.runparams().math_flavor == OutputParams::MathAsHTML) {
		string const name = to_utf8(key_->name);
		if (name == "bar") {
			features.addCSSSnippet("span.overbar{border-top: thin black solid;}");
		} else if (name == "underbar" || name == "underline") {
			features.addCSSSnippet("span.underbar{border-bottom: thin black solid;}");
		} else {
			features.addCSSSnippet(
				"span.symbolpair{display: inline-block; text-align:center;}\n"
				"span.symontop{vertical-align: top;}\n"
				"span.symonbot{vertical-align: bottom;}\n"
				"span.symbolpair span{display: block;}\n"
				"span.symbol{height: 0.5ex;}");
		}
	} else {
		if (!key_->requires.empty())
			features.require(key_->requires);
	}
	InsetMathNest::validate(features);
}
开发者ID:apex-hughin,项目名称:LyX,代码行数:23,代码来源:InsetMathDecoration.cpp

示例4: validate

void InsetMathSymbol::validate(LaTeXFeatures & features) const
{
	// this is not really the ideal place to do this, but we can't
	// validate in InsetMathExInt.
	if (features.runparams().math_flavor == OutputParams::MathAsHTML
	    && sym_->name == from_ascii("int")) {
		features.addCSSSnippet(
			"span.limits{display: inline-block; vertical-align: middle; text-align:center; font-size: 75%;}\n"
			"span.limits span{display: block;}\n"
			"span.intsym{font-size: 150%;}\n"
			"sub.limit{font-size: 75%;}\n"
			"sup.limit{font-size: 75%;}");
	} else {
		if (!sym_->requires.empty())
			features.require(sym_->requires);
	}
}
开发者ID:cburschka,项目名称:lyx,代码行数:17,代码来源:InsetMathSymbol.cpp


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