- /// return the year from the bibtex data record
- docstring const getYear(docstring const & key) const;
- /// Returns formatted BibTeX data associated with a given key.
- /// Empty if no info exists.
- docstring const getInfo(docstring const & key) const;
-
- /**
- * "Translates" the available Citation Styles into strings for a given key,
- * either numerical or author-year depending upon the active engine. (See
- * below for those methods.)
- */
- std::vector<docstring> const
- getCiteStrings(docstring const & key, Buffer const & buf) const;
- /**
- * "Translates" the available Citation Styles into strings for a given key.
- * The returned string is displayed by the GUI.
- * [XX] is used in place of the actual reference
- * Eg, the vector will contain: [XX], Jones et al. [XX], ...
- * User supplies :
- * the key,
- * the buffer
- */
- std::vector<docstring> const
- getNumericalStrings(docstring const & key, Buffer const & buf) const;
- /**
- * "Translates" the available Citation Styles into strings for a given key.
- * The returned string is displayed by the GUI.
- * Eg, the vector will contain:
- * Jones et al. (1990), (Jones et al. 1990), Jones et al. 1990, ...
- * User supplies :
- * the key,
- * the buffer
- */
- std::vector<docstring> const
- getAuthorYearStrings(docstring const & key, Buffer const & buf) const;
+ /// \return the year from the bibtex data record for \param key
+ /// if \param use_modifier is true, then we will also append any
+ /// modifier for this entry (e.g., 1998b).
+ /// Note that this will get the year from the crossref if it's
+ /// not present in the record itself.
+ docstring const getYear(docstring const & key,
+ bool use_modifier = false) const;
+ ///
+ docstring const getCiteNumber(docstring const & key) const;
+ /// \return formatted BibTeX data associated with a given key.
+ /// Empty if no info exists.
+ /// Note that this will retrieve data from the crossref as needed.
+ /// If \param richtext is true, then it will output any richtext tags
+ /// marked in the citation format and escape < and > elsewhere.
+ docstring const getInfo(docstring const & key, Buffer const & buf,
+ bool richtext = false) const;
+ /// \return formatted BibTeX data for citation labels.
+ /// Citation labels can have more than one key.
+ docstring const getLabel(std::vector<docstring> const & keys,
+ Buffer const & buf, std::string const & style, bool richtext = false,
+ docstring const & before = docstring(),
+ docstring const & after = docstring(),
+ docstring const & dialog = docstring()) const;
+ /// Is this a reference from a bibtex database
+ /// or from a bibliography environment?
+ bool isBibtex(docstring const & key) const;
+ /// Translates the available citation styles into strings for a given
+ /// list of keys, using either numerical or author-year style depending
+ /// upon the active engine.
+ std::vector<docstring> const getCiteStrings(std::vector<docstring> const & keys,
+ std::vector<CitationStyle> const & styles, Buffer const & buf, bool richtext = false,
+ docstring const & before = docstring(),
+ docstring const & after = docstring(),
+ docstring const & dialog = docstring()) const;
+ /// Collects the cited entries from buf.
+ void collectCitedEntries(Buffer const & buf);
+ /// A list of BibTeX keys cited in the current document, sorted by
+ /// the last name of the author.
+ /// Make sure you have called collectCitedEntries() before you try to
+ /// use this. You should probably call it just before you use this.
+ std::vector<docstring> const & citedEntries() const
+ { return cited_entries_; }
+ ///
+ void makeCitationLabels(Buffer const & buf);