mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Outsource jurabib specials to the style file.
This commit is contained in:
parent
fa2cbb730c
commit
378a2c8257
@ -129,16 +129,24 @@ CiteFormat authoryear
|
|||||||
!open (
|
!open (
|
||||||
!sep ;
|
!sep ;
|
||||||
!close )
|
!close )
|
||||||
|
!obracket [
|
||||||
|
!cbracket ]
|
||||||
|
|
||||||
# A link that lets us jump to the bibliography entry in LyXHTML
|
# A link that lets us jump to the bibliography entry in LyXHTML
|
||||||
# %clean:key% will be substituted by the cite key to give a unique id
|
# %clean:key% will be substituted by the cite key to give a unique id
|
||||||
!startlink {!<a href='#LyXCite-%clean:key%'>!}
|
!startlink {!<a href='#LyXCite-%clean:key%'>!}
|
||||||
!endlink {!</a>!}
|
!endlink {!</a>!}
|
||||||
|
|
||||||
# "ShortAuthor" or "??"
|
# "ShortAuthor", "Author" or "??"
|
||||||
!shortauthor {%shortauthor%[[%shortauthor%]][[??]]}
|
!shortauthor {%shortauthor%[[%shortauthor%]][[{%abbrvauthor%[[%abbrvauthor%]][[??]]}]]}
|
||||||
# "... ShortTitle" (button) / "... ShortTitle <short title>" (dialog)
|
# "... ShortTitle"
|
||||||
!shorttitle {%shorttitle%[[ %shorttitle%]][[{%dialog%[[ <%_shorttitle%>]]}]]}
|
!shorttitle {%shorttitle%[[ %shorttitle%]][[{%dialog%[[ <%_shorttitle%>]][[%!makejurashorttitle%]]}]]}
|
||||||
|
# Title or "??"
|
||||||
|
!maketitle {%title%[[ %title%]][[ ??]]}
|
||||||
|
# "Journal Volume [Year]"
|
||||||
|
!jurashorttitle {%journal%[[ %journal%]]}{%volume%[[ %volume%]]}{%year%[[ %!obracket%%year%%!cbracket%]]}
|
||||||
|
# Handle short title fallback
|
||||||
|
!makejurashorttitle {%ifentrytype:article%[[%!jurashorttitle%]][[{%ifentrytype:periodical%[[%!jurashorttitle%]][[ %!maketitle%]]}]]}
|
||||||
# "prenote "
|
# "prenote "
|
||||||
!textbefore {%textbefore%[[%textbefore% ]]}
|
!textbefore {%textbefore%[[%textbefore% ]]}
|
||||||
# "/prenote" (button) / "/prenote/<before>" (dialog)
|
# "/prenote" (button) / "/prenote/<before>" (dialog)
|
||||||
|
@ -292,13 +292,6 @@ docstring const BibTeXInfo::getAuthorList(
|
|||||||
vector<docstring> const authors =
|
vector<docstring> const authors =
|
||||||
getVectorFromString(author, from_ascii(" and "));
|
getVectorFromString(author, from_ascii(" and "));
|
||||||
|
|
||||||
if (jurabib_style && (authors.size() == 2 || authors.size() == 3)) {
|
|
||||||
docstring shortauthor = familyName(authors[0])
|
|
||||||
+ "/" + familyName(authors[1]);
|
|
||||||
if (authors.size() == 3)
|
|
||||||
shortauthor += "/" + familyName(authors[2]);
|
|
||||||
return convertLaTeXCommands(shortauthor);
|
|
||||||
}
|
|
||||||
docstring retval;
|
docstring retval;
|
||||||
|
|
||||||
CiteEngineType const engine_type = buf ? buf->params().citeEngineType()
|
CiteEngineType const engine_type = buf ? buf->params().citeEngineType()
|
||||||
@ -763,20 +756,6 @@ docstring BibTeXInfo::getValueForKey(string const & oldkey, Buffer const & buf,
|
|||||||
ret = modifier_;
|
ret = modifier_;
|
||||||
else if (key == "numericallabel")
|
else if (key == "numericallabel")
|
||||||
ret = cite_number_;
|
ret = cite_number_;
|
||||||
else if (key == "shortauthor")
|
|
||||||
// When shortauthor is not defined, jurabib automatically
|
|
||||||
// provides jurabib-style abbreviated author names. We do
|
|
||||||
// this as well.
|
|
||||||
ret = getAbbreviatedAuthor(&buf, true);
|
|
||||||
else if (key == "shorttitle") {
|
|
||||||
// When shorttitle is not defined, jurabib uses for `article'
|
|
||||||
// and `periodical' entries the form `journal volume [year]'
|
|
||||||
// and for other types of entries it uses the `title' field.
|
|
||||||
if (entry_type_ == "article" || entry_type_ == "periodical")
|
|
||||||
ret = operator[]("journal") + " " + operator[]("volume")
|
|
||||||
+ " [" + operator[]("year") + "]";
|
|
||||||
else
|
|
||||||
ret = operator[]("title");
|
|
||||||
else if (key == "abbrvauthor") {
|
else if (key == "abbrvauthor") {
|
||||||
// Special key to provide abbreviated author names,
|
// Special key to provide abbreviated author names,
|
||||||
// with respect to maxcitenames.
|
// with respect to maxcitenames.
|
||||||
|
Loading…
Reference in New Issue
Block a user