#include "Font.h"
#include "InsetList.h"
#include "Language.h"
-#include "LaTeXFeatures.h"
-#include "Layout.h"
#include "LyXRC.h"
#include "OutputParams.h"
#include "Paragraph.h"
#include "support/convert.h"
#include "support/debug.h"
#include "support/lstrings.h"
-#include "support/lyxalgo.h"
#include "support/textutils.h"
#include "support/gettext.h"
popLanguageName();
}
}
+ if (data.style->latextype == LATEX_BIB_ENVIRONMENT)
+ // bibliography needs a blank line after
+ // each item for backref to function properly
+ // (see #12041)
+ os << '\n';
state->nest_level_ -= 1;
string const & name = data.style->latexname();
if (!name.empty())
}
}
}
- if (runparams.for_search) {
+ if (runparams.for_search && argnr > 1) {
// Mark end of arguments for findadv() only
os << "\\endarguments{}";
}
string const name = prefix.empty() ?
arg->name() : split(arg->name(), ':');
size_t const nr = convert<size_t>(name);
- if (ilist.find(nr) == ilist.end())
- ilist[nr] = arg;
+ ilist.insert({nr, arg});
Layout::LaTeXArgMap::const_iterator const lit =
latexargs.find(arg->name());
if (lit != latexargs.end()) {
os << '\n' << '\n';
continue;
}
+ } else {
+ // This is the last par
+ Paragraph const & cpar = paragraphs.at(pit);
+ if (!runparams.for_search && !cpar.empty()
+ && cpar.isDeleted(0, cpar.size()) && !bparams.output_changes) {
+ if (!cpar.parEndChange().deleted())
+ os << '\n' << '\n';
+ continue;
+ }
}
TeXEnvironmentData const data =