# Tagged Questions

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

172 views

### How to re-parse (or re-map) character '.' to user-defined function

The default behavior of the character . between two non-numeric characters is to be interpreted as the infix of the Mathematica function ...
2k views

### How to implement Donald Knuth's up-arrow notation

How does one enter very large numbers in up-arrow notation? Up-arrow notation was created by Donald Knuth to write very large numbers in it iterated exponentiation form, for example 6↑↑3 = 6^6^6.
115 views

### Custom operators; custom pattern matching with pure functions

What I'm trying to achieve in Mathematica is the creation of a binary operator whose operands are both pure functions over the natural numbers. The result of the operator should be another pure ...
151 views

### Kronecker delta notation

Is there an easier way to enter KroneckerDelta[n,m] in Mathematica? When I use the notation $\delta_{n,m}$, it won't work.
120 views

### Defining conditional Notation rules

I am trying to define a notation rule so that for selected symbols subsripts will be equivalent to function parameters. My understanding of the docs suggests the following ...
86 views

### Correct way to use Notation

I have tried to create some Notation declarations as follows ...
49 views

### Notation, Format and Interpretation

I am unclear on the exact relationship between Notation, Format and Interpretation. ...
46 views

### Applying Notation rules retroactively to a notebook

Suppose I define a new notation rule like Notation[OverBar[x_] ⟺ mean[x]] If I already have some notebooks that were written using ...
232 views

### Notation package: parenthesis placement for SuperscriptBox

The question concerns the Notation package. I want to define notation for the function very similar to the built-in Power[a,b] ...
134 views

### Is there a way to “hold” prefix / infix / postfix notation?

Is it possible to preserve a specific style of notation in $Mathematica$ output? foo // bar (* bar[foo] *) Hold[foo // bar] (* bar[foo] *) I'm writing some code ...
83 views

### Assigning symbolic operators to built-in functions

Can I do something like this: $$\partial_t = D[f, t]$$ i.e. create a symbol instead of a function so that each time I call it, it executes the operation as defined?
26 views

### custom precedence for custom infix operator with InfixNotation [duplicate]

I am trying to define several custom operators with custom precedence to implement geometric algebra. Loading the notation package << Notation I can ...
184 views

### using index notation for finite differences

I am interested in deriving finite difference equations, which means I have to play around with indexed quantities. For example, for a 2D function f(x,y), I could discretize it on a grid with grid ...
209 views

### Why is D[a[b][c],a[b]] equal to 1[c]`?

Background: I had the same issue as described here, and I went to extend Mr.Wizard’s code such that a[b][c] would be shown as $a_b^c$. Issue: To my surprise, ...
156 views

### Notation for implicit derivative

Consider the following line of code: D[x == y^3 + x y, x, NonConstants -> y] The output would be: ...
147 views

### Custom display format for custom operator

I've tried searching here and in the WRI documentation, but I haven't found what I'm looking for in either place. I'm defining a dx operator to act as a ...
55 views

### Can I define a “postfix map” operator with comparable precedence behavior to // [duplicate]

I am trying to define a "postfix map" operator (denoted $OP$ for now) that behaves thus: ...
581 views

### How is + as an infix operator associated with Plus?

How is + associated with Plus? Suppose I want to define a head FooBar and have it ...
169 views

### New integration symbol

Is there a way to introduce a new integration symbol? Specifically I want to be able to use ⨍. I have no problem entering it into mm, but the size does not change like the standard \int does.
291 views

### Using subscript in a string

I am trying to create a string of the form $0 < d_1 < d_2 < \ldots < d_n$ For a given n. My closest attempt so far is ...
858 views

### Going full functional (Haskell style)

I'm trying to define some notation so that Mathematica code would be more functional, similar to Haskell (just for fun): currying, lambdas, infix operator to function conversion, etc.. And I have some ...
96 views

### Notation not recursive enough?

My notation is not recursing enough. For example, Notation[W[a_ | b_] ⟹ foo[a_, b_]/foo[b_]] Notation[W[a__, b_ | c_] ⟹ W[a__ | c_]W[b_ | c_]] Then ...
103 views

### Vertical “fractions” with more than 2 parts

Standard FractionBox syntax allows only 2 arguments and creates 2-part fraction for numerator and denominator. Is it possible to draw similar construction, but ...
520 views

### Simplistic Notation example

Notation package looks poorly documented. For example, GridBoxDividers option is not documented at all. Can someone give me a simplistic example of a Notation set ...
184 views

### How to enter arrows in Notation function?

It is not clear, what symbol is used in Notation function description for arrows? How to enter it in textual mode within Workbench? Here: ...
221 views

### Override @ to mock Java Classes

This question appears impossibly long so apologies in advance (skip to the bottom if you want to see the actual questions). I want to be able to mock Java Classes in Mathematica code. For example, I ...
439 views

### Using the symbol I for electrical current [duplicate]

I would like to use the I as a symbol for the electrical current. How can I redefine it, so it is not interpreted as the imaginary unity?
192 views

### Syntax colouring when using Symbolize

I need to use symbols with suffixes in order to make my code readable in relation to the Eurocodes. To do this I use Symbolize from the ...
839 views

### How to define the Einstein summation convention in Mathematica?

How to define a Einstein summation convention in Mathematica? Say, how to let Mathematica know T[i,i] equals ...
107 views

### Setting a binary operator Flat

I defined a binary operator in as the first statement in a new Mathematica notebook. {x1_, y1_} ⊕ {x2_, y2_} := Module[{}, Print["do anything"];] where the code ...
890 views

### Examples of (well coded) packages using custom notation

Which packages do you know of, that have the following properties: using custom notation (for input AND output would be preferable) well coded & designed (from your subjective perspective!)
160 views

### Notation Package Quirk for single Symbols

I encounter the following quirk in the Notation package: consider the following ==> and <== declarations ...
221 views

201 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 ...
1k 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 ...
144 views

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

The Cell expression for: <> is Cell[BoxData["<>"], "Input"] However similar expressions are parsed into ...
302 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 ...
598 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: ...
547 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 ...
1k 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 ...
300 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 ...
279 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 ...
737 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_] := . . ...
5k views

I tried ...
221 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 ...