From fed71fa8c29b78de08f1678b31569e9348bbfeb7 Mon Sep 17 00:00:00 2001 From: Thibaut Cuvelier Date: Sat, 1 Aug 2020 03:51:14 +0200 Subject: [PATCH] DocBook: bug fixing with several bibliographic references at once. --- .../export/docbook/bibliography_precooked_aastex.xml | 4 ++-- src/insets/InsetCitation.cpp | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/autotests/export/docbook/bibliography_precooked_aastex.xml b/autotests/export/docbook/bibliography_precooked_aastex.xml index 33310b8f1c..cba8d88390 100644 --- a/autotests/export/docbook/bibliography_precooked_aastex.xml +++ b/autotests/export/docbook/bibliography_precooked_aastex.xml @@ -6,7 +6,7 @@
Introduction -A focal problem today in the dynamics of globular clusters is core collapse. It has been predicted by theory for decades , but observation has been less alert to the phenomenon. For many years the central brightness peak in M15 seemed a unique anomaly. Then suggested a central peak in NGC 6397, and a limited photographic survey of ours found three more cases, including NGC 6624, whose sharp center had often been remarked on . +A focal problem today in the dynamics of globular clusters is core collapse. It has been predicted by theory for decades , , , but observation has been less alert to the phenomenon. For many years the central brightness peak in M15 , seemed a unique anomaly. Then suggested a central peak in NGC 6397, and a limited photographic survey of ours found three more cases, including NGC 6624, whose sharp center had often been remarked on .
Observations @@ -65,7 +65,7 @@ B . All four cameras had scales of the order of 0.4 arcsec/pixel, and our field sizes were around 3 arcmin. -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 , as well as photoelectric profiles and electronographic profiles . In a few cases we judged normality by eye estimates on one of the Sky Surveys. +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 , , , , as well as photoelectric profiles , and electronographic profiles . In a few cases we judged normality by eye estimates on one of the Sky Surveys.
Helicity Amplitudes diff --git a/src/insets/InsetCitation.cpp b/src/insets/InsetCitation.cpp index 760c1da745..830648d1f6 100644 --- a/src/insets/InsetCitation.cpp +++ b/src/insets/InsetCitation.cpp @@ -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 keys = getVectorFromString(cleanupWhitespace(key)); bool const qualified = cs.hasQualifiedList - && (!getParam("pretextlist").empty() + && (!getParam("F").empty() || !getParam("posttextlist").empty()); if (runparams.inulemcmd > 0) -- 2.39.2