X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FBiblioInfo.h;h=efe4bff233948d61e5785959e87a0f2815bd320f;hb=5f1bfdde1e1eb61987f178f643a08017dc3803f7;hp=b4d8ccf5f2d323f5998883fa1b6966ad4971abdb;hpb=5696be2a66d372d5d8fee3f59c30df4b5b2a41b8;p=lyx.git diff --git a/src/BiblioInfo.h b/src/BiblioInfo.h index b4d8ccf5f2..efe4bff233 100644 --- a/src/BiblioInfo.h +++ b/src/BiblioInfo.h @@ -62,7 +62,7 @@ public: /// \return formatted BibTeX data suitable for framing. /// \param pointer to crossref information docstring const & getInfo(BibTeXInfo const * const xref, - bool richtext) const; + Buffer const & buf, bool richtext) const; /// const_iterator find(docstring const & f) const { return bimap_.find(f); } /// @@ -117,8 +117,13 @@ private: /// material intended only for rich text (HTML) output should be /// wrapped in "{!" and "!}". it will be removed if richtext is /// false. - docstring expandFormat(docstring const & fmt, - BibTeXInfo const * const xref, bool richtext) const; + /// a simple macro facility is also available. keys that look like + /// "%!key%" are substituted with their definition. + /// moreover, keys that look like "%_key%" are treated as translatable + /// so that things like "pp." and "vol." can be translated. + docstring expandFormat(std::string const & fmt, + BibTeXInfo const * const xref, int & counter, + Buffer const & buf, bool richtext) const; /// true if from BibTeX; false if from bibliography environment bool is_bibtex_; /// the BibTeX key for this entry @@ -168,7 +173,9 @@ public: /// \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. - docstring const getInfo(docstring const & key, + /// 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; /// Is this a reference from a bibtex database /// or from a bibliography environment?