diff --git a/M2/Macaulay2/m2/document.m2 b/M2/Macaulay2/m2/document.m2 index d6406c4d2da..36b989a31a6 100644 --- a/M2/Macaulay2/m2/document.m2 +++ b/M2/Macaulay2/m2/document.m2 @@ -192,6 +192,7 @@ makeDocumentTag String := opts -> key -> ( then error ("mismatching packages ", pkg, " and ", toString opts#Package, " specified for key ", key); if pkg === null then pkg = opts#Package; (makeDocumentTag' new OptionTable from {Package => pkg}) key) +makeDocumentTag TOH := opts -> first -- before creating links, we recreate the document tag as a hack to -- correct its package, if it is incorrect (e.g. truncate, quotient) diff --git a/M2/Macaulay2/m2/help.m2 b/M2/Macaulay2/m2/help.m2 index 6889dda0a7e..54ea517e24c 100644 --- a/M2/Macaulay2/m2/help.m2 +++ b/M2/Macaulay2/m2/help.m2 @@ -564,7 +564,7 @@ about Symbol := about Function := o -> f -> about("\\b" | toString f | "\\b", o) about String := o -> re -> lastabout = ( packagesSeen := new MutableHashTable; - NumberedVerticalList sort join( + NumberedVerticalList apply(sort join( flatten for pkg in loadedPackages list ( pkgname := pkg#"pkgname"; if packagesSeen#?pkgname then continue else packagesSeen#pkgname = 1; @@ -574,7 +574,7 @@ about String := o -> re -> lastabout = ( matchfun_re if o.Body then pkg#rawKeyDB), select(keys pkg#"raw documentation", matchfun_re if o.Body then pkg#"raw documentation")); - apply(keyList, key -> pkgname | "::" | key)), + apply(keyList, key -> (pkgname,key))), flatten for pkg in getPackageInfoList() list ( pkgname := pkg#"name"; if packagesSeen#?pkgname then continue else packagesSeen#pkgname = 1; @@ -583,7 +583,10 @@ about String := o -> re -> lastabout = ( db := if o.Body then openDatabase dbname; keyList := select(dbkeys, matchfun_re db); if o.Body then close db; - apply(keyList, key -> pkgname | "::" | key)))) + apply(keyList, key -> (pkgname,key))) + ),(pkgname,key) -> SPAN { pkgname, " ", TOH {pkgname | "::" | key} } + ) + ) -- TODO: should this go to system? pager = x -> if height stdio > 0