Questions tagged [boxes]
Boxes are the underlying representation of two-dimensional forms in notebooks.
137
questions
2
votes
1answer
38 views
Can you use boxes to create a primed variable?
I want to use a symbol to distinguish $\lambda$ in one coordinate set from another $\lambda$ in another set. Traditionally, we'd use a prime symbol ' to do this (e.g. $\lambda'$). I tried using this ...
3
votes
1answer
68 views
Panel, Pane, and Framed Alignment - Clipped Images, Negative Margins, ContentPadding
I'm trying to tightly wrap some expressions in containers (could be Panel, Pane, maybe Framed...
4
votes
3answers
187 views
Is there a way to print simple roots as Root objects?
I like the typesetting of Root objects. For example:
3-Sqrt[2]+Sqrt[3]//RootReduce
But can I get the same root object with its typesetting for simple roots like ...
4
votes
1answer
84 views
Boxes with autocompletion
Entities have this nice autocompletion of properties:
How do I define autocompletion for my own boxes that behave the same way?
3
votes
1answer
38 views
How to make boxes independent from those cell-formatting options?
In a cell whose LanguageCategory option is "Input", boxes will be syntax-highlighted. Is there any way to diasble such ...
2
votes
0answers
81 views
Is there any way to change the box-formatting behavior thoroughly?
Background
The box-formmating behavior is affected by the downvalues of the symbol MakeBoxes. But the formatting behavior is not exactly ...
4
votes
1answer
58 views
Custom object display in Dataset using MakeBoxes
The below code defines a couple "objects" in the Mathematica sense using a convention consisting of so-called Q-functions for creating types and data validation, ...
5
votes
3answers
92 views
How do I turn off StandardForm formatting for Piecewise, KroneckerDelta and ConditionalExpression?
I find the StandardForm formatting for Piecewise, KroneckerDelta, and ...
2
votes
0answers
33 views
What's going on with \> and \< in strings? [duplicate]
What exactly do \> and \< do in Mathematica strings (e.g. "ab\>c")?
They ...
3
votes
1answer
116 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 ...
0
votes
0answers
44 views
Boxes Bug in 10.0.2.0
Mathematica 10.0.2.0, specifically:
10.0 for Mac OS X x86 (64-bit) (December 4, 2014)
ReleaseID 10.0.2.0 (5206630, 2014120404),
PatchLevel 0
appears to have a bug in handling boxes. The ...
3
votes
1answer
106 views
6
votes
1answer
116 views
Convert between string and expression representation of boxes
Boxes may be represented as expressions or as strings. How can I convert between the two forms? In particular, how can I convert from the string representation to the expression representation?
...
1
vote
0answers
39 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 ...
0
votes
0answers
112 views
Unknown Box Name (ToBoxes) Error
I'm getting the following error in Mathematica
What is going on? How do I avoid such an error?
In order to roughly understand how I'm getting this error, here is a bit of context:
I'm using ...
1
vote
0answers
43 views
How to do indentation of nesting of Associations, Lists and other heads?
I was looking at the presentation about Wolfram's Symbolic ERP Project and in this video, they had functions to do nice indentation of nested Associations, ...
1
vote
0answers
53 views
How do Mathematica processes DynamicBox? [closed]
I've heard that Mathematica uses a session ad hoc to process DynamicBox, but I don't know any detail. I am using DynamicBox in ...
7
votes
1answer
126 views
Quick way to preview and tweak styles?
I find the old stylesheet UI clunky and hard to use:
FrontEndExecute @ FrontEndToken @ "EditStyleDefinitions"
There's also the clunky style previewer as well:
...
0
votes
0answers
72 views
How can I programmatically extract the text content from a Notebook's cell definition? [duplicate]
Given the Notebook cell definition below from the Wolfram Function Repository as an example:
...
3
votes
1answer
50 views
How define boxes to avoid parenthesis
The following definition for boxes in TraditionalForm formats as $\{a,b\}\{c,d\}$ (for simplicty, it matches only if the arguments literally are ...
3
votes
1answer
89 views
Updating a Dynamic variable based on another variable's change
In a dynamic interface, I am using a custom replacement for InputField that tracks two things separately:
The value of the variable that is input.
The boxes that ...
0
votes
1answer
43 views
How to generate a list (or even a sequence or a string) containing {x[1]==0&&x[2]==0&&…&&x[10]==0?
I need to solve a bunch of systems of n equations in n unknowns where n varies. I can do ...
2
votes
2answers
116 views
InterpretationBox problem with symbolic expressions
Related to this question,
Why does this InterpretationBox construct work when x, y are ...
17
votes
1answer
307 views
How to make version 12 print Root objects to screen normally as in earlier versions?
From clean kernel, when typing
result = Reduce[2 d^2 == -((2*(1 + d) + ((4 d^3)/(1 - d)))*(d - 1)),d]
Here what version 12 displays on the screen, compared to ...
1
vote
1answer
40 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):
...
2
votes
1answer
81 views
SubsuperscriptBox and SuperStar
I have a notational reason (using the Notations package) to have some symbols display as C*60 (with the 60 lined up under the *). Internally, this is represented in Mathematica as:
...
3
votes
0answers
52 views
Are there any good tutorials on Boxes?
I am fairly competent in Mathematica, but I admit that I am baffled by Boxes, both making boxes and converting boxes back into expressions. I want to educate myself,...
6
votes
2answers
189 views
How to build a TemplateBox with dynamic length GridBox?
I have created the following TemplateBox Rule.
...
3
votes
2answers
202 views
Show additional box border in 3D plot
How to best draw an additional box boder at {x, y, 0} as indicated by the red arrow below? PlotRange is ...
3
votes
0answers
52 views
How to make custom attached menubars? [duplicate]
I would like to understand how to build an attached menubar. For example, Image has the following bar - an attached cell that arises when clicked on:
...
3
votes
2answers
173 views
Using Symbolize to Convert Multiple Variables at Once
So, I have created a list of subscripted and overdotted variables that I would like to symbolize, so I run them through a for loop. Seems to me that this would work? Any help is appreciated.
...
0
votes
0answers
77 views
9
votes
1answer
182 views
How to defer creating/displaying boxes in front end until requested?
If the size of an output expression is larger than threshold ByteCount, the front end will display an abbreviated version of it by producing an ...
5
votes
2answers
208 views
2
votes
0answers
69 views
Why doesn't the low-level box representation of a graph with VertexLabels use GraphicsComplex?
Compare following two low-level box representations of a graph without VertexLabels and one with VertexLabels set to ...
2
votes
1answer
121 views
ToExpression and RowBox — orderings
With:
ToExpression[RowBox[{"c", ToBoxes[Plot[Sin[x], {x, -2, 2}]], "a"}]]
I get the three elements of the array, but with "a" and then "c" at the beginning. I ...
6
votes
1answer
215 views
TagBox + InterpretationBox vs ConvertTo/StandardForm
There appears to be a problem with a menu command Convert To / StandardForm (Crtl+Shift+N) with respect to InterpretationBox ...
7
votes
4answers
422 views
Make a custom object look like MatrixForm of a matrix?
Let's say I have a custom object that I denote
Obj[a,b,c,...]
There are always n^2 entries in the object for some integer <...
5
votes
0answers
258 views
How to prevent formatting as Mathematica code in inline cells?
We can start a new inline cell using Insert ā Typesetting ā Start Inline Cell. This is often used to insert mathematical formulae in text cells.
Instead, I want to use it to insert small bits of non-...
6
votes
1answer
151 views
How to display fractional expression like this?
For example:
The default output is
I want to the output display like
I noticed that FractionBoxOptions, but couldn't find a appropriate options.
3
votes
2answers
95 views
Correct 2D representation in a message string
Message knows how to convert an expression (taken as an argument) into a string before it is spliced into an actual message:
If I run the following in my terminal ...
4
votes
1answer
146 views
How to make TeXForm use TemplateBox to generate code?
If I define the TraditionalForm formatting of myFunction without TemplateBox, then
...
5
votes
3answers
189 views
Dynamically updated AccountingForm
Bug introduced in 10.4 or earlier and persisting through 11.1.1
CASE:3918306 confirmed
I freshly installed Wolfram Mathematica. I can't quite remember how to output a dynamically updated variable ...
4
votes
2answers
101 views
Is MakeBoxes applied recursively, or just at top level?
I ask because I'm trying to make Times[a, z^-1] //TraditionalForm display as $a z^{-1}$ rather than $a/z$. If I write
...
4
votes
2answers
135 views
MakeExpression can't deal with FE boxes riffled with whitespaces
Bug introduced in 8 or earlier and persisting through 12.0
CASE:3910218
When you input
{ 1 , 2 } (*spaces intended, retype them if you want to copy this*)
...
6
votes
2answers
453 views
Symbolize Does Not Work in `.m` Files or What?
I have a .nb (notebook) file which I should convert to a .m (mathematica package) file to run it remotely from command line of a ...
5
votes
1answer
76 views
How to hyperlink a plot output?
I would like to adapt the following instructions How to create a Hyperlink within the current Notebook? to have a hyperlink to an output of a simple plot such as
...
1
vote
1answer
182 views
Use of standard form in .wl package
In a .wl package, i use the package notation but it is presented as inputform and it is consequently not very easy to read.
...
4
votes
1answer
62 views
Custom MakeBoxes rule triggered in the Information of functions
Consider the following toy example:
...
4
votes
0answers
63 views
Is it possible to access FrontEnd's own conversion rules for boxes?
Before sending its output to the FrontEnd the Kernel converts it into boxes by applying MakeBoxes. But it is not the whole story. FrontEnd not just displays the box ...