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"
18 #include "bufferparams.h"
24 /** Used to insert citations
26 class InsetCitation : public InsetCommand {
29 InsetCitation(InsetCommandParams const &);
31 docstring const getScreenLabel(Buffer const &) const;
33 EDITABLE editable() const { return IS_EDITABLE; }
35 InsetBase::Code lyxCode() const { return InsetBase::CITE_CODE; }
37 int latex(Buffer const &, odocstream &,
38 OutputParams const &) const;
40 int plaintext(Buffer const &, odocstream &,
41 OutputParams const &) const;
43 int docbook(Buffer const &, odocstream &,
44 OutputParams const &) const;
45 /// the string that is passed to the TOC
46 virtual int textString(Buffer const &, odocstream &,
47 OutputParams const &) const;
49 void validate(LaTeXFeatures &) const;
51 void replaceContents(std::string const & from, std::string const & to);
54 virtual std::auto_ptr<InsetBase> doClone() const
56 return std::auto_ptr<InsetBase>(new InsetCitation(params()));
59 /// This function does the donkey work of creating the pretty label
60 docstring const generateLabel(Buffer const &) const;
65 Cache() : engine(biblio::ENGINE_BASIC), params("cite") {}
67 biblio::CiteEngine engine;
69 InsetCommandParams params;
71 docstring generated_label;
73 docstring screen_label;
82 #endif // INSET_CITE_H