diff --git a/doc/ref/gappkg.xml b/doc/ref/gappkg.xml index cd0d284cac..9602a2ce92 100644 --- a/doc/ref/gappkg.xml +++ b/doc/ref/gappkg.xml @@ -300,10 +300,6 @@ The following components of the record are optional. a string, - FirstNames - - a string, - at least one of IsAuthor or IsMaintainer true or false, @@ -311,6 +307,10 @@ The following components of the record are optional. and optional components + FirstNames + + a string (was mandatory before &GAP; 4.14), + PostalAddress a string, diff --git a/lib/package.gi b/lib/package.gi index 7e1084a434..9776ec0ecd 100644 --- a/lib/package.gi +++ b/lib/package.gi @@ -1234,8 +1234,10 @@ InstallGlobalFunction( DefaultPackageBannerString, Append( str, role ); for i in [ 1 .. Length( persons ) ] do person:= persons[i]; - Append( str, person.FirstNames ); - Append( str, " " ); + if IsBound( person.FirstNames ) then + Append( str, person.FirstNames ); + Append( str, " " ); + fi; Append( str, person.LastName ); if IsBound( person.WWWHome ) then Append( str, Concatenation( " (", person.WWWHome, ")" ) ); @@ -2402,7 +2404,7 @@ InstallGlobalFunction( ValidatePackageInfo, function( info ) and IsBound( record.Persons ) then for subrec in record.Persons do TestMandat( subrec, "LastName", IsString, "a string" ); - TestMandat( subrec, "FirstNames", IsString, "a string" ); + TestOption( subrec, "FirstNames", IsString, "a string" ); if not ( IsBound( subrec.IsAuthor ) or IsBound( subrec.IsMaintainer ) ) then if ValueOption( "quiet" ) <> true then @@ -2899,8 +2901,11 @@ InstallGlobalFunction( BibEntry, function( arg ) author:= List( Filtered( pkginfo.Persons, person -> person.IsAuthor or person.IsMaintainer ), person -> Concatenation( - " ", person.FirstNames, - "", person.LastName, "\n" ) ); + " ", + CallFuncList( function(x) if IsBound( x.FirstNames ) then + return Concatenation( "", person.FirstNames, "" ); + else return ""; fi; end, [ person ] ), + "", person.LastName, "\n" ) ); if not IsEmpty( author ) then Append( entry, Concatenation( " \n", @@ -2911,7 +2916,7 @@ InstallGlobalFunction( BibEntry, function( arg ) " <C>", pkginfo.PackageName, "</C>" ) ); if IsBound( pkginfo.Subtitle ) then Append( entry, Concatenation( - ", ", ps( pkginfo.Subtitle ) ) ); + ", <C>", ps( pkginfo.Subtitle ), "</C>" ) ); fi; if IsBound( pkginfo.Version ) then Append( entry, Concatenation( @@ -2982,6 +2987,10 @@ InstallGlobalFunction( Cite, function(arg) Print("WARNING: No working version of package ", name, " is available!\n"); return; fi; + # special handling for "The GAP Team" + bib:= ReplacedString( bib, + "<name><first>The</first><last>GAP Team</last></name>", + "<name><last>The GAP Team</last></name>" ); parse:= ParseBibXMLextString( bib ); # use encoding of terminal for printing en := function(str) diff --git a/tst/testinstall/package.tst b/tst/testinstall/package.tst index 8621b8e3f2..78a641b50c 100644 --- a/tst/testinstall/package.tst +++ b/tst/testinstall/package.tst @@ -566,7 +566,7 @@ BibXML: <name><first>Retired</first><last>Author</last></name> <name><first>Only</first><last>Maintainer</last></name> </author> - <title><C>mockpkg</C>, A mock package for use by the GAP test suite, + <title><C>mockpkg</C>, <C>A mock package for use by the GAP test suite</C>, <C>V</C>ersion 0.1 https://mockpkg.gap-system.org/ Mar @@ -578,8 +578,8 @@ BibTeX: @misc{ mockpkg, author = {Author, A. and Author, R. and Maintainer, O.}, - title = {{mockpkg}, A mock package for use by the GAP test - suite, {V}ersion 0.1}, + title = {{mockpkg}, {A mock package for use by the GAP test + suite}, {V}ersion 0.1}, month = {Mar}, year = {2018}, note = {GAP package},