Message Boards Message Boards

2
|
460 Views
|
0 Replies
|
2 Total Likes
View groups...
Share
Share this post:

Creating documentation pages with usage

Posted 11 months ago

I just discovered something very helpful. If you create a function with usage, then when you create a documentation page with the documentation tools generate missing documentation pages, the usage field will already be filled in. Here's an example.

UnevaluatedHead // ClearAll

UnevaluatedHead::usage = "UnevaluatedHead[expr] finds the head of expr without evaluating it."


SetAttributes[UnevaluatedHead, HoldAll]
UnevaluatedHead[expr_] :=
 Head[Unevaluated[expr]]



     UnevaluatedHead[args___] := Null /; CheckArguments[UnevaluatedHead[args], 1] 
POSTED BY: Peter Burbery
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract