Linked Questions
10 questions linked to/from Syntax highlighting for your own functions
2
votes
2
answers
152
views
How do I make my function behave more like Plot? [duplicate]
I have written a function Fun as below:
...
2
votes
1
answer
172
views
Having variables appear aqua in user defined function [duplicate]
In many of the inbuilt mathematica function, variables appear aqua like in:
However, when creating your own function, variables no longer have that green coloring and are instead colored like an ...
596
votes
19
answers
154k
views
Where can I find examples of good Mathematica programming practice?
I consider myself a pretty good Mathematica programmer, but I'm always looking out for ways to either improve my way of doing things in Mathematica, or to see if there's something nifty that I haven't ...
24
votes
4
answers
3k
views
How to program a F::argx message?
How useful is it to program a user-built function in a package to produce a red warning message F::argx if you give the wrong number of arguments to that function? ...
35
votes
1
answer
2k
views
Customizing syntax highlighting for private cell styles
Is there any way to set up a cell style with a particular syntax highlighting?
For example, I'd like to have a CProgram cell to write in blue the C special words.
I have done it by setting ...
21
votes
2
answers
964
views
When should I, and when should I not, set the HoldAll attribute on a function I define?
I have seen a number of examples on this site
(such as in syntax highlighting and checking evaluation status) in which functions definitions are preceded with
...
14
votes
3
answers
2k
views
Strategies to avoid LessEqual::nord in NMinimize?
When using NMinimize on functions with complex intermediate expressions (but a real end result), quite often one gets the error ...
3
votes
2
answers
4k
views
Complex line integral
Can someone recommend an online article or introductory tutorial that will show me how to do real and complex line integrals using Mathematica?
14
votes
1
answer
514
views
SyntaxInformation: take allowed options from multiple symbols – possible?
Suppose I have a function like
Options[f] = {foo -> 1};
f[opt : OptionsPattern[{f,g}]] := h@g[Sequence @@ FilterRules[{opt}, Options[g]]]
I purposefully do ...
4
votes
1
answer
126
views
Why does SyntaxInformation "ColorEqualSigns" color like wrong options?
In my copy of Mathematica 11.1,
SyntaxInformation[f] = {"ColorEqualSigns" -> {1, 1}}
colors like wrong options:
How do I make it not color like wrong options?...