]> git.lyx.org Git - lyx.git/commitdiff
Support for \fullcite in LyXHTML and text export (fixes #8491).
authorJulien Rioux <jrioux@lyx.org>
Fri, 25 Jan 2013 22:42:15 +0000 (23:42 +0100)
committerJulien Rioux <jrioux@lyx.org>
Wed, 6 Feb 2013 16:37:59 +0000 (17:37 +0100)
lib/layouts/jurabib.module
src/BiblioInfo.cpp

index 63e016e51a589023811f0f368dcf54c55eec3294..75b7d93abd9b7967cd78d7b82c711d4693f9a18d 100644 (file)
@@ -70,6 +70,7 @@ CiteFormat authoryear
        !citeauthor %!textbefore%%!startlink%%!shortauthor%%!endlink%%!textafter%%!nextauthor%
        !citeyear %!textbefore%%!startlink%%!year%%!endlink%%!textafter%%!nextyear%
        !citeyearpar %!textbefore%%!open%%!startlink%%!year%%!endlink%%!close%%!textafter%%!nextyearpar%
+       !fullcite {%textbefore%[[%textbefore% in: ]]}%bibentry%{%textafter%[[ %textafter%]]}%!nextfullcite%
 
        !nextcite {%next%[[%!sep% %!startlink%%!shortauthor%%!endlink%%!textafter2%%!nextcite%]]}
        !nextcitetitle {%next%[[%!sep% %!startlink%%!shortauthor%%!endlink%%!shorttitle%%!textafter2%%!nextcitetitle%]]}
@@ -79,6 +80,7 @@ CiteFormat authoryear
        !nextauthor {%next%[[%!sep% %!citeauthor%]]}
        !nextyear {%next%[[%!sep% %!citeyear%]]}
        !nextyearpar {%next%[[%!sep% %!citeyearpar%]]}
+       !nextfullcite {%next%[[%!sep% %bibentry%{%textafter%[[ %textafter%]]}%!nextfullcite%]]}
        !nextkey {%next%[[%!sep% %key%%!nextkey%]]}
 
        !shortauthor {%shortauthor%[[%shortauthor%]][[??]]}
@@ -99,6 +101,6 @@ CiteFormat authoryear
        citeauthor %!citeauthor%
        citeyear %!citeyear%
        citeyearpar %!citeyearpar%
-       fullcite {%dialog%[[%_bibentry%]][[%key%%!nextkey% (%_fullcite%)]]}
+       fullcite {%dialog%[[%_bibentry%]][[{%label%[[%!fullcite%]][[%key%%!nextkey% (%_fullcite%)]]}]]}
        nocite {%dialog%[[%_addtobib%]][[%key%%!nextkey% (%_notcited%)]]}
 End
index 38883e86fb89f0d8a6a941974b80cf332fed1401..84ea4f035f4241bef40b625a0e432e931ed1e2f5 100644 (file)
@@ -689,6 +689,14 @@ docstring BibTeXInfo::getValueForKey(string const & key, Buffer const & buf,
                                + " [" + operator[]("year") + "]";
                else
                        return operator[]("title");
+       } else if (key == "bibentry") {
+               // Special key to provide the full bibliography entry: see getInfo()
+               CiteEngineType const engine_type = buf.params().citeEngineType();
+               DocumentClass const & dc = buf.params().documentClass();
+               string const & format = dc.getCiteFormat(engine_type, to_utf8(entry_type_));
+               int counter = 0;
+               return expandFormat(format, xref, counter, buf,
+                       docstring(), docstring(), docstring(), false);
        } else if (key == "textbefore")
                return before;
        else if (key == "textafter")