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 plaintext(Buffer const &, odocstream &, OutputParams const &) const;
39 int latex(Buffer const &, odocstream &,
40 OutputParams const &) const;
42 int docbook(Buffer const &, odocstream &,
43 OutputParams const &) const;
44 /// the string that is passed to the TOC
45 virtual int textString(Buffer const &, odocstream &,
46 OutputParams const &) const;
48 void validate(LaTeXFeatures &) const;
50 void replaceContents(std::string const & from, std::string const & to);
53 virtual std::auto_ptr<InsetBase> doClone() const
55 return std::auto_ptr<InsetBase>(new InsetCitation(params()));
58 /// This function does the donkey work of creating the pretty label
59 docstring const generateLabel(Buffer const &) const;
64 Cache() : engine(biblio::ENGINE_BASIC), params("cite") {}
66 biblio::CiteEngine engine;
68 InsetCommandParams params;
70 docstring generated_label;
72 docstring screen_label;
81 #endif // INSET_CITE_H