本文整理汇总了C++中paragraphlist::const_iterator::expandDocBookLabel方法的典型用法代码示例。如果您正苦于以下问题:C++ const_iterator::expandDocBookLabel方法的具体用法?C++ const_iterator::expandDocBookLabel怎么用?C++ const_iterator::expandDocBookLabel使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类paragraphlist::const_iterator
的用法示例。
在下文中一共展示了const_iterator::expandDocBookLabel方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: makeCommand
ParagraphList::const_iterator makeCommand(Buffer const & buf,
odocstream & os,
OutputParams const & runparams,
Text const & text,
ParagraphList::const_iterator const & pbegin,
ParagraphList::const_iterator const & pend)
{
ParagraphList const & paragraphs = text.paragraphs();
ParagraphList::const_iterator par = pbegin;
Layout const & bstyle = par->layout();
//Open outter tag
sgml::openTag(buf, os, runparams, *pbegin);
os << '\n';
// Label around sectioning number:
if (!bstyle.labeltag().empty()) {
sgml::openTag(os, bstyle.labeltag());
// We don't care about appendix in DOCBOOK.
os << par->expandDocBookLabel(bstyle, buf.params());
sgml::closeTag(os, bstyle.labeltag());
}
// Opend inner tag and close inner tags
sgml::openTag(os, bstyle.innertag());
par->simpleDocBookOnePar(buf, os, runparams,
text.outerFont(distance(paragraphs.begin(), par)));
sgml::closeTag(os, bstyle.innertag());
os << '\n';
++par;
while (par != pend) {
Layout const & style = par->layout();
ParagraphList::const_iterator send;
switch (style.latextype) {
case LATEX_COMMAND: {
send = searchCommand(par, pend);
par = makeCommand(buf, os, runparams, text, par,send);
break;
}
case LATEX_ENVIRONMENT:
case LATEX_ITEM_ENVIRONMENT: {
send = searchEnvironment(par, pend);
par = makeEnvironment(buf, os, runparams, text, par,send);
break;
}
case LATEX_PARAGRAPH:
send = searchParagraph(par, pend);
par = makeParagraph(buf, os, runparams, text, par,send);
break;
default:
break;
}
}
// Close outter tag
sgml::closeTag(os, *pbegin);
return pend;
}