* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
ParagraphList::const_iterator makeParagraph(Buffer const & buf,
odocstream & os,
OutputParams const & runparams,
ParagraphList::const_iterator makeParagraph(Buffer const & buf,
odocstream & os,
OutputParams const & runparams,
ParagraphList::const_iterator const & pbegin,
ParagraphList::const_iterator const & pend)
{
ParagraphList::const_iterator const & pbegin,
ParagraphList::const_iterator const & pend)
{
for (ParagraphList::const_iterator par = pbegin; par != pend; ++par) {
if (par != pbegin)
os << '\n';
if (buf.params().documentClass().isDefaultLayout(par->layout())
&& par->emptyTag()) {
par->simpleDocBookOnePar(buf, os, runparams,
for (ParagraphList::const_iterator par = pbegin; par != pend; ++par) {
if (par != pbegin)
os << '\n';
if (buf.params().documentClass().isDefaultLayout(par->layout())
&& par->emptyTag()) {
par->simpleDocBookOnePar(buf, os, runparams,
} else {
sgml::openTag(buf, os, runparams, *par);
par->simpleDocBookOnePar(buf, os, runparams,
} else {
sgml::openTag(buf, os, runparams, *par);
par->simpleDocBookOnePar(buf, os, runparams,
ParagraphList::const_iterator makeEnvironment(Buffer const & buf,
odocstream & os,
OutputParams const & runparams,
ParagraphList::const_iterator makeEnvironment(Buffer const & buf,
odocstream & os,
OutputParams const & runparams,
ParagraphList::const_iterator par = pbegin;
Layout const & defaultstyle = buf.params().documentClass().defaultLayout();
ParagraphList::const_iterator par = pbegin;
Layout const & defaultstyle = buf.params().documentClass().defaultLayout();
if (!bstyle.labeltag().empty()) {
sgml::openTag(os, bstyle.innertag(), id);
sgml::openTag(os, bstyle.labeltag());
if (!bstyle.labeltag().empty()) {
sgml::openTag(os, bstyle.innertag(), id);
sgml::openTag(os, bstyle.labeltag());
sgml::closeTag(os, bstyle.labeltag());
}
wrapper = defaultstyle.latexname();
sgml::closeTag(os, bstyle.labeltag());
}
wrapper = defaultstyle.latexname();
case LATEX_ITEM_ENVIRONMENT: {
if (par->params().depth() == pbegin->params().depth()) {
sgml::openTag(os, wrapper);
case LATEX_ITEM_ENVIRONMENT: {
if (par->params().depth() == pbegin->params().depth()) {
sgml::openTag(os, wrapper);
- par->simpleDocBookOnePar(buf, os, runparams, outerFont(distance(paragraphs.begin(), par), paragraphs), sep);
+ par->simpleDocBookOnePar(buf, os, runparams,
+ text.outerFont(distance(paragraphs.begin(), par)), sep);
sgml::closeTag(os, wrapper);
++par;
}
else {
send = searchEnvironment(par, pend);
sgml::closeTag(os, wrapper);
++par;
}
else {
send = searchEnvironment(par, pend);
- par = makeEnvironment(buf, os, runparams, paragraphs, par,send);
+ par = makeEnvironment(buf, os, runparams, text, par,send);
- par = makeParagraph(buf, os, runparams, paragraphs, par,send);
+ par = makeParagraph(buf, os, runparams, text, par,send);
+ case LATEX_LIST_ENVIRONMENT:
+ case LATEX_BIB_ENVIRONMENT:
+ case LATEX_COMMAND:
+ // FIXME This means that we are just skipping any paragraph that
+ // isn't implemented above, and this includes lists.
+ ++par;
ParagraphList::const_iterator makeCommand(Buffer const & buf,
odocstream & os,
OutputParams const & runparams,
ParagraphList::const_iterator makeCommand(Buffer const & buf,
odocstream & os,
OutputParams const & runparams,
ParagraphList::const_iterator const & pbegin,
ParagraphList::const_iterator const & pend)
{
ParagraphList::const_iterator const & pbegin,
ParagraphList::const_iterator const & pend)
{
if (!bstyle.labeltag().empty()) {
sgml::openTag(os, bstyle.labeltag());
// We don't care about appendix in DOCBOOK.
if (!bstyle.labeltag().empty()) {
sgml::openTag(os, bstyle.labeltag());
// We don't care about appendix in DOCBOOK.
sgml::closeTag(os, bstyle.labeltag());
}
// Opend inner tag and close inner tags
sgml::openTag(os, bstyle.innertag());
sgml::closeTag(os, bstyle.labeltag());
}
// Opend inner tag and close inner tags
sgml::openTag(os, bstyle.innertag());
- par->simpleDocBookOnePar(buf, os, runparams, outerFont(distance(paragraphs.begin(), par), paragraphs));
+ par->simpleDocBookOnePar(buf, os, runparams,
+ text.outerFont(distance(paragraphs.begin(), par)));
switch (style.latextype) {
case LATEX_COMMAND: {
send = searchCommand(par, pend);
switch (style.latextype) {
case LATEX_COMMAND: {
send = searchCommand(par, pend);
- par = makeCommand(buf, os, runparams, paragraphs, par,send);
+ par = makeCommand(buf, os, runparams, text, par,send);
break;
}
case LATEX_ENVIRONMENT:
case LATEX_ITEM_ENVIRONMENT: {
send = searchEnvironment(par, pend);
break;
}
case LATEX_ENVIRONMENT:
case LATEX_ITEM_ENVIRONMENT: {
send = searchEnvironment(par, pend);
- par = makeEnvironment(buf, os, runparams, paragraphs, par,send);
+ par = makeEnvironment(buf, os, runparams, text, par,send);
- par = makeParagraph(buf, os, runparams, paragraphs, par,send);
+ par = makeParagraph(buf, os, runparams, text, par,send);
ParagraphList::const_iterator par = paragraphs.begin();
ParagraphList::const_iterator pend = paragraphs.end();
ParagraphList::const_iterator par = paragraphs.begin();
ParagraphList::const_iterator pend = paragraphs.end();
// if only part of the paragraphs will be outputed
if (runparams.par_begin != runparams.par_end) {
par = boost::next(paragraphs.begin(), runparams.par_begin);
// if only part of the paragraphs will be outputed
if (runparams.par_begin != runparams.par_end) {
par = boost::next(paragraphs.begin(), runparams.par_begin);
switch (style.latextype) {
case LATEX_COMMAND: {
send = searchCommand(par, pend);
switch (style.latextype) {
case LATEX_COMMAND: {
send = searchCommand(par, pend);
- par = makeCommand(buf, os, runparams, paragraphs, par,send);
+ par = makeCommand(buf, os, runparams, text, par,send);
break;
}
case LATEX_ENVIRONMENT:
case LATEX_ITEM_ENVIRONMENT: {
send = searchEnvironment(par, pend);
break;
}
case LATEX_ENVIRONMENT:
case LATEX_ITEM_ENVIRONMENT: {
send = searchEnvironment(par, pend);
- par = makeEnvironment(buf, os, runparams, paragraphs, par,send);
+ par = makeEnvironment(buf, os, runparams, text, par,send);
- par = makeParagraph(buf, os, runparams, paragraphs, par,send);
+ par = makeParagraph(buf, os, runparams, text, par,send);