From eb35b6ba3b8b131258c2809a58f00d8983f6544a Mon Sep 17 00:00:00 2001 From: pzinn Date: Sun, 1 Dec 2024 20:47:54 +1100 Subject: [PATCH] doc makeKeyword --- .../packages/Macaulay2Doc/functions.m2 | 1 + .../Macaulay2Doc/functions/makeKeyword-doc.m2 | 29 +++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 M2/Macaulay2/packages/Macaulay2Doc/functions/makeKeyword-doc.m2 diff --git a/M2/Macaulay2/packages/Macaulay2Doc/functions.m2 b/M2/Macaulay2/packages/Macaulay2Doc/functions.m2 index 0f33fc7054d..015a2d808f4 100644 --- a/M2/Macaulay2/packages/Macaulay2Doc/functions.m2 +++ b/M2/Macaulay2/packages/Macaulay2Doc/functions.m2 @@ -153,6 +153,7 @@ load "./functions/lift-doc.m2" load "./functions/liftable-doc.m2" load "./functions/locate-doc.m2" load "./functions/LU-doc.m2" +load "./functions/makeKeyword-doc.m2" load "./functions/map-doc.m2" load "./functions/max-doc.m2" load "./functions/maxPosition-doc.m2" diff --git a/M2/Macaulay2/packages/Macaulay2Doc/functions/makeKeyword-doc.m2 b/M2/Macaulay2/packages/Macaulay2Doc/functions/makeKeyword-doc.m2 new file mode 100644 index 00000000000..478fb1537ef --- /dev/null +++ b/M2/Macaulay2/packages/Macaulay2Doc/functions/makeKeyword-doc.m2 @@ -0,0 +1,29 @@ +--- status: DRAFT +--- author(s): PZJ +--- notes: + +doc /// + Key + makeKeyword + (makeKeyword, String) + [makeKeyword, Precedence] + [makeKeyword, Syntax] + Headline + create a new keyword + Usage + makeKeyword s + Inputs + s: String + Precedence => {ZZ,Symbol} + Syntax => {List,Symbol} + Description + Text + Creates a new Keyword out of the input string. + The options specify the parsing behavior of the keyword. + Possible choices for @TT "Syntax"@ are: @TT "Binary"@, @TT "Prefix"@, @TT "Postfix"@ or @TT "{Binary,Prefix}"@. + If @TT "Precedence"@ is a @TT "Symbol"@, the precedence is set to the one of that symbol. + Example + makeKeyword("≺",Precedence => symbol <) + ZZ ≺ ZZ := (i,j) -> j==i+1 + 3≺4 +///