Questions tagged [custom-notation]

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

Filter by
Sorted by
Tagged with
6
votes
1answer
173 views

Best way to write an equation with subscripts and superscripts

This post is not about a specific Mathematica problem but about to develop the best way to enter mathematical equations with subscripts and superscripts. I have a ...
7
votes
4answers
157 views

Seeking more verbose syntax, e.g. “Then” -> “,” [duplicate]

(NB Related question asks about such things without using the notation package... I would be quite happy with any answer, including the use of Notation) With long, complex expressions I find the ...
1
vote
1answer
24 views

Setting Editable and Selectable False within Notation

Using the Notation package, I have a custom notation defined for chemical reactions. A minimal example is below (I will explain the commented-out part in a moment): ...
4
votes
2answers
93 views

ActionMenu with blank entries until mouseover

Note: The code below requires version 12.0. Problem Overview: I am having some strange behavior with an ActionMenu, where the items in the menu don't show up until the mouse passes over them, as ...
0
votes
1answer
81 views

Sequential subscripts etc. in a unified notation

I am trying to generate a notation system to handle a variety of things in chemistry-standard notation. One key aspect of this is to be able to define symbols that have multiple subscripts, ...
9
votes
3answers
195 views

How can I automatically replace [[ and ]] with the \[LeftDoubleBracket] and \[RightDoubleBracket] operators?

When you type ->, it is automatically turned into the \[Rule] character. Can we configure our frontends to do the same for ...
0
votes
1answer
30 views

Notation package: StringMemberQ in conditional notation definition

Suppose that I have a list, allSpecies, that contain a set of symbols, each of which has been assigned a new notation using Notation[...]. As an example, the internal representation is C60s, and the ...
2
votes
1answer
48 views

Operator Precedence in Notation Package

I am trying to use the Notation package to define custom notation for chemical reactions. The natural thing to do is to use a \[LongRightArrow] for the operator....
0
votes
3answers
174 views

Subscripted variables with changing subscript

When I want to sum over indexed variables, indices being subscripts, the result works as expected, however, upon loading the Notation package, it doesn't. See below As one might have expected from ...
2
votes
1answer
52 views

Variables with both super-subscripts on the same vertical axis [closed]

When writing out a variable with both a subscript and a superscript, such as: Subscript[Superscript[f, a], b] one has that the "b" letter is "pushed" to the ...
4
votes
1answer
54 views

DumpSave and Notation package

I tried to follow the answer in How to save/load (export/import) symbolized variables?. In my case, I would add the code: ...
2
votes
1answer
44 views

Using OverBarred variables

Mathematica does not seem to treat variables as a unit. Consider the following: rule = a -> Function[{x}, OverBar[a][x]] test = a[x] /. rule; test /. rule It ...
1
vote
1answer
45 views

Function definition with sub (super) cripted variables [duplicate]

I like using subscripts a lot. However, it is regrettably not possible to do, for example: myfunction[Subscript[x,1]_] := Subscript[x,1] +1 where instead of the ...
6
votes
2answers
197 views

Mathematica ExtraPackage

Where can I install the Wolfram ExtraPackages? Especially the "Notation`" package? I do not seem to have it by default (In the Utilities, I have only two documents, ...
6
votes
2answers
108 views

How to build a TemplateBox with dynamic length GridBox?

I have created the following TemplateBox Rule. ...
2
votes
1answer
49 views

How to remove InputAlias created using notations package

If i create a custom input alias using Notation package's AddInputAlias. Now it appears in the list generated by ...
0
votes
0answers
43 views

Define a new Front End Syntax for Function Argument Checking & Debugging

In this question I asked a basic question about how to check argument types such that there was useful output from the front end when calling functions. Based on elements of the nice answer by @j-m-is-...
0
votes
1answer
48 views

Easy way of integrating the same integrand over several intervals?

I was wondering if there is some shorthand in Mathematica for expressions such as $$\left(\int_A + \int_B + \int_C + \cdots\right)F(x_1,\ldots, x_n) dx_1\cdots dx_n$$ where $A,B,C,\ldots$ each ...
2
votes
1answer
67 views

How to treat Subscript objects as constants when using D

I want to define a constant vector {$k_x , k_y , k_z$}. The problem is that Mathematica gives me D[$k_x$,x]$=k_1$. I want this to be zero, because $k_x$ is a constant. Clearly D[$k_x$,x]$=k_1$ makes ...
1
vote
1answer
42 views

Using both subscripted and non-subscripted variables in an equation

I'm getting started with Mathematica, as I have been using Maple in the past. Is it possible to define two variables $\alpha_1, \alpha_2$ and then still use $\alpha$ as a parameter of a function and, ...
5
votes
3answers
165 views

Power Function and Non Commutative Multiply

I'm trying to figure out the best way to define a Power function for non commutative multiply that retains some of the regular features of the ordinary power function. As of now, what I've been ...
4
votes
2answers
76 views

How do I define my own notation for mixed operators?

The built in Plus and Times operators when rendered behave the following way: Plus[a,b,Times[-1,c],d] a + b - c + d ...
14
votes
3answers
1k views

How can I tell Mathematica to interpret 0xffff as a hexadecimal number?

I am stuck. I would like Mathematica simply accept 0x as a prefix Operator for Hexadecimal Numbers. I know that 0x is ...
0
votes
1answer
56 views

Issues loading `InfixNotation` as part of a package

For the most part, elements of the Notation package that are part of a package I load work without issues, but InfixNotation ...
3
votes
1answer
391 views

What are current approaches for supporting Dirac notation for quantum mechanics?

I'd like to be able to use Mathematica to preform some basic quantum mechanics and quantum computation operations using Dirac's Bra-Ket notation. I've seen several solutions to defining basic ...
24
votes
2answers
1k views

List of symbols without built-in meaning

Is there a list of all symbols with special display forms but no built-in meaning? That is, operators that are described in the tutorial Operators without Built-in Meanings?
6
votes
0answers
82 views

Infix non-ASCII operator needs a space to be parsed correctly in a script

Bug introduced in 9.0 or earlier and persisting through 11.1 First off: ...
1
vote
0answers
41 views

Notation doesn't work if toolbar is used

I am trying the examples on Notation Tutorial In:= a + b\[LongLeftRightArrow]c // FullForm Out:= Plus[a,LongLeftRightArrow[b,c]] Then I try to change ...
10
votes
2answers
352 views

What are the differences between using MakeBoxes and Interpretation?

Say I want to define a custom graphical representation for my function foo. I can do this using MakeBoxes as in the following: <...
19
votes
2answers
899 views

Shorthand for map at level 2

I love the shorthand /@. It is amazing for readability (and laziness when typing). However, right now I find that I need Map at level 2, i.e. ...
1
vote
2answers
225 views

Creating a List of Symbolized Indexed Variables

I am trying to creat a list of indexed variables (symbols) using the Notation package and Symbolize command. As an example, ...
5
votes
1answer
213 views

How to differentiate between superscript indices and powers in the output?

I have ambiguous notation in my output. I have output that has two types of superscripts, indices and powers. The indices range from {none,0,1,2,3} and typical powers are 2 or 4. When there is an ...
1
vote
4answers
128 views

Adding Rule Solutions

A package I'm working on uses rule solutions (like the output of Solve) as inputs to functions. I'd like to be able to easily manipulate these rule solutions by ...
5
votes
1answer
545 views

Is it possible to write time derivatives with the dot notation?

In physics, we often write time derivatives with a dot ($\dot{a}$, $\ddot{a}$, for example). Is it possible to force Mathematica to use this notation and then apply ...
3
votes
3answers
257 views

Traditional notation option?

I have a simple prime counting function using the Cyclotomic function. ...
2
votes
1answer
104 views

Notation of multiplicative derivative

In the question https://mathematica.stackexchange.com/search?q=non+newtonian, I use "dstar" as acronym to multiplicative derivative. But in the standard literature the symbol i $f^\star$. How can I, ...
4
votes
1answer
163 views

Is there a better way to define more conventional if…then…else notations?

I am implementing pseudocode in Mathematica for a class I'm teaching. I would like to copy the textbook syntax which is IF ... THEN ... ELSE ... ENDIF. My results ...
2
votes
2answers
140 views

How to create assignments to OverVector programmatically

I wish to write a function that accepts two lists. The 1st argument is a list of lists, holding the components of a several vectors. Ex.: comp = {{a, b}, {c, d}}. ...
6
votes
3answers
281 views

How to use `in` for MemberQ

I'd like to use for MemberQ, but I don't want to break anything! The usage would be like this: ...
4
votes
0answers
290 views

Custom units Compatible with Conversions [closed]

I am writing a Mathematica Palette to work with units, and am wondering if anyone knows a way to define new units outside of the standard ones that come with Mathematica 9. I do know of the ...
4
votes
1answer
163 views

How to implement Feynman function notation?

I would like trig functions to format with custom DisplayForms as follows: These were created by Richard Feynman in high school. Related: https://tex.stackexchange.com/questions/274463/feynman-trig-...
3
votes
1answer
131 views

How is `MakeExpression` processed by Mathematica?

According to the documentation on MakeExpression, MakeExpression[boxes, form] is the low-level function used in Wolfram System sessions to construct expressions ...
1
vote
1answer
62 views

Notation::gshadw warning when using Symbolize inside If

Somewhere in my init.m file I have the following code: ...
6
votes
3answers
632 views

Can symbols like + or * be used to denote the Plus and Times functions?

Can one do something similar to +[1, 2]? The point is that with one symbol you would be able to write expressions like ...
8
votes
4answers
557 views

One line definition of a symbol with plus-minus

I'm pretty new to Mathematica. I was wondering is there any way to define the symbol $H_\pm(x,y) = f(x) \pm g(y)$ in one line, so that $H_-$ or $H_+$ can be called separately? Something like: ...
7
votes
5answers
532 views

Defining indefinitely many functions

Is it possible to define a class of indefinitely many functions f1, f2, f3, ... such that <...
4
votes
5answers
246 views

Special notation using round brackets and avoiding commas (for $\LaTeX$ input)?

Internally, when I work with mathematica I use a notation like br[1,2,3,4] to denote some quantities. Then I would like to export the results in ...
4
votes
2answers
296 views

How can I make angle brackets function like lists?

Is there a way to make <a,b,c> behave like {a,b,c}, but remain displayed as ...
4
votes
2answers
97 views

Changing the grouping of an user defined infix operator [duplicate]

How can I change the default grouping on an operator without a built-in meaning? I've created my own infix operator by defining LeftArrow. ...
9
votes
2answers
1k views

How to use Feynman Slash notation?

How can I use Feynman slash notation, e.g., $\require{cancel} \cancel{A}$, in Mathematica? I've seen some answer from 2008 which doesn't seem to work well in Mathematica 10. I'd like this to be part ...