]> git.lyx.org Git - lyx.git/commitdiff
DocBook: bug fixing with several bibliographic references at once.
authorThibaut Cuvelier <tcuvelier@lyx.org>
Sat, 1 Aug 2020 01:51:14 +0000 (03:51 +0200)
committerThibaut Cuvelier <tcuvelier@lyx.org>
Sat, 1 Aug 2020 01:51:14 +0000 (03:51 +0200)
autotests/export/docbook/bibliography_precooked_aastex.xml
src/insets/InsetCitation.cpp

index 33310b8f1c772bd9ed8beb402a4b766cf2740f96..cba8d883904b626994f64adce8cbdab3910b789c 100644 (file)
@@ -6,7 +6,7 @@
 </info>
 <section>
 <title>Introduction</title>
-<Standard>A focal problem today in the dynamics of globular clusters is core collapse. It has been predicted by theory for decades <biblioref endterm="hen61.lyn68.spi85-0" />, but observation has been less alert to the phenomenon. For many years the central brightness peak in M15 <biblioref endterm="kin75.new78-1" /> seemed a unique anomaly. Then <biblioref endterm="aur82" /> suggested a central peak in NGC 6397, and a limited photographic survey of ours <biblioref endterm="djo84" /> found three more cases, including NGC 6624, whose sharp center had often been remarked on <biblioref endterm="can78" />. </Standard>
+<Standard>A focal problem today in the dynamics of globular clusters is core collapse. It has been predicted by theory for decades <biblioref endterm="hen61" />, <biblioref endterm="lyn68" />, <biblioref endterm="spi85" />, but observation has been less alert to the phenomenon. For many years the central brightness peak in M15 <biblioref endterm="kin75" />, <biblioref endterm="new78" /> seemed a unique anomaly. Then <biblioref endterm="aur82" /> suggested a central peak in NGC 6397, and a limited photographic survey of ours <biblioref endterm="djo84" /> found three more cases, including NGC 6624, whose sharp center had often been remarked on <biblioref endterm="can78" />. </Standard>
 </section>
 <section>
 <title>Observations</title>
@@ -65,7 +65,7 @@
  <m:mrow><m:mi>B</m:mi>
  </m:mrow>
  </m:math></inlineequation>. All four cameras had scales of the order of 0.4 arcsec/pixel, and our field sizes were around 3 arcmin.</Standard>
-<Standard>The CCD images are unfortunately not always suitable, for very poor clusters or for clusters with large cores. Since the latter are easily studied by other means, we augmented our own CCD profiles by collecting from the literature a number of star-count profiles <biblioref endterm="kin68.pet76.har84.ort85-2" />, as well as photoelectric profiles <biblioref endterm="kin66.kin75-3" /> and electronographic profiles <biblioref endterm="kro84" />. In a few cases we judged normality by eye estimates on one of the Sky Surveys.</Standard>
+<Standard>The CCD images are unfortunately not always suitable, for very poor clusters or for clusters with large cores. Since the latter are easily studied by other means, we augmented our own CCD profiles by collecting from the literature a number of star-count profiles <biblioref endterm="kin68" />, <biblioref endterm="pet76" />, <biblioref endterm="har84" />, <biblioref endterm="ort85" />, as well as photoelectric profiles <biblioref endterm="kin66" />, <biblioref endterm="kin75" /> and electronographic profiles <biblioref endterm="kro84" />. In a few cases we judged normality by eye estimates on one of the Sky Surveys.</Standard>
 </section>
 <section>
 <title>Helicity Amplitudes</title>
index 760c1da745fd49f4e8751adbd8011946d50de275..830648d1f67b1fbb8faff45006e7f578a29175cd 100644 (file)
@@ -552,14 +552,15 @@ void InsetCitation::docbook(XMLStream & xs, OutputParams const &) const
                return;
 
        // Split the different citations (on ","), so that one tag can be output for each of them.
-       string citations = to_utf8(xml::cleanID(getParam("key")));
+       // DocBook does not support having multiple citations in one tag, so that we have to deal with formatting here.
+       docstring citations = getParam("key");
        if (citations.find(',') == string::npos) {
-               xs << xml::CompTag("biblioref", "endterm=\"" + citations + "\"");
+               xs << xml::CompTag("biblioref", "endterm=\"" + to_utf8(xml::cleanID(citations)) + "\"");
        } else {
                size_t pos = 0;
                while (pos != string::npos) {
                        pos = citations.find(',');
-                       xs << xml::CompTag("biblioref", "endterm=\"" + citations.substr(0, pos) + "\"");
+                       xs << xml::CompTag("biblioref", "endterm=\"" + to_utf8(xml::cleanID(citations.substr(0, pos))) + "\"");
                        citations.erase(0, pos + 1);
 
                        if (pos != string::npos) {
@@ -627,7 +628,7 @@ void InsetCitation::latex(otexstream & os, OutputParams const & runparams) const
        // check if we have to do a qualified list
        vector<docstring> keys = getVectorFromString(cleanupWhitespace(key));
        bool const qualified = cs.hasQualifiedList
-               && (!getParam("pretextlist").empty()
+               && (!getParam("F").empty()
                    || !getParam("posttextlist").empty());
 
        if (runparams.inulemcmd > 0)