mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
Replace "junior" with the more generic term "suffix".
This commit is contained in:
parent
5fdcca4c06
commit
7489cab6c9
@ -60,9 +60,9 @@ CiteFormat default
|
||||
!sep ,
|
||||
!close ]
|
||||
# Modify scheme of the first author in the bibliography
|
||||
!firstnameform %prename% %surname%{%junior%[[, %junior%]]}
|
||||
!firstnameform %prename% %surname%{%suffix%[[, %suffix%]]}
|
||||
# Modify scheme of other authors in the bibliography
|
||||
!othernameform %prename% %surname%{%junior%[[, %junior%]]}
|
||||
!othernameform %prename% %surname%{%suffix%[[, %suffix%]]}
|
||||
|
||||
# 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
|
||||
|
@ -32,13 +32,13 @@ CiteFormat default
|
||||
# Macros
|
||||
#
|
||||
# Scheme of the first author in the bibliography
|
||||
!firstnameform %surname%{%junior%[[, %junior%]]}{%prename%[[, %prename%]]}
|
||||
!firstnameform %surname%{%suffix%[[, %suffix%]]}{%prename%[[, %prename%]]}
|
||||
# Scheme of other authors in the bibliography
|
||||
!othernameform %surname%{%junior%[[, %junior%]]}{%prename%[[, %prename%]]}
|
||||
!othernameform %surname%{%suffix%[[, %suffix%]]}{%prename%[[, %prename%]]}
|
||||
# Scheme of the first name in later parts (such as book editor)
|
||||
!firstbynameform %prename% %surname%{%junior%[[, %junior%]]}
|
||||
!firstbynameform %prename% %surname%{%suffix%[[, %suffix%]]}
|
||||
# Scheme of other authors in later parts (such as book editor)
|
||||
!otherbynameform %prename% %surname%{%junior%[[, %junior%]]}
|
||||
!otherbynameform %prename% %surname%{%suffix%[[, %suffix%]]}
|
||||
# pagination
|
||||
!pages {%pages%[[, %_pptext% %pages%]]}
|
||||
# ed. or eds.
|
||||
|
@ -58,7 +58,7 @@ docstring renormalize(docstring const & input)
|
||||
struct name_parts {
|
||||
docstring surname;
|
||||
docstring prename;
|
||||
docstring junior;
|
||||
docstring suffix;
|
||||
};
|
||||
|
||||
|
||||
@ -101,7 +101,7 @@ name_parts nameParts(docstring const & iname)
|
||||
// If we have three pieces (the maximum allowed by BibTeX),
|
||||
// the second one is the jr part.
|
||||
if (pieces.size() > 2)
|
||||
res.junior = renormalize(pieces.at(1));
|
||||
res.suffix = renormalize(pieces.at(1));
|
||||
return res;
|
||||
}
|
||||
|
||||
@ -173,10 +173,10 @@ docstring constructName(docstring const & name, string const scheme)
|
||||
// to a given scheme
|
||||
docstring const prename = nameParts(name).prename;
|
||||
docstring const surname = nameParts(name).surname;
|
||||
docstring const junior = nameParts(name).junior;
|
||||
docstring const suffix = nameParts(name).suffix;
|
||||
string res = scheme;
|
||||
static regex const reg1("(.*)(\\{%prename%\\[\\[)([^\\]]+)(\\]\\]\\})(.*)");
|
||||
static regex const reg2("(.*)(\\{%junior%\\[\\[)([^\\]]+)(\\]\\]\\})(.*)");
|
||||
static regex const reg2("(.*)(\\{%suffix%\\[\\[)([^\\]]+)(\\]\\]\\})(.*)");
|
||||
smatch sub;
|
||||
if (regex_match(scheme, sub, reg1)) {
|
||||
res = sub.str(1);
|
||||
@ -186,14 +186,14 @@ docstring constructName(docstring const & name, string const scheme)
|
||||
}
|
||||
if (regex_match(res, sub, reg2)) {
|
||||
res = sub.str(1);
|
||||
if (!junior.empty())
|
||||
if (!suffix.empty())
|
||||
res += sub.str(3);
|
||||
res += sub.str(5);
|
||||
}
|
||||
docstring result = from_ascii(res);
|
||||
result = subst(result, from_ascii("%prename%"), prename);
|
||||
result = subst(result, from_ascii("%surname%"), surname);
|
||||
result = subst(result, from_ascii("%junior%"), junior);
|
||||
result = subst(result, from_ascii("%suffix%"), suffix);
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -476,15 +476,15 @@ docstring const BibTeXInfo::getAuthorList(Buffer const * buf,
|
||||
: " and ";
|
||||
string firstnameform =
|
||||
buf ? buf->params().documentClass().getCiteMacro(engine_type, "!firstnameform")
|
||||
: "%surname%{%junior%[[, %junior%]]}{%prename%[[, %prename%]]}";
|
||||
: "%surname%{%suffix%[[, %suffix%]]}{%prename%[[, %prename%]]}";
|
||||
if (!beginning)
|
||||
firstnameform = buf ? buf->params().documentClass().getCiteMacro(engine_type, "!firstbynameform")
|
||||
: "%prename% %surname%{%junior%[[, %junior%]]}";
|
||||
: "%prename% %surname%{%suffix%[[, %suffix%]]}";
|
||||
string othernameform = buf ? buf->params().documentClass().getCiteMacro(engine_type, "!othernameform")
|
||||
: "%surname%{%junior%[[, %junior%]]}{%prename%[[, %prename%]]}";
|
||||
: "%surname%{%suffix%[[, %suffix%]]}{%prename%[[, %prename%]]}";
|
||||
if (!beginning)
|
||||
othernameform = buf ? buf->params().documentClass().getCiteMacro(engine_type, "!otherbynameform")
|
||||
: "%prename% %surname%{%junior%[[, %junior%]]}";
|
||||
: "%prename% %surname%{%suffix%[[, %suffix%]]}";
|
||||
|
||||
// Shorten the list (with et al.) if forceshort is set
|
||||
// and the list can actually be shortened, else if maxcitenames
|
||||
|
Loading…
Reference in New Issue
Block a user