How can I manipulate the output of Information?
You may use the "PlaintextUsage"
or "TypesetUsage"
property of WolframLanguageData
.
WolframLanguageData["ProductLog", "PlaintextUsage"]
or
WolframLanguageData[ToString@ProductLog, "PlaintextUsage"]
gives
"ProductLog[z] gives the principal solution for w in z\[LongEqual]we^w. ProductLog[k, z] gives the k^th solution."
Note the escapes like "\[LongEqual]"
will evaluate to their symbol in strings in Mathematica/Wolfram Language.
For typeset lines then
WolframLanguageData["ProductLog", "TypesetUsage"][[1, 1]]
Hope this helps.
A simpler method to get the usage messages for further manipulation is to use MessageName[symbol, "usage"]
:
MessageName[ProductLog, "usage"]
which already yields a typeset version, similar to what is produced by Information[]
.
And of course, Attributes[symbol]
will return symbol
's associated attributes.