3 * \file InsetCitation.h
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 "InsetCode.h"
20 #include "BiblioInfo.h"
26 /** Used to insert citations
28 class InsetCitation : public InsetCommand {
31 InsetCitation(InsetCommandParams const &);
33 docstring const getScreenLabel(Buffer const &) const;
35 EDITABLE editable() const { return IS_EDITABLE; }
37 InsetCode lyxCode() const { return CITE_CODE; }
39 int latex(Buffer const &, odocstream &,
40 OutputParams const &) const;
42 int plaintext(Buffer const &, odocstream &,
43 OutputParams const &) const;
45 int docbook(Buffer const &, odocstream &,
46 OutputParams const &) const;
47 /// the string that is passed to the TOC
48 void textString(Buffer const &, odocstream &) const;
50 void validate(LaTeXFeatures &) const;
52 static ParamInfo const & findInfo(std::string const &);
53 //FIXME This is the locus of the design problem we have.
54 //It really ought to do what default_cite_command() does,
55 //but to do that it needs to know what CiteEngine we are
58 static std::string defaultCommand() { return "cite"; };
60 static bool isCompatibleCommand(std::string const & cmd);
63 virtual Inset * clone() const
64 { return new InsetCitation(params()); }
65 /// we'll eventually want to be able to get info on this from the
66 /// various CiteEngines
67 static ParamInfo param_info_;
68 /// This function does the donkey work of creating the pretty label
69 docstring const generateLabel(Buffer const &) const;
75 Cache() : engine(biblio::ENGINE_BASIC), params(CITE_CODE) {}
77 biblio::CiteEngine engine;
79 InsetCommandParams params;
81 docstring generated_label;
83 docstring screen_label;
92 #endif // INSET_CITE_H