]> git.lyx.org Git - features.git/commitdiff
Replace "junior" with the more generic term "suffix".
authorJuergen Spitzmueller <spitz@lyx.org>
Sun, 19 Mar 2017 12:33:56 +0000 (13:33 +0100)
committerJuergen Spitzmueller <spitz@lyx.org>
Sun, 19 Mar 2017 12:33:56 +0000 (13:33 +0100)
lib/citeengines/basic.citeengine
lib/layouts/stdciteformats.inc
src/BiblioInfo.cpp

index cce91d708644abf6d972bb577ebdc02a8c8b7689..f4b6fffc0fd9218e4668da346d2b887dbc956041 100644 (file)
@@ -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
index da359fac2eb2e26ac66036cc452d25ab925bce25..a27bcf83c56c98a04f068121f4f0f9fbc3a9e4ba 100644 (file)
@@ -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.
index f9c752fcff20d0edf7bf24d702c74d1527bfd247..896688fcce7e8f6f4ce8ed29319b8003b61d3f1e 100644 (file)
@@ -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