#StackBounty: #bibliographies #acronyms #key-value #amsrefs The 'inverted' attribute is not recognized if a DefineName abbrevi…

Bounty: 50

In Section 8.1 of the AMSRefs package documentation, it is explained that to properly typeset author names that are to be written with the family name first, one should set the attribute inverted on that name; for example: author={Li, Lian Jie}*{inverted={yes}} will typeset correctly as ‘Li Lian Jie’ (and not as ‘Li, Lian Jie’ or ‘Lian Jie Li’). Trying to use author={Li Lian Jie} to force the correct name will not work if, for instance, the option initials or the option alphabetic is called.

In Section 8.4, it is explained that one can write DefineName{dmj}{Jones, David M.} and then use the abbreviation as author={dmj} in any bib entry.

However, when I use an abbreviation in a bib entry, the inverted attribute is not recognized. This happens even if there are multiple authors in a bib entry and any one name is entered using an abbreviation, and even if that name is not the one to which the inverted attribute is being passed. Here’s an MCVE:

documentclass{amsart}

usepackage{amsrefs}

DefineName{aut-f}{Author, First}
DefineName{aut-s}{Author, Second}

begin{document}

begin{bibdiv}
begin{biblist}

raggedright

bib{art1}{article}{
    author={Author, First}*{inverted={yes}},
    author={Author, Second}*{inverted={yes}},
    title={Title of the paper},
    journal={Journal of interesting results},
    volume={10},
    date={2021},
    number={3},
    pages={8ndash 11},
    review={MR{12345}},
}

end{biblist}
end{bibdiv}

end{document}

The output for the above example looks like this:

Author First and Author Second, Title of the paper, Journal of interesting results 10 (2021), no. 3, 8–11. MR12345

Now, if I write author={aut-f} instead of author={Author, First}, the output changes to:

First Author and Second Author, Title of the paper, Journal of interesting results 10 (2021), no. 3, 8–11. MR12345

That is, it behaves as if the inverted attribute is not passed to any of the entries. The output remains as above regardless of how I mix and match the inverted attributes with the abbreviations.

I also tried adding *{inverted={yes}} to the DefineName commands, but that throws out LaTeX Error: Missing begin{document}.

Question: How can I get the inverted attribute to work with the DefineName abbreviations?


I tried looking at the documented source, but I was not really able to gather anything of use on my own. I noticed that DefineSimpleKey{prop}{inverted} is defined on line 236, and we have on lines 2450–2461:

defset@name@a#1{%
    begingroup
        get@current@properties
        select@auxlanguage
        def@tempa{yes}%
        ifx@tempaprop’inverted
            setbib@nameBE
        else
            #1%
        fi
    endgroup
}

But, I’m not sure how to relate this to the definition of DefineName given on lines 1244–1246:

newcommand{DefineName}[2]{%
    bib*{#1}{name}{name={#2}}%
}

I also looked at the documentation for the rkeyval package to find out whether the key value option *{inverted={yes}} needs to somehow be added to the definition of the command DefineName, but once again I didn’t get much out of it (being far too much of a novice). For instance, on page 3 of the rkeyval documentation the following is mentioned:

Test for a trailing option marked by a star. Usage:

newcommand{blub}[1]{star@{blubaux{#1}}{default}}

Arg 1 of star@ is the code to be run, arg 2 is the default value of the option (could be empty). If arg 1 is moo, this test discards a star and expands to moo if a star is found, or expands to moo{#2} if not. As the example shows, arg 1 need not be a single token.

10 defstar@#1#2{%
11     defstar@a##1{#1}%
12     defstar@b{#1{#2}}%
13     futurelet@let@tokenstar@test
14 }
15
16 defstar@test{ifx*@let@token letstar@bstar@afi star@b}

Perhaps this is relevant? I’m honestly quite lost.


I also noticed that if I define a command called DefineInvertedName analogously to DefineName as

newcommand{DefineInvertedName}[2]{%
    bib*{#1}{name}{name={#2}*{inverted={yes}}}%
}

followed by adding

DefineInvertedName{aut-f1}{Author, First}
DefineInvertedName{aut-s1}{Author, Second}

to the preamble in the MCVE above, and using author={aut-f1} and author={aut-s1} in the bib entry, gives this as the output:

First Author and Author Second, Title of the paper, Journal of interesting results 10 (2021), no. 3, 8–11. MR12345

That is, only the last author entry is inverted. The same happens when I create a bib entry with more than two authors: only the last author entry is inverted. This is possibly a byproduct of the way multiple author entries are strung together by AMSRefs, but I’m not able to pinpoint exactly why it is so.


Get this bounty!!!

#StackBounty: #bibliographies #acronyms #key-value #amsrefs The 'inverted' attribute is not recognized if a DefineName abbrevi…

Bounty: 50

In Section 8.1 of the AMSRefs package documentation, it is explained that to properly typeset author names that are to be written with the family name first, one should set the attribute inverted on that name; for example: author={Li, Lian Jie}*{inverted={yes}} will typeset correctly as ‘Li Lian Jie’ (and not as ‘Li, Lian Jie’ or ‘Lian Jie Li’). Trying to use author={Li Lian Jie} to force the correct name will not work if, for instance, the option initials or the option alphabetic is called.

In Section 8.4, it is explained that one can write DefineName{dmj}{Jones, David M.} and then use the abbreviation as author={dmj} in any bib entry.

However, when I use an abbreviation in a bib entry, the inverted attribute is not recognized. This happens even if there are multiple authors in a bib entry and any one name is entered using an abbreviation, and even if that name is not the one to which the inverted attribute is being passed. Here’s an MCVE:

documentclass{amsart}

usepackage{amsrefs}

DefineName{aut-f}{Author, First}
DefineName{aut-s}{Author, Second}

begin{document}

begin{bibdiv}
begin{biblist}

raggedright

bib{art1}{article}{
    author={Author, First}*{inverted={yes}},
    author={Author, Second}*{inverted={yes}},
    title={Title of the paper},
    journal={Journal of interesting results},
    volume={10},
    date={2021},
    number={3},
    pages={8ndash 11},
    review={MR{12345}},
}

end{biblist}
end{bibdiv}

end{document}

The output for the above example looks like this:

Author First and Author Second, Title of the paper, Journal of interesting results 10 (2021), no. 3, 8–11. MR12345

Now, if I write author={aut-f} instead of author={Author, First}, the output changes to:

First Author and Second Author, Title of the paper, Journal of interesting results 10 (2021), no. 3, 8–11. MR12345

That is, it behaves as if the inverted attribute is not passed to any of the entries. The output remains as above regardless of how I mix and match the inverted attributes with the abbreviations.

I also tried adding *{inverted={yes}} to the DefineName commands, but that throws out LaTeX Error: Missing begin{document}.

Question: How can I get the inverted attribute to work with the DefineName abbreviations?


I tried looking at the documented source, but I was not really able to gather anything of use on my own. I noticed that DefineSimpleKey{prop}{inverted} is defined on line 236, and we have on lines 2450–2461:

defset@name@a#1{%
    begingroup
        get@current@properties
        select@auxlanguage
        def@tempa{yes}%
        ifx@tempaprop’inverted
            setbib@nameBE
        else
            #1%
        fi
    endgroup
}

But, I’m not sure how to relate this to the definition of DefineName given on lines 1244–1246:

newcommand{DefineName}[2]{%
    bib*{#1}{name}{name={#2}}%
}

I also looked at the documentation for the rkeyval package to find out whether the key value option *{inverted={yes}} needs to somehow be added to the definition of the command DefineName, but once again I didn’t get much out of it (being far too much of a novice). For instance, on page 3 of the rkeyval documentation the following is mentioned:

Test for a trailing option marked by a star. Usage:

newcommand{blub}[1]{star@{blubaux{#1}}{default}}

Arg 1 of star@ is the code to be run, arg 2 is the default value of the option (could be empty). If arg 1 is moo, this test discards a star and expands to moo if a star is found, or expands to moo{#2} if not. As the example shows, arg 1 need not be a single token.

10 defstar@#1#2{%
11     defstar@a##1{#1}%
12     defstar@b{#1{#2}}%
13     futurelet@let@tokenstar@test
14 }
15
16 defstar@test{ifx*@let@token letstar@bstar@afi star@b}

Perhaps this is relevant? I’m honestly quite lost.


I noticed that if I define a command called DefineInvertedName analogously to DefineName as

newcommand{DefineInvertedName}[2]{%
    bib*{#1}{name}{name={#2}*{inverted={yes}}}%
}

then adding

DefineInvertedName{aut-f1}{Author, First}
DefineInvertedName{aut-s1}{Author, Second}

to the preamble in the MCVE above, and using author={aut-f1} and author={aut-s1} in the bib entry gives as output:

First Author and Author Second, Title of the paper, Journal of interesting results 10 (2021), no. 3, 8–11. MR12345

That is, only the last author entry is inverted. The same happens when I create a bib entry with more than two authors: only the last author entry is inverted. This is possibly a byproduct of the way multiple author entries are strung together by AMSRefs, but I’m not able to pinpoint exactly why it is so.


Get this bounty!!!

#StackBounty: #bibliographies #acronyms #key-value #amsrefs The 'inverted' attribute is not recognized if a DefineName abbrevi…

Bounty: 50

In Section 8.1 of the AMSRefs package documentation, it is explained that to properly typeset author names that are to be written with the family name first, one should set the attribute inverted on that name; for example: author={Li, Lian Jie}*{inverted={yes}} will typeset correctly as ‘Li Lian Jie’ (and not as ‘Li, Lian Jie’ or ‘Lian Jie Li’). Trying to use author={Li Lian Jie} to force the correct name will not work if, for instance, the option initials or the option alphabetic is called.

In Section 8.4, it is explained that one can write DefineName{dmj}{Jones, David M.} and then use the abbreviation as author={dmj} in any bib entry.

However, when I use an abbreviation in a bib entry, the inverted attribute is not recognized. This happens even if there are multiple authors in a bib entry and any one name is entered using an abbreviation, and even if that name is not the one to which the inverted attribute is being passed. Here’s an MCVE:

documentclass{amsart}

usepackage{amsrefs}

DefineName{aut-f}{Author, First}
DefineName{aut-s}{Author, Second}

begin{document}

begin{bibdiv}
begin{biblist}

raggedright

bib{art1}{article}{
    author={Author, First}*{inverted={yes}},
    author={Author, Second}*{inverted={yes}},
    title={Title of the paper},
    journal={Journal of interesting results},
    volume={10},
    date={2021},
    number={3},
    pages={8ndash 11},
    review={MR{12345}},
}

end{biblist}
end{bibdiv}

end{document}

The output for the above example looks like this:

Author First and Author Second, Title of the paper, Journal of interesting results 10 (2021), no. 3, 8–11. MR12345

Now, if I write author={aut-f} instead of author={Author, First}, the output changes to:

First Author and Second Author, Title of the paper, Journal of interesting results 10 (2021), no. 3, 8–11. MR12345

That is, it behaves as if the inverted attribute is not passed to any of the entries. The output remains as above regardless of how I mix and match the inverted attributes with the abbreviations.

I also tried adding *{inverted={yes}} to the DefineName commands, but that throws out LaTeX Error: Missing begin{document}.

Question: How can I get the inverted attribute to work with the DefineName abbreviations?


I tried looking at the documented source, but I was not really able to gather anything of use on my own. I noticed that DefineSimpleKey{prop}{inverted} is defined on line 236, and we have on lines 2450–2461:

defset@name@a#1{%
    begingroup
        get@current@properties
        select@auxlanguage
        def@tempa{yes}%
        ifx@tempaprop’inverted
            setbib@nameBE
        else
            #1%
        fi
    endgroup
}

But, I’m not sure how to relate this to the definition of DefineName given on lines 1244–1246:

newcommand{DefineName}[2]{%
    bib*{#1}{name}{name={#2}}%
}

I also looked at the documentation for the rkeyval package to find out whether the key value option *{inverted={yes}} needs to somehow be added to the definition of the command DefineName, but once again I didn’t get much out of it (being far too much of a novice). For instance, on page 3 of the rkeyval documentation the following is mentioned:

Test for a trailing option marked by a star. Usage:

newcommand{blub}[1]{star@{blubaux{#1}}{default}}

Arg 1 of star@ is the code to be run, arg 2 is the default value of the option (could be empty). If arg 1 is moo, this test discards a star and expands to moo if a star is found, or expands to moo{#2} if not. As the example shows, arg 1 need not be a single token.

10 defstar@#1#2{%
11     defstar@a##1{#1}%
12     defstar@b{#1{#2}}%
13     futurelet@let@tokenstar@test
14 }
15
16 defstar@test{ifx*@let@token letstar@bstar@afi star@b}

Perhaps this is relevant? I’m honestly quite lost.


I noticed that if I define a command called DefineInvertedName analogously to DefineName as

newcommand{DefineInvertedName}[2]{%
    bib*{#1}{name}{name={#2}*{inverted={yes}}}%
}

then adding

DefineInvertedName{aut-f1}{Author, First}
DefineInvertedName{aut-s1}{Author, Second}

to the preamble in the MCVE above, and using author={aut-f1} and author={aut-s1} in the bib entry gives as output:

First Author and Author Second, Title of the paper, Journal of interesting results 10 (2021), no. 3, 8–11. MR12345

That is, only the last author entry is inverted. The same happens when I create a bib entry with more than two authors: only the last author entry is inverted. This is possibly a byproduct of the way multiple author entries are strung together by AMSRefs, but I’m not able to pinpoint exactly why it is so.


Get this bounty!!!

#StackBounty: #bibliographies #acronyms #key-value #amsrefs The 'inverted' attribute is not recognized if a DefineName abbrevi…

Bounty: 50

In Section 8.1 of the AMSRefs package documentation, it is explained that to properly typeset author names that are to be written with the family name first, one should set the attribute inverted on that name; for example: author={Li, Lian Jie}*{inverted={yes}} will typeset correctly as ‘Li Lian Jie’ (and not as ‘Li, Lian Jie’ or ‘Lian Jie Li’). Trying to use author={Li Lian Jie} to force the correct name will not work if, for instance, the option initials or the option alphabetic is called.

In Section 8.4, it is explained that one can write DefineName{dmj}{Jones, David M.} and then use the abbreviation as author={dmj} in any bib entry.

However, when I use an abbreviation in a bib entry, the inverted attribute is not recognized. This happens even if there are multiple authors in a bib entry and any one name is entered using an abbreviation, and even if that name is not the one to which the inverted attribute is being passed. Here’s an MCVE:

documentclass{amsart}

usepackage{amsrefs}

DefineName{aut-f}{Author, First}
DefineName{aut-s}{Author, Second}

begin{document}

begin{bibdiv}
begin{biblist}

raggedright

bib{art1}{article}{
    author={Author, First}*{inverted={yes}},
    author={Author, Second}*{inverted={yes}},
    title={Title of the paper},
    journal={Journal of interesting results},
    volume={10},
    date={2021},
    number={3},
    pages={8ndash 11},
    review={MR{12345}},
}

end{biblist}
end{bibdiv}

end{document}

The output for the above example looks like this:

Author First and Author Second, Title of the paper, Journal of interesting results 10 (2021), no. 3, 8–11. MR12345

Now, if I write author={aut-f} instead of author={Author, First}, the output changes to:

First Author and Second Author, Title of the paper, Journal of interesting results 10 (2021), no. 3, 8–11. MR12345

That is, it behaves as if the inverted attribute is not passed to any of the entries. The output remains as above regardless of how I mix and match the inverted attributes with the abbreviations.

I also tried adding *{inverted={yes}} to the DefineName commands, but that throws out LaTeX Error: Missing begin{document}.

Question: How can I get the inverted attribute to work with the DefineName abbreviations?


I tried looking at the documented source, but I was not really able to gather anything of use on my own. I noticed that DefineSimpleKey{prop}{inverted} is defined on line 236, and we have on lines 2450–2461:

defset@name@a#1{%
    begingroup
        get@current@properties
        select@auxlanguage
        def@tempa{yes}%
        ifx@tempaprop’inverted
            setbib@nameBE
        else
            #1%
        fi
    endgroup
}

But, I’m not sure how to relate this to the definition of DefineName given on lines 1244–1246:

newcommand{DefineName}[2]{%
    bib*{#1}{name}{name={#2}}%
}

I also looked at the documentation for the rkeyval package to find out whether the key value option *{inverted={yes}} needs to somehow be added to the definition of the command DefineName, but once again I didn’t get much out of it (being far too much of a novice). For instance, on page 3 of the rkeyval documentation the following is mentioned:

Test for a trailing option marked by a star. Usage:

newcommand{blub}[1]{star@{blubaux{#1}}{default}}

Arg 1 of star@ is the code to be run, arg 2 is the default value of the option (could be empty). If arg 1 is moo, this test discards a star and expands to moo if a star is found, or expands to moo{#2} if not. As the example shows, arg 1 need not be a single token.

10 defstar@#1#2{%
11     defstar@a##1{#1}%
12     defstar@b{#1{#2}}%
13     futurelet@let@tokenstar@test
14 }
15
16 defstar@test{ifx*@let@token letstar@bstar@afi star@b}

Perhaps this is relevant? I’m honestly quite lost.


I noticed that if I define a command called DefineInvertedName analogously to DefineName as

newcommand{DefineInvertedName}[2]{%
    bib*{#1}{name}{name={#2}*{inverted={yes}}}%
}

then adding

DefineInvertedName{aut-f1}{Author, First}
DefineInvertedName{aut-s1}{Author, Second}

to the preamble in the MCVE above, and using author={aut-f1} and author={aut-s1} in the bib entry gives as output:

First Author and Author Second, Title of the paper, Journal of interesting results 10 (2021), no. 3, 8–11. MR12345

That is, only the last author entry is inverted. The same happens when I create a bib entry with more than two authors: only the last author entry is inverted. This is possibly a byproduct of the way multiple author entries are strung together by AMSRefs, but I’m not able to pinpoint exactly why it is so.


Get this bounty!!!

#StackBounty: #bibliographies #acronyms #key-value #amsrefs The 'inverted' attribute is not recognized if a DefineName abbrevi…

Bounty: 50

In Section 8.1 of the AMSRefs package documentation, it is explained that to properly typeset author names that are to be written with the family name first, one should set the attribute inverted on that name; for example: author={Li, Lian Jie}*{inverted={yes}} will typeset correctly as ‘Li Lian Jie’ (and not as ‘Li, Lian Jie’ or ‘Lian Jie Li’). Trying to use author={Li Lian Jie} to force the correct name will not work if, for instance, the option initials or the option alphabetic is called.

In Section 8.4, it is explained that one can write DefineName{dmj}{Jones, David M.} and then use the abbreviation as author={dmj} in any bib entry.

However, when I use an abbreviation in a bib entry, the inverted attribute is not recognized. This happens even if there are multiple authors in a bib entry and any one name is entered using an abbreviation, and even if that name is not the one to which the inverted attribute is being passed. Here’s an MCVE:

documentclass{amsart}

usepackage{amsrefs}

DefineName{aut-f}{Author, First}
DefineName{aut-s}{Author, Second}

begin{document}

begin{bibdiv}
begin{biblist}

raggedright

bib{art1}{article}{
    author={Author, First}*{inverted={yes}},
    author={Author, Second}*{inverted={yes}},
    title={Title of the paper},
    journal={Journal of interesting results},
    volume={10},
    date={2021},
    number={3},
    pages={8ndash 11},
    review={MR{12345}},
}

end{biblist}
end{bibdiv}

end{document}

The output for the above example looks like this:

Author First and Author Second, Title of the paper, Journal of interesting results 10 (2021), no. 3, 8–11. MR12345

Now, if I write author={aut-f} instead of author={Author, First}, the output changes to:

First Author and Second Author, Title of the paper, Journal of interesting results 10 (2021), no. 3, 8–11. MR12345

That is, it behaves as if the inverted attribute is not passed to any of the entries. The output remains as above regardless of how I mix and match the inverted attributes with the abbreviations.

I also tried adding *{inverted={yes}} to the DefineName commands, but that throws out LaTeX Error: Missing begin{document}.

Question: How can I get the inverted attribute to work with the DefineName abbreviations?


I tried looking at the documented source, but I was not really able to gather anything of use on my own. I noticed that DefineSimpleKey{prop}{inverted} is defined on line 236, and we have on lines 2450–2461:

defset@name@a#1{%
    begingroup
        get@current@properties
        select@auxlanguage
        def@tempa{yes}%
        ifx@tempaprop’inverted
            setbib@nameBE
        else
            #1%
        fi
    endgroup
}

But, I’m not sure how to relate this to the definition of DefineName given on lines 1244–1246:

newcommand{DefineName}[2]{%
    bib*{#1}{name}{name={#2}}%
}

I also looked at the documentation for the rkeyval package to find out whether the key value option *{inverted={yes}} needs to somehow be added to the definition of the command DefineName, but once again I didn’t get much out of it (being far too much of a novice). For instance, on page 3 of the rkeyval documentation the following is mentioned:

Test for a trailing option marked by a star. Usage:

newcommand{blub}[1]{star@{blubaux{#1}}{default}}

Arg 1 of star@ is the code to be run, arg 2 is the default value of the option (could be empty). If arg 1 is moo, this test discards a star and expands to moo if a star is found, or expands to moo{#2} if not. As the example shows, arg 1 need not be a single token.

10 defstar@#1#2{%
11     defstar@a##1{#1}%
12     defstar@b{#1{#2}}%
13     futurelet@let@tokenstar@test
14 }
15
16 defstar@test{ifx*@let@token letstar@bstar@afi star@b}

Perhaps this is relevant? I’m honestly quite lost.


Get this bounty!!!

#StackBounty: #bibliographies #acronyms #key-value #amsrefs The 'inverted' attribute is not recognized if a DefineName abbrevi…

Bounty: 50

In Section 8.1 of the AMSRefs package documentation, it is explained that to properly typeset author names that are to be written with the family name first, one should set the attribute inverted on that name; for example: author={Li, Lian Jie}*{inverted={yes}} will typeset correctly as ‘Li Lian Jie’ (and not as ‘Li, Lian Jie’ or ‘Lian Jie Li’). Trying to use author={Li Lian Jie} to force the correct name will not work if, for instance, the option initials or the option alphabetic is called.

In Section 8.4, it is explained that one can write DefineName{dmj}{Jones, David M.} and then use the abbreviation as author={dmj} in any bib entry.

However, when I use an abbreviation in a bib entry, the inverted attribute is not recognized. This happens even if there are multiple authors in a bib entry and any one name is entered using an abbreviation, and even if that name is not the one to which the inverted attribute is being passed. Here’s an MCVE:

documentclass{amsart}

usepackage{amsrefs}

DefineName{aut-f}{Author, First}
DefineName{aut-s}{Author, Second}

begin{document}

begin{bibdiv}
begin{biblist}

raggedright

bib{art1}{article}{
    author={Author, First}*{inverted={yes}},
    author={Author, Second}*{inverted={yes}},
    title={Title of the paper},
    journal={Journal of interesting results},
    volume={10},
    date={2021},
    number={3},
    pages={8ndash 11},
    review={MR{12345}},
}

end{biblist}
end{bibdiv}

end{document}

The output for the above example looks like this:

Author First and Author Second, Title of the paper, Journal of interesting results 10 (2021), no. 3, 8–11. MR12345

Now, if I write author={aut-f} instead of author={Author, First}, the output changes to:

First Author and Second Author, Title of the paper, Journal of interesting results 10 (2021), no. 3, 8–11. MR12345

That is, it behaves as if the inverted attribute is not passed to any of the entries. The output remains as above regardless of how I mix and match the inverted attributes with the abbreviations.

I also tried adding *{inverted={yes}} to the DefineName commands, but that throws out LaTeX Error: Missing begin{document}.

Question: How can I get the inverted attribute to work with the DefineName abbreviations?


I tried looking at the documented source, but I was not really able to gather anything of use on my own. I noticed that DefineSimpleKey{prop}{inverted} is defined on line 236, and we have on lines 2450–2461:

defset@name@a#1{%
    begingroup
        get@current@properties
        select@auxlanguage
        def@tempa{yes}%
        ifx@tempaprop’inverted
            setbib@nameBE
        else
            #1%
        fi
    endgroup
}

But, I’m not sure how to relate this to the definition of DefineName given on lines 1244–1246:

newcommand{DefineName}[2]{%
    bib*{#1}{name}{name={#2}}%
}

I also looked at the documentation for the rkeyval package to find out whether the key value option *{inverted={yes}} needs to somehow be added to the definition of the command DefineName, but once again I didn’t get much out of it (being far too much of a novice). For instance, on page 3 of the rkeyval documentation the following is mentioned:

Test for a trailing option marked by a star. Usage:

newcommand{blub}[1]{star@{blubaux{#1}}{default}}

Arg 1 of star@ is the code to be run, arg 2 is the default value of the option (could be empty). If arg 1 is moo, this test discards a star and expands to moo if a star is found, or expands to moo{#2} if not. As the example shows, arg 1 need not be a single token.

10 defstar@#1#2{%
11     defstar@a##1{#1}%
12     defstar@b{#1{#2}}%
13     futurelet@let@tokenstar@test
14 }
15
16 defstar@test{ifx*@let@token letstar@bstar@afi star@b}

Perhaps this is relevant? I’m honestly quite lost.


Get this bounty!!!

#StackBounty: #bibliographies #acronyms #key-value #amsrefs The 'inverted' attribute is not recognized if a DefineName abbrevi…

Bounty: 50

In Section 8.1 of the AMSRefs package documentation, it is explained that to properly typeset author names that are to be written with the family name first, one should set the attribute inverted on that name; for example: author={Li, Lian Jie}*{inverted={yes}} will typeset correctly as ‘Li Lian Jie’ (and not as ‘Li, Lian Jie’ or ‘Lian Jie Li’). Trying to use author={Li Lian Jie} to force the correct name will not work if, for instance, the option initials or the option alphabetic is called.

In Section 8.4, it is explained that one can write DefineName{dmj}{Jones, David M.} and then use the abbreviation as author={dmj} in any bib entry.

However, when I use an abbreviation in a bib entry, the inverted attribute is not recognized. This happens even if there are multiple authors in a bib entry and any one name is entered using an abbreviation, and even if that name is not the one to which the inverted attribute is being passed. Here’s an MCVE:

documentclass{amsart}

usepackage{amsrefs}

DefineName{aut-f}{Author, First}
DefineName{aut-s}{Author, Second}

begin{document}

begin{bibdiv}
begin{biblist}

raggedright

bib{art1}{article}{
    author={Author, First}*{inverted={yes}},
    author={Author, Second}*{inverted={yes}},
    title={Title of the paper},
    journal={Journal of interesting results},
    volume={10},
    date={2021},
    number={3},
    pages={8ndash 11},
    review={MR{12345}},
}

end{biblist}
end{bibdiv}

end{document}

The output for the above example looks like this:

Author First and Author Second, Title of the paper, Journal of interesting results 10 (2021), no. 3, 8–11. MR12345

Now, if I write author={aut-f} instead of author={Author, First}, the output changes to:

First Author and Second Author, Title of the paper, Journal of interesting results 10 (2021), no. 3, 8–11. MR12345

That is, it behaves as if the inverted attribute is not passed to any of the entries. The output remains as above regardless of how I mix and match the inverted attributes with the abbreviations.

I also tried adding *{inverted={yes}} to the DefineName commands, but that throws out LaTeX Error: Missing begin{document}.

Question: How can I get the inverted attribute to work with the DefineName abbreviations?


I tried looking at the documented source, but I was not really able to gather anything of use on my own. I noticed that DefineSimpleKey{prop}{inverted} is defined on line 236, and we have on lines 2450–2461:

defset@name@a#1{%
    begingroup
        get@current@properties
        select@auxlanguage
        def@tempa{yes}%
        ifx@tempaprop’inverted
            setbib@nameBE
        else
            #1%
        fi
    endgroup
}

But, I’m not sure how to relate this to the definition of DefineName given on lines 1244–1246:

newcommand{DefineName}[2]{%
    bib*{#1}{name}{name={#2}}%
}

I also looked at the documentation for the rkeyval package to find out whether the key value option *{inverted={yes}} needs to somehow be added to the definition of the command DefineName, but once again I didn’t get much out of it (being far too much of a novice). For instance, on page 3 of the rkeyval documentation the following is mentioned:

Test for a trailing option marked by a star. Usage:

newcommand{blub}[1]{star@{blubaux{#1}}{default}}

Arg 1 of star@ is the code to be run, arg 2 is the default value of the option (could be empty). If arg 1 is moo, this test discards a star and expands to moo if a star is found, or expands to moo{#2} if not. As the example shows, arg 1 need not be a single token.

10 defstar@#1#2{%
11     defstar@a##1{#1}%
12     defstar@b{#1{#2}}%
13     futurelet@let@tokenstar@test
14 }
15
16 defstar@test{ifx*@let@token letstar@bstar@afi star@b}

Perhaps this is relevant? I’m honestly quite lost.


Get this bounty!!!

#StackBounty: #bibliographies #acronyms #key-value #amsrefs The 'inverted' attribute is not recognized if a DefineName abbrevi…

Bounty: 50

In Section 8.1 of the AMSRefs package documentation, it is explained that to properly typeset author names that are to be written with the family name first, one should set the attribute inverted on that name; for example: author={Li, Lian Jie}*{inverted={yes}} will typeset correctly as ‘Li Lian Jie’ (and not as ‘Li, Lian Jie’ or ‘Lian Jie Li’). Trying to use author={Li Lian Jie} to force the correct name will not work if, for instance, the option initials or the option alphabetic is called.

In Section 8.4, it is explained that one can write DefineName{dmj}{Jones, David M.} and then use the abbreviation as author={dmj} in any bib entry.

However, when I use an abbreviation in a bib entry, the inverted attribute is not recognized. This happens even if there are multiple authors in a bib entry and any one name is entered using an abbreviation, and even if that name is not the one to which the inverted attribute is being passed. Here’s an MCVE:

documentclass{amsart}

usepackage{amsrefs}

DefineName{aut-f}{Author, First}
DefineName{aut-s}{Author, Second}

begin{document}

begin{bibdiv}
begin{biblist}

raggedright

bib{art1}{article}{
    author={Author, First}*{inverted={yes}},
    author={Author, Second}*{inverted={yes}},
    title={Title of the paper},
    journal={Journal of interesting results},
    volume={10},
    date={2021},
    number={3},
    pages={8ndash 11},
    review={MR{12345}},
}

end{biblist}
end{bibdiv}

end{document}

The output for the above example looks like this:

Author First and Author Second, Title of the paper, Journal of interesting results 10 (2021), no. 3, 8–11. MR12345

Now, if I write author={aut-f} instead of author={Author, First}, the output changes to:

First Author and Second Author, Title of the paper, Journal of interesting results 10 (2021), no. 3, 8–11. MR12345

That is, it behaves as if the inverted attribute is not passed to any of the entries. The output remains as above regardless of how I mix and match the inverted attributes with the abbreviations.

I also tried adding *{inverted={yes}} to the DefineName commands, but that throws out LaTeX Error: Missing begin{document}.

Question: How can I get the inverted attribute to work with the DefineName abbreviations?


I tried looking at the documented source, but I was not really able to gather anything of use on my own. I noticed that DefineSimpleKey{prop}{inverted} is defined on line 236, and we have on lines 2450–2461:

defset@name@a#1{%
    begingroup
        get@current@properties
        select@auxlanguage
        def@tempa{yes}%
        ifx@tempaprop’inverted
            setbib@nameBE
        else
            #1%
        fi
    endgroup
}

But, I’m not sure how to relate this to the definition of DefineName given on lines 1244–1246:

newcommand{DefineName}[2]{%
    bib*{#1}{name}{name={#2}}%
}

I also looked at the documentation for the rkeyval package to find out whether the key value option *{inverted={yes}} needs to somehow be added to the definition of the command DefineName, but once again I didn’t get much out of it (being far too much of a novice). For instance, on page 3 of the rkeyval documentation the following is mentioned:

Test for a trailing option marked by a star. Usage:

newcommand{blub}[1]{star@{blubaux{#1}}{default}}

Arg 1 of star@ is the code to be run, arg 2 is the default value of the option (could be empty). If arg 1 is moo, this test discards a star and expands to moo if a star is found, or expands to moo{#2} if not. As the example shows, arg 1 need not be a single token.

10 defstar@#1#2{%
11     defstar@a##1{#1}%
12     defstar@b{#1{#2}}%
13     futurelet@let@tokenstar@test
14 }
15
16 defstar@test{ifx*@let@token letstar@bstar@afi star@b}

Perhaps this is relevant? I’m honestly quite lost.


Get this bounty!!!

#StackBounty: #bibliographies #acronyms #key-value #amsrefs The 'inverted' attribute is not recognized if a DefineName abbrevi…

Bounty: 50

In Section 8.1 of the AMSRefs package documentation, it is explained that to properly typeset author names that are to be written with the family name first, one should set the attribute inverted on that name; for example: author={Li, Lian Jie}*{inverted={yes}} will typeset correctly as ‘Li Lian Jie’ (and not as ‘Li, Lian Jie’ or ‘Lian Jie Li’). Trying to use author={Li Lian Jie} to force the correct name will not work if, for instance, the option initials or the option alphabetic is called.

In Section 8.4, it is explained that one can write DefineName{dmj}{Jones, David M.} and then use the abbreviation as author={dmj} in any bib entry.

However, when I use an abbreviation in a bib entry, the inverted attribute is not recognized. This happens even if there are multiple authors in a bib entry and any one name is entered using an abbreviation, and even if that name is not the one to which the inverted attribute is being passed. Here’s an MCVE:

documentclass{amsart}

usepackage{amsrefs}

DefineName{aut-f}{Author, First}
DefineName{aut-s}{Author, Second}

begin{document}

begin{bibdiv}
begin{biblist}

raggedright

bib{art1}{article}{
    author={Author, First}*{inverted={yes}},
    author={Author, Second}*{inverted={yes}},
    title={Title of the paper},
    journal={Journal of interesting results},
    volume={10},
    date={2021},
    number={3},
    pages={8ndash 11},
    review={MR{12345}},
}

end{biblist}
end{bibdiv}

end{document}

The output for the above example looks like this:

Author First and Author Second, Title of the paper, Journal of interesting results 10 (2021), no. 3, 8–11. MR12345

Now, if I write author={aut-f} instead of author={Author, First}, the output changes to:

First Author and Second Author, Title of the paper, Journal of interesting results 10 (2021), no. 3, 8–11. MR12345

That is, it behaves as if the inverted attribute is not passed to any of the entries. The output remains as above regardless of how I mix and match the inverted attributes with the abbreviations.

I also tried adding *{inverted={yes}} to the DefineName commands, but that throws out LaTeX Error: Missing begin{document}.

Question: How can I get the inverted attribute to work with the DefineName abbreviations?


I tried looking at the documented source, but I was not really able to gather anything of use on my own. I noticed that DefineSimpleKey{prop}{inverted} is defined on line 236, and we have on lines 2450–2461:

defset@name@a#1{%
    begingroup
        get@current@properties
        select@auxlanguage
        def@tempa{yes}%
        ifx@tempaprop’inverted
            setbib@nameBE
        else
            #1%
        fi
    endgroup
}

But, I’m not sure how to relate this to the definition of DefineName given on lines 1244–1246:

newcommand{DefineName}[2]{%
    bib*{#1}{name}{name={#2}}%
}


Get this bounty!!!

#StackBounty: #bibliographies #formatting #amsrefs How do I fix the spacing of the review entry when using AMSRefs to format my referen…

Bounty: 100

I am using AMSRefs to format my references, and I’ve noticed that the space between the last full stop and the subsequent review entry is usually absent. Here’s an MCVE:

documentclass{amsart}
usepackage{amsrefs}

begin{document}

begin{bibdiv}
begin{biblist}

bib{art1}{article}{
    author={First Author},
    author={Second Author},
    title={Title of the paper},
    journal={Journal of interesting results},
    volume={10},
    date={2021},
    number={3},
    pages={8ndash 11},
    review={MR12345},
    review={MR67890},
    review={Zbl 0123.45678},
}

end{biblist}
end{bibdiv}

end{document}

Screenshot showing the lack of space between the last full stop and the first review entry.

If I use the command MR provided by the package to format the Mathematical Reviews entries as review={MR{12345}}, etc., then a sentence space is added before each review entry. So, the spacing between first and second review entries now looks weird, especially in comparison with the spacing between the second and third entries.

Screenshot showing the sentence spaces added when the MR command is used.


Question: How can I get the spacing to be right?


I have found the following in my (limited) research, which may or may not be helpful.

Firstly, in the FAQ, the usage of the MR command to adjust the spacing between the period and the review number is insisted:

  1. When I put

    review={MR0113214 (22 #4052)},
    

    in a bib, there is no space between the review number and the preceding period in the printed output.

    You must use the MR macro to mark MR reviews:

    review={MR{0113214 (22 #4052)}},
    

    This will ensure the spacing is correct and also allow you to use the msc-links option.

However, this is inconvenient for the reasons described in the MCVE, namely:

  1. multiple MR reviews (a rare situation, but not impossible) are spaced incorrectly;
  2. reviews other than MR reviews, such as Zbl (Zentralblatt) and JFM (Jahrbuch) reviews, cannot be typeset properly.

Secondly, I noticed that redefining BibSpec{article} so that the command SentenceSpace is removed from the style specification of the review entry fixes the spacing between the final period and the first review entry so long as the MR command is not used for markup. The reason for this is not entirely clear to me, though; looking at the documented source, the command SentenceSpace is defined as:

2789 newcommand{SentenceSpace}{relaxifhmodespacefactor`. fi}

Finally, I tried looking at the definition of the MR command, but I couldn’t get anything fruitful. In case it helps, here are the relevant definitions from the documented source:

2643 defstrip@MRprefix#1#2#3#4@nil{%
2644     def@tempa{#1#2#3#4}%
2645     if#1M%
2646         if#2R%
2647             def@tempa{#3#4}%
2648         fi
2649     fi
2650 }

2651 defMR#1{%
2652     relaxifhmodeunskipspacefactor3000 spacefi
2653     begingroup
2654         strip@MRprefix#1@nil
2655         edef@tempa{MR@nxMRhref{@tempa}{@tempa}}%
2656     @xpendgroup
2657     @tempa
2658 }

2659 providecommand{MRhref}[2]{#1}

...

2904 IfOption{msc-links}{%
2905     @ifundefined{href}{}{%
2906         defparse@MR#1 (#2)#3@nil{%
2907             defMR@url{http://www.ams.org/mathscinet-getitem?mr=#1}%
2908             def@tempd{#1}%
2909             def@tempe{#2}%
2910         }%
2911         defMRhref#1#2{%
2912             begingroup
2913                 parse@MR#1 ()@empty@nil%
2914                 href{MR@url}{@tempdvphantom{()}}%
2915                 ifx@tempe@empty
2916                 else
2917                      href{MR@url}{(@tempe)}%
2918                 fi
2919             endgroup
2920         }%
2921     }{}
2922 }{}


Get this bounty!!!