Ejemplo n.º 1
0
void BufferEncodings::initUnicodeMath(Buffer const & buffer, bool for_master)
{
	if (for_master) {
		mathcmd.clear();
		textcmd.clear();
		mathsym.clear();
	}

	// Check this buffer
	Inset & inset = buffer.inset();
	InsetIterator it = inset_iterator_begin(inset);
	InsetIterator const end = inset_iterator_end(inset);
	for (; it != end; ++it)
		it->initUnicodeMath();

	if (!for_master)
		return;

	// Check children
	ListOfBuffers blist = buffer.getDescendents();
	ListOfBuffers::const_iterator bit = blist.begin();
	ListOfBuffers::const_iterator const bend = blist.end();
	for (; bit != bend; ++bit)
		initUnicodeMath(**bit, false);
}
Ejemplo n.º 2
0
// FIXME This should be changed to use the TOC. Perhaps
// that could be done when XHTML output is added.
int InsetPrintNomencl::docbook(odocstream & os, OutputParams const &) const
{
	os << "<glossary>\n";
	int newlines = 2;
	InsetIterator it = inset_iterator_begin(buffer().inset());
	while (it) {
		if (it->lyxCode() == NOMENCL_CODE) {
			newlines += static_cast<InsetNomencl const &>(*it).docbookGlossary(os);
			++it;
		} else if (!it->producesOutput()) {
			// Ignore contents of insets that are not in output
			size_t const depth = it.depth();
			++it;
			while (it.depth() > depth)
				++it;
		} else {
			++it;
		}
	}
	os << "</glossary>\n";
	return newlines;
}