# How can I manipulate the output of Information?

If I type

Information[ProductLog]


I see

If I type

Framed[Information[ProductLog]]


I see

This is expected, though not desired, because Information prints its output, rater than returning it. However, I want to get access to the text of the description, or the boxes of the description, or something, to, e.g., put the descriptions of functions in columns or rows. How do I do things like this?

• The output cells are created by CellPrint. You can capture the cell expressions with Block[{CellPrint = Sow}, Reap@Information[ProductLog] ], but I'm not sure that's what you want. Mar 10, 2019 at 22:52

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.

• Thanks! This is exactly what I was looking for. Mar 11, 2019 at 0:30

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.