mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 19:25:39 +00:00
Use calculated labels in XHTML output.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32892 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
2098f1d8c2
commit
c90b4fcb87
@ -1458,7 +1458,7 @@ void Buffer::writeLyXHTMLSource(odocstream & os,
|
||||
validate(features);
|
||||
updateLabels(UpdateMaster, true);
|
||||
checkBibInfoCache();
|
||||
d->bibinfo_.collectCitedEntries(*this);
|
||||
d->bibinfo_.makeCitationLabels(*this);
|
||||
|
||||
if (!only_body) {
|
||||
os << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
|
||||
|
@ -533,10 +533,14 @@ docstring InsetCitation::xhtml(XHTMLStream & xs, OutputParams const &) const
|
||||
xs << ", ";
|
||||
first = false;
|
||||
}
|
||||
docstring const & label = bibinfo.label();
|
||||
docstring const & target = label.empty() ? *it : label;
|
||||
docstring citekey = bibinfo.citeKey();
|
||||
if (citekey.empty()) {
|
||||
citekey = bibinfo.label();
|
||||
if (citekey.empty())
|
||||
citekey = *it;
|
||||
}
|
||||
string const attr = "href='#" + to_utf8(*it) + "'";
|
||||
xs << StartTag("a", attr) << target << EndTag("a");
|
||||
xs << StartTag("a", attr) << citekey << EndTag("a");
|
||||
}
|
||||
|
||||
docstring const & after = getParam("after");
|
||||
|
Loading…
Reference in New Issue
Block a user