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
0 votes
0 answers
37 views

How can I "map thread" similar notation definitions in one line?

In the past few days I have been dealing with different integral notation definitions made by myself. I have noticed several similar notation definitions with a common pattern, but currently I am only ...
user avatar
  • 289
2 votes
1 answer
157 views

Define a new rule for multiplication

I am trying to implement a new rule for noncommutative multiplication: $$ x * q^n * y \to q^n * x * y, $$ where $\ast$ stands for noncommutative multiplication and x and y are random products in ...
user avatar
  • 45
2 votes
1 answer
76 views

Composition of functions not working [closed]

I am trying to set a function within a function. What I do is to first create a function with two arguments. Then I would like to set a new function with the same two arguments, in which the previous ...
user avatar
1 vote
1 answer
33 views

How to use StandardForm/DisplayForm with custom symbols

I want to be able to make custom notation similar to how Complex[1,2] is displayed as 1 + 2 i. I tried the following ...
user avatar
3 votes
2 answers
235 views

Defining new brackets

I would like to wrap double-struck brackets around variables for notation purposes only. For instance [[X]] should display as the first image below. However, these ...
user avatar
  • 73
1 vote
1 answer
96 views

How to express number in exponential decimal such as 1e2=100?

I am using MATLAB for a long time, and usually I express the number as exponential decimal such as x = 1e2; % x=100 However, if I write this form in mathematica, ...
user avatar
  • 13
1 vote
0 answers
63 views

How to run a Mathematica package (.m) (which depends on Notation` package) via Python using "Wolfram Client Library for Python"?

In How to run a Mathematica package (.m) from Python using the “Wolfram Client Library for Python”?, I was able to get the basicPackage` example to work, but ran ...
user avatar
  • 493
1 vote
2 answers
76 views

Notation parse rule does parse when it acts as a argument

https://reference.wolfram.com/language/Notation/tutorial/NotationSymbolizeAndInfixNotation.html Notation[boxes ⟹ expr] set boxes to be parsed to expr I want a simplified notation for entering a ...
user avatar
  • 111
8 votes
0 answers
211 views

How would one add Hyperreals as a new type to Mathematica?

Hyperreals are an extension to the real numbers; they formalise the concepts of infinities and infinitestimals as numbers, rather than the named limit points outside of the system of reals and form ...
user avatar
  • 2,410
0 votes
0 answers
52 views

How to write $I$ and $I_0$ as a symbol?

How could we write both $I$ and $I_0$ as a symbol in Wolfram Mathematica? I consider $I$ as a variable and $I_0$ as a parameter in my system of equations ($Y=C_0 + I, I=I_0+bY$, Y and I are endogenous ...
user avatar
2 votes
0 answers
40 views

How do I introduce new input tokens to Mathematica (so that they can be recognized by InputAutoReplacements)?

I'm trying to introduce automatic replacements by modifying my notebook's value of InputAutoReplacements (e.g. via ...
user avatar
  • 7,749
3 votes
1 answer
174 views

Symbolized, Subscripted Variable Doesn't Look Pretty

Background I'm trying to programmatically generate a subscripted variable in a way that makes it appear "pretty". Here is a minimal working example that shows some strange behavior I'm ...
user avatar
  • 493
0 votes
1 answer
127 views

Subscripts use to make expression readable [duplicate]

I am trying to write a function in mathematica which depends on different parameters. For example $$f(x_1, x_2, x_3, x_4, x_5)= 2x_1+\sin(x_2)+x_3*x_4-x_5^{-1}$$ (My actual function has 12 such ...
user avatar
2 votes
0 answers
51 views

Define an operator with the distributive property that works in general expressions

This is a follow up to this question. In that question they use TagSetDelayed to give a symbol the distributive property. In my case this becomes ...
user avatar
0 votes
2 answers
108 views

Function to change derivative notation

I would like to write a function to change the notation of derivative in an expression. For instance, the function rep will take ...
user avatar
  • 265
2 votes
0 answers
47 views

Why does Parenthesize add parentheses here?

I've been playing around with the Notation` package and box forms for some custom notation recently. I discovered a nifty function named ...
user avatar
1 vote
2 answers
76 views

Is there any way to define the Pauli matrices eigenstates symbolically in Mathematica?

I've been trying to define the kets $|+\rangle$ and $|-\rangle$ with no sucess with ...
user avatar
  • 11
1 vote
2 answers
424 views

Semi-direct product and crossed product symbols

Does Mathematica have any symbols for the semi-direct product $\rtimes$ (or $\ltimes$) and the crossed product $\bowtie$? I have looked at the lists containing all symbols and couldn't find it there. ...
user avatar
  • 928
2 votes
2 answers
136 views

How to improve this custom notation?

I implemented this custom notation... ...
user avatar
3 votes
1 answer
112 views

Output of `Subsuperscript` in TeXForm?

TeXForm can be used to convert Mathematica expressions directly to LaTeX. However, this function fails on an expression that has a sub- and a super-script: ...
user avatar
  • 11.5k
1 vote
1 answer
99 views

Making ^ work as MatrixPower for matrices

I'd like my expressions like A^d get interpreted as MatrixPower[A, d] for matrix arguments A, any suggestions how to do this?
user avatar
2 votes
2 answers
138 views

InterpretationBox problem with symbolic expressions

Related to this question, Why does this InterpretationBox construct work when x, y are ...
user avatar
  • 14.8k
6 votes
1 answer
1k 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 ...
user avatar
  • 4,391
7 votes
4 answers
177 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 ...
user avatar
  • 2,410
1 vote
1 answer
53 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): ...
user avatar
  • 2,209
4 votes
2 answers
143 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 ...
user avatar
  • 2,209
0 votes
1 answer
179 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, ...
user avatar
  • 2,209
11 votes
4 answers
321 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 ...
user avatar
  • 12.6k
0 votes
1 answer
76 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 ...
user avatar
  • 2,209
2 votes
1 answer
88 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....
user avatar
  • 2,209
0 votes
3 answers
1k 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 ...
user avatar
  • 951
2 votes
1 answer
170 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 ...
user avatar
  • 951
5 votes
1 answer
105 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: ...
user avatar
  • 951
2 votes
1 answer
77 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 ...
user avatar
  • 951
1 vote
1 answer
122 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 ...
user avatar
  • 951
6 votes
2 answers
305 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, ...
user avatar
  • 951
6 votes
2 answers
243 views

How to build a TemplateBox with dynamic length GridBox?

I have created the following TemplateBox Rule. ...
user avatar
  • 8,105
3 votes
1 answer
88 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 ...
user avatar
  • 8,105
0 votes
0 answers
48 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-...
user avatar
  • 2,410
0 votes
1 answer
62 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 ...
user avatar
  • 173
2 votes
1 answer
229 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 ...
user avatar
  • 143
1 vote
1 answer
122 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, ...
user avatar
6 votes
3 answers
675 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 ...
user avatar
  • 161
5 votes
2 answers
103 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 Basically ...
user avatar
  • 161
14 votes
3 answers
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 ...
user avatar
  • 173
0 votes
1 answer
62 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 ...
user avatar
  • 12.7k
5 votes
2 answers
1k 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 ...
user avatar
  • 12.7k
26 votes
2 answers
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?
user avatar
  • 123k
6 votes
0 answers
90 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: ...
user avatar
  • 8,564
1 vote
0 answers
48 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 ...
user avatar
  • 931