]> git.lyx.org Git - features.git/blobdiff - src/BiblioInfo.h
Amend efc0877f
[features.git] / src / BiblioInfo.h
index 3ef1ead5f39d92cc1379aca25a4d0a5d5fa07568..a08204ed5fe6f418e1ceb384633c78e9d1edb0dc 100644 (file)
@@ -35,6 +35,9 @@ CitationStyle citationStyleFromString(std::string const & latex_str,
 /// the other way round
 std::string citationStyleToString(CitationStyle const &, bool const latex = false);
 
+/// Transforms the information about authors into a <authorgroup> (directly written to a XMLStream).
+docstring authorsToDocBookAuthorGroup(docstring const & authorsString, XMLStream & xs, Buffer const & buf);
+
 
 /// Class to represent information about a BibTeX or
 /// bibliography entry.
@@ -67,12 +70,15 @@ public:
                                      bool const allnames = false, bool const beginning = true) const;
        ///
        docstring const getYear() const;
+       ///
+       void getLocators(docstring & doi, docstring & url, docstring & file) const;
        /// \return formatted BibTeX data suitable for framing.
        /// \param vector of pointers to crossref/xdata information
        docstring const & getInfo(BibTeXInfoList const & xrefs,
-                       Buffer const & buf, CiteItem const & ci) const;
+                                 Buffer const & buf, CiteItem const & ci,
+                                 docstring const & format = docstring()) const;
        /// \return formatted BibTeX data for a citation label
-       docstring const getLabel(BibTeXInfoList const xrefs,
+       docstring const getLabel(BibTeXInfoList const xrefs,
                Buffer const & buf, docstring const & format,
                CiteItem const & ci, bool next = false, bool second = false) const;
        ///
@@ -162,6 +168,8 @@ private:
        mutable docstring info_;
        /// a cache for getInfo(richtext = true)
        mutable docstring info_richtext_;
+       /// cache for last format pattern
+       mutable docstring format_;
        ///
        docstring cite_number_;
        ///
@@ -210,6 +218,9 @@ public:
        /// language.
        docstring const getYear(docstring const & key, Buffer const & buf,
                        bool use_modifier = false) const;
+       /// get either local pdf or web location of the citation referenced by key.
+       /// DOI/file are prefixed so they form proper URL for generic qt handler
+       void getLocators(docstring const & key, docstring & doi, docstring & url, docstring & file) const;
        ///
        docstring const getCiteNumber(docstring const & key) const;
        /// \return formatted BibTeX data associated with a given key.
@@ -219,7 +230,7 @@ public:
        /// output any richtext tags marked in the citation format and escape < and >
        /// elsewhere, and the general output context.
        docstring const getInfo(docstring const & key, Buffer const & buf,
-                       CiteItem const & ci) const;
+                       CiteItem const & ci, docstring const & format = docstring()) const;
        /// \return formatted BibTeX data for citation labels.
        /// Citation labels can have more than one key.
        docstring const getLabel(std::vector<docstring> keys, Buffer const & buf,