This is for questions about creating and using custom notations. For help on the use of the built-in operators, see syntax.

learn more… | top users | synonyms

3
votes
0answers
176 views

Notation Package Quirk for single Symbols

I encounter the following quirk in the Notation package: consider the following ==> and <== declarations ...
2
votes
0answers
264 views

Best Practice for using Notation, $Pre, MakeExpression in a package [closed]

I'm setting up a package that defines a custom notation. I'd like to inquire about best practices and possible issues of: using the Notation Package using $Pre ...
6
votes
3answers
210 views

Map Input A B C to MyProduct[A,B,C] (NOT to Times[A,B,C])

In writing my own (noncommutative) product I want to avoid typing redundant symbols like A.B.C or A**B**C, I just want to type ...
8
votes
2answers
2k views

How to tell Mathematica that a function is dependent on other variables?

I am trying to derive some turbulence model dependencies and I am using Reynolds averaged Navier-Stokes equations. What I am trying to do is to tell Mathematica that OverBar[u] is dependent on x,y,z ...
5
votes
2answers
154 views

How do I mimic the functionality of “<>”?

The Cell expression for: <> is Cell[BoxData["<>"], "Input"] However similar expressions are parsed into ...
6
votes
1answer
348 views

$\TeX$ conversion, support for \hphantom

I'm trying to write some $\TeX$ conversion for a tensor with an upper and a lower index, but I would like the lower index to be displaced to the right by the width of the upper index. In (La)TeX I ...
14
votes
2answers
907 views

How can one define an infix operator with an arbitrary unicode character?

You can setup "UsefulFunction[a, b]" to use custom infix notation "a [LeftRightArrow] b" as follows: ...
28
votes
1answer
737 views

Prefix operator with low precedence

The question is simple, but I will elaborate on the background as well for those interested in the idea: How to define a new operator with specified precedence value? Background Mathematica was ...
21
votes
5answers
2k views

Having the derivative be an operator

How do I create an operator which acts like a derivative to everything to the right of it: for example: $ \left( \partial_x + \partial_y + z \right ) x \psi $ How do I make that evaluate to: $x ...
8
votes
2answers
334 views

Custom Format for “constructors”

Say I have a the typical Mathematica linked list structure defined like so: Attributes[Pair] = {HoldAllComplete}; Nil = Pair[]; Cons = Pair[#1, #2]&; It's ...
7
votes
1answer
333 views

Assignment rule to distribute matrix-multiplication over custom notation

I'm trying to write some code to do basic algebraic manipulations in BraKet notation. Thus far I have a function KetToVec which will convert any expression of the form a1 Ket[s1]+ b Ket[s2] +... to a ...
15
votes
2answers
1k views

How to use subscript in pattern names?

For example I want to define a function with parameters σx and σy, that is, the function will be declared as: f[σx_,σy_] := . . ...
28
votes
2answers
8k views

Can we use letter with a subscript as a variable in Mathematica?

I tried Subscript[a, 0] = 1 (* 1 *) Clear[Subscript[a, 0]] ...
7
votes
1answer
249 views

Can the Notation function support complex structures on its left hand side?

In my investigation of the possibilities offered by the Notation package, I came over a limitation in the complexity of the left hand side symbol. For instance, although I am able to enter ...
13
votes
2answers
327 views

Difficulties in creating strict and robust equivalence between two symbols using the Notation package

I am investigating the use of the Notation package facilities to create strict the equivalence between pretty-printed symbols such as ...
10
votes
1answer
467 views

Creating custom notation

How does one generate custom symbols? For example, the physicist notation for the rotation is "nabla cross function". In this case however, Mathematica complains that the ...