commit 7489cab6c93c0085f02db28fb6b4304e667e8867
Author: Juergen Spitzmueller <[email protected]>
Date: Sun Mar 19 13:33:56 2017 +0100
Replace "junior" with the more generic term "suffix".
---
lib/citeengines/basic.citeengine | 4 ++--
lib/layouts/stdciteformats.inc | 8 ++++----
src/BiblioInfo.cpp | 20 ++++++++++----------
3 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/lib/citeengines/basic.citeengine b/lib/citeengines/basic.citeengine
index cce91d7..f4b6fff 100644
--- a/lib/citeengines/basic.citeengine
+++ b/lib/citeengines/basic.citeengine
@@ -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
diff --git a/lib/layouts/stdciteformats.inc b/lib/layouts/stdciteformats.inc
index da359fa..a27bcf8 100644
--- a/lib/layouts/stdciteformats.inc
+++ b/lib/layouts/stdciteformats.inc
@@ -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.
diff --git a/src/BiblioInfo.cpp b/src/BiblioInfo.cpp
index f9c752f..896688f 100644
--- a/src/BiblioInfo.cpp
+++ b/src/BiblioInfo.cpp
@@ -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