4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Angus Leeming
10 * Full author contact details are available in file CREDITS.
17 #include "InsetCommand.h"
19 #include "frontends/controllers/biblio.h"
25 /** Used to insert citations
27 class InsetCitation : public InsetCommand {
30 InsetCitation(InsetCommandParams const &);
32 docstring const getScreenLabel(Buffer const &) const;
34 EDITABLE editable() const { return IS_EDITABLE; }
36 InsetBase::Code lyxCode() const { return InsetBase::CITE_CODE; }
38 int latex(Buffer const &, odocstream &,
39 OutputParams const &) const;
41 int plaintext(Buffer const &, odocstream &,
42 OutputParams const &) const;
44 int docbook(Buffer const &, odocstream &,
45 OutputParams const &) const;
46 /// the string that is passed to the TOC
47 virtual int textString(Buffer const &, odocstream &,
48 OutputParams const &) const;
50 void validate(LaTeXFeatures &) const;
52 void replaceContents(std::string const & from, std::string const & to);
55 virtual std::auto_ptr<InsetBase> doClone() const
57 return std::auto_ptr<InsetBase>(new InsetCitation(params()));
60 /// This function does the donkey work of creating the pretty label
61 docstring const generateLabel(Buffer const &) const;
66 Cache() : engine(biblio::ENGINE_BASIC), params("cite") {}
68 biblio::CiteEngine engine;
70 InsetCommandParams params;
72 docstring generated_label;
74 docstring screen_label;
83 #endif // INSET_CITE_H