From 21121f3fb5e6eab9aa6b7cfda88a27f68bee258f Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Thu, 11 Jun 2009 21:23:18 +0000 Subject: [PATCH] It is convenient for me to change this for use in XHTML output, but I also have been wanting to change it for a while. It is not very useful to have a bunch of years listed in the citations TOC (which you get if you have used \citeyear very often. Better, it seems to me, to see the citation keys. Of course, this can be switched again if need be, and I can figure out a different way to handle my own problem. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30053 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/insets/InsetBibtex.cpp | 7 +++++++ src/insets/InsetBibtex.h | 2 ++ src/insets/InsetCitation.cpp | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/insets/InsetBibtex.cpp b/src/insets/InsetBibtex.cpp index 1a03a821f9..7b824bbf01 100644 --- a/src/insets/InsetBibtex.cpp +++ b/src/insets/InsetBibtex.cpp @@ -900,6 +900,13 @@ void InsetBibtex::validate(LaTeXFeatures & features) const } +int InsetBibtex::xhtml(odocstream &, OutputParams const &) const +{ + //Toc const & toc = buffer().tocBackend().toc("citation"); + return 0; +} + + docstring InsetBibtex::contextMenu(BufferView const &, int, int) const { return from_ascii("context-bibtex"); diff --git a/src/insets/InsetBibtex.h b/src/insets/InsetBibtex.h index e48e39ee9c..c4cd812e3f 100644 --- a/src/insets/InsetBibtex.h +++ b/src/insets/InsetBibtex.h @@ -52,6 +52,8 @@ public: /// void validate(LaTeXFeatures &) const; /// + int xhtml(odocstream &, OutputParams const &) const; + /// static ParamInfo const & findInfo(std::string const &); /// static std::string defaultCommand() { return "bibtex"; }; diff --git a/src/insets/InsetCitation.cpp b/src/insets/InsetCitation.cpp index 25038a7e61..7ecea9c9a0 100644 --- a/src/insets/InsetCitation.cpp +++ b/src/insets/InsetCitation.cpp @@ -466,7 +466,7 @@ void InsetCitation::updateLabels(ParIterator const &) void InsetCitation::addToToc(DocIterator const & cpit) { Toc & toc = buffer().tocBackend().toc("citation"); - toc.push_back(TocItem(cpit, 0, cache.screen_label)); + toc.push_back(TocItem(cpit, 0, getParam("key"))); } -- 2.39.2