Questions tagged [usage-messages]
Questions related to writing and handling usage messages of symbols.
48 questions
0
votes
0
answers
99
views
How to know the formula of function in mathematica?
When I review BiorthogonalSplineWavelet in official website.
I could not find any formula of how to calculate as below:
How to ...
2
votes
0
answers
37
views
Where are user-defined usage messages stored in the front-end for autocomplete stored -- and how can I clear them out?
I am writing some code which automatically sets the usage messages for a function, and I am having some trouble iterating on it, particularly in getting it to work correctly in the autocomplete.
At ...
1
vote
0
answers
46
views
How to add usage info when downloading a Resource function persistently?
https://resources.wolframcloud.com/FunctionRepository/resources/PersistResourceFunction/ allows one to use a resource function as though it was a native function. However, hovering over the function ...
0
votes
0
answers
46
views
Auto generate usage message in order to automatically have templates available for user defined functions
In order to remind myself of the arguments a function takes and their ordering I find it useful to use the shortcut to show the template (Ctrl+Shift+k). However, I don't write usage prompts for my ...
0
votes
0
answers
53
views
How to prevent displaying sub and overscript as plain strings in .wl files?
Problem:
String with subscripts and overscripts are formatted as plain text after saving, closing, and reopening the document. It makes it hard to edit function usage because text become unreadable if ...
6
votes
1
answer
212
views
Symbols leak into Global context when using Information
Bug introduced before 12.1.0, fixed in 13.3.0 [CASE:4972508]
When debugging I found the following peculiar behaviour of Information:
...
4
votes
0
answers
50
views
Missing Hover and Autocomplete INFO Buttons for Custom Paclet
I've built my own paclet application with documentation using Workbench 3 (Eclipse add-in 10.1.822) with MM 12.1 (there are currently issues with 12.2-3 and the only Workbench add-in update, which I'm ...
0
votes
1
answer
58
views
Restore messages function to the default ones
Times ago I used the command Off[NDSolve::tag].
Now I've been forgetting which message I removed and I would like to restore it.
Someone knows if is there a way to reset all the default messages ?
8
votes
2
answers
461
views
How to prevent Mathematica from inserting random line breaks in usage messages?
I am writing a Mathematica package, and documenting its functions with ::usage messages. However, when I type ?FunctionName to ...
3
votes
2
answers
120
views
Information/Information`InformationValueForm using Full- or InputForm
I have a problem with the build-in Information function for user-defined symbols with custom StandardForm in Mathematica 12.1.1.0:
For example with the function ...
0
votes
0
answers
67
views
wrong syntax in very short package
Here is a very short package
...
3
votes
1
answer
255
views
How to use double quotation marks (") in usage messages?
I have the following code:
Remove[f];
f::usage = "f[\"message\"] prints the message";
f[message_] := Print[message];
The usage message works except the quotation ...
0
votes
0
answers
69
views
Is it possible to turn off all messages for a specific mathematica file?
I have a general question.
I have a big Mathematica file, which sometimes comes with some messages.
Is it possible to turn off all messages forever in this notebook/file?
BR
Mads
6
votes
0
answers
329
views
How to define two usage messages for a function [closed]
Context
I notice that built in functions have a drop-down interface that displays multiple usage messages.
Question
How do I implement more than one usage message (...
5
votes
1
answer
107
views
Ignore message in `Check` without silencing
Check[expr,failexpr,checkedMessages] will evaluate expr and if it encounters any of the messages in ...
0
votes
0
answers
74
views
customisable error checking, message handling code
I have an iterated computation running in a while loop, which is bound to fail at some point, at which point I want it to stop, e.g.
...
1
vote
0
answers
54
views
Mathematica stops showing messages, how to get them back?
I realized that, for an identical expression, sometimes I get an error message and sometimes I don't. If I then shut down and restart Mathematica, messages are back.
How can I get messages back ...
4
votes
1
answer
90
views
Apply on Message resolves MessageName before applying
I want to make a Message from a List.
Message[LibraryFunction::argx, 1, 3]
...
3
votes
0
answers
75
views
How to prevent duplication in usage message for Information and Double Usage Line within DocumentationTools
In DocumentationTools palette within Wolfram Workbench there a
Double Usage Line which is used to write usage description in the
...
2
votes
2
answers
564
views
How to produce an error message for function with a wrong parameter and default values for other parameter
Consider this function
w[x_Integer: 2, y__List : {1, 2}, z_String: "X"] := {x y, z}
w[4]
{{4, 8}, "X"}
Now I want to define an error message to be displayed ...
6
votes
0
answers
144
views
several problems with ::usage in Mathematica 11
There seems several bugs of ::usage in mathematica 11.2
First one is that the drop down ::usage always showing the first assigned ::usage
You can see that the <...
3
votes
1
answer
854
views
How can I automatically generate usage messages?
When programming, I try and name my functions and arguments clearly and document them with usage:: so I can keep track of everything; e.g.,
...
0
votes
0
answers
37
views
Disable Authentication Popup [duplicate]
I'm doing my own server authentication that sends the authentication as a header. If the authentication is wrong, I want to print an error message, but instead Mathematica creates that authentication ...
4
votes
1
answer
158
views
Internal function overload when calling ReadString on a fresh kernel
Problem description:
I am capturing all FE messages to redirect them to my own window while blocking them from showing in the evaluation notebook using this method by rcollyer. It works great, but I ...
3
votes
1
answer
189
views
Assigning ::usage in a package for in Private generated symbols?
I'm having difficulties assigning ::usage in a Mathematica package for symbols in a list or dataset, that will only be defined later in a ...
7
votes
2
answers
373
views
Strange bug with "MessageName[a,b] is not of the form symbol::name ", Debugger & cursor location
Can someone confirm/disconfirm this?
Start Mathematica 11, blank notebook, blank init.m
Start the Debugger/make sure it is running. It doesn't seem to matter whether you have the Stack and ...
2
votes
0
answers
114
views
Automating generation of argument error messages
You can run into messages like
DistributionFitTest["kk", "TestConclusion"]
...
0
votes
0
answers
42
views
the usage message for a function does not display on Mathematica 10.3.1 Linux [duplicate]
I write a function
f[x_]:=Module[{},(
f::usage="gives the square of x"
x^2
)]
When I run ?f I get a this output:
...
6
votes
0
answers
199
views
Cell format for usage statements
The myFunc::usage statement is intended to be a simple summary of the symbol and its arguments. However, many users like myself opt out of using Workbench and ...
8
votes
1
answer
184
views
Recommendations about modifying usage of built-in symbols
In my package, I use some of the built-in Mathematica symbols in non-canonical ways. Right now, I use them as Options or ...
6
votes
0
answers
159
views
More frugal display of usage messages in auto-completion popup – possible? [duplicate]
Update: I think the more general question I should have asked is: How should I write usage messages to work well with auto-completion? Is there documentation on how to prepare a package for convenient ...
1
vote
3
answers
221
views
Setting ::usage for variables returned from a function
What is the best way to achieve
{v,u} = f[]; (* Returns value and usage description *)
v::usage = u;
from inside f, i.e.,
<...
5
votes
2
answers
468
views
How do I add Hyperlinks to usage text?
I want to include a Hyperlink inside of a usage. For example:
...
40
votes
1
answer
1k
views
What is the status of `::usage` and Templates in Mathematica v11?
Since Mathematica 9, a number of issues concerning the ::usage and templates were raised.
In 9.0, there was a bug first reported here and better diagnosed here, ...
3
votes
0
answers
118
views
ParametricRegion question - a bug report
It is just to report that the request:
?ParametricRegion
does not return the expected definition. Instead I see this:
...
1
vote
1
answer
580
views
Unevaluated symbols [duplicate]
I often find it useful to define a symbol from strings (often in a loop in which I define other symbols). This I accomplish with Symbol (and often ...
5
votes
2
answers
245
views
Listing all usage messages from a loaded package
I am writing several packages in collaboration with others. In order to help the group use my packages, I want to provide them with a simple reference of function names and usage messages. How can I ...
21
votes
2
answers
966
views
User-defined usage message template; removing repeated text
In Mathematica 9.0.1, I want to write a user-defined template for a function that I wrote: myfunc
...
2
votes
2
answers
162
views
Unsetting messages
The following code suggests that Mathematica stores the messages in cache:
...
3
votes
2
answers
204
views
Dynamically show usage
As the title states I would like to dynamically show ::usage on several functions.
Let's consider two functions here:
...
22
votes
1
answer
355
views
How to format usage messages such that function templates are parsed correctly?
Is it possible to format usage messages (with italic arguments etc) such that Mathematica 9 still parses function templates correctly?
For example, plain usage messages work when pressing Ctrl+Shift+K:...
16
votes
4
answers
632
views
Transform fancy usage messages in 1D string
When we look at the usage messages of built-in functions nowadays (not in the good old times, when they were a simple descriptions) we see that although they look pretty in the front end, it is really ...
22
votes
1
answer
561
views
Standard message definition construct
Why are the messages almost always defined like this (at least in packages):
If[Not@ValueQ[function::usage], function::usage = "Usage message"]
and not just like ...
30
votes
2
answers
1k
views
Strange ::usage behavior in v9
Bug fixed in 9.0.1
Something has gone wrong with usage in Mathematica 9. Would someone tell me how to fix it?
I define a function ...
17
votes
2
answers
4k
views
How to create 'help' `?` for a function (as documentation)
I have defined a function foo in some complicated way. But now I would like to add a little documentation that gives the user information on how it is to be used.
...
28
votes
3
answers
5k
views
Best Practice to write ::usage for own package functions
I'm writing an own package with Mathematica, that I would like to make available for others. In order to do that (and for my own usage of the package), I would like to write ...
31
votes
2
answers
701
views
Usage displays properly only after second call
If I have a usage message containig two-dimensional stuff (subscripts or formulas) and I call the usage, then sometimes I get an improperly formatted output enclosed in "...". Linebreaks are gone, but ...
25
votes
5
answers
2k
views
Managing formatted usage messages in Wolfram Workbench
We have numerous packages (defined in .m files) that we maintain and develop in WolframWorkbench (2.0), and in those packages, we use the traditional method of ...