Questions tagged [boxes]
Boxes are the underlying representation of two-dimensional forms in notebooks.
162
questions
2
votes
3
answers
112
views
Space cannot be used in vertical string with unicode character
To reproduce the issue, use Ctrl+Enter to create 3 placeholders and enter 你 好 (or ...
3
votes
0
answers
36
views
What's the effect of SyntaxForm option in StandardForm boxes of Superscript?
Consider the following sample:
...
2
votes
1
answer
38
views
Is it possible to make your own output format that uses the "Data not in notebook. Store now" mechanism?
Several functions in WL have a custom elided typesetting form that does not automatically embed large amounts of data into the notebook but presents you with the option to do so if you wish. ...
1
vote
2
answers
85
views
SummaryBox and Recursion
How can I make it so that what is under the dropdown block is not calculated/constructed at once? Example code:
...
3
votes
2
answers
460
views
What is box-structure in Mathematica? Why can a function be left-value?
When I looked carefully at the $x_{j}=1$, I realized that it is essentially an assignment of a function. A function is as left-value, isn't it strange? What syntax supports this?
I tried assigning a ...
5
votes
1
answer
182
views
Validate `Box` grammar, is it possible?
Is it possible to validate grammar related to Box formed expression (RowBox, FractionBox, ......
0
votes
0
answers
30
views
How can I make UnIconize produce formatted Strings? (or, how can I get UnIconize Wrap RawBoxes around Boxes?)
UnIconize from the menu turns RawBoxes into Box forms:
If I Iconize the right-hand side of this:
And then Uniconize it,
the formatted strings are appear as Box forms:
...
1
vote
1
answer
46
views
Combination of RowBox and SuperscriptBox create a new line "\n"?
Given the following code:
...
0
votes
2
answers
114
views
Parentheses control
I have an equation with random integer coefficients. The structure is to demonstrate the distributive property.
...
7
votes
1
answer
81
views
How do I include additional kinds of boxes that are Tab-selectable
Observe that "PlaceHolder" and InputFieldBox are known by the FE to respond to pressing the Tab key:
...
10
votes
1
answer
126
views
How do I view the built-in definition of TemplateBox styles in terms of low level boxes?
The following:
TemplateBox[{"a", "b"}, "Binomial"] // RawBoxes
yields the correctly formatted (2d box structure) of Binomial[a,b]:
$$\...
1
vote
0
answers
30
views
Message misrendering line-wrapped Boxes in strings
Consider this simple incorporation of Boxes which render MatrixForm into a Message:
...
1
vote
1
answer
74
views
Cannot render boxes from WSTP C++
I am attempting to send text from a WSTP C++ backend to the Mathematica kernel which should be parsed and rendered as boxes.
The goal is for the user to see the ...
5
votes
1
answer
130
views
Modify StandardForm of E
StandardForm of E is \[ExponentialE], can we modify it to something else?
I thought I could ...
2
votes
1
answer
46
views
How can I prevent my self-introduced integral sign being multiplied into the numerator of the integrand when converting the expression into TeXForm?
Recently I have been doing a lot of double and triple integrals. To my disappointment, MMA does not have built-in integral signs for those advanced or special integrals. Fortunately, I have found out ...
4
votes
2
answers
157
views
Make very long equals sign
My goto in LaTeX is
\stackrel{\text{by obviousness}}{=\joinrel=\joinrel=\joinrel=\joinrel=\joinrel=\joinrel=\joinrel=}
where I stick together enough equals signs ...
0
votes
0
answers
28
views
For DisplayForm[ButtonBox[ _String ]], "2%" displays as "2 x %". How to prevent this?
Seems that the ButtonBox is visually (not functionally) treating the String as an Expression.
...
6
votes
1
answer
192
views
How to recover these TemplateBox into normal form?
I often use $\TeX$ editor by Insert→Inline TeX Input in PlotLabel to label graphics:
I will get a well-formed plot label:
But when I Copy As Input Text and paste ...
14
votes
1
answer
229
views
How to create a general AttachedCell toolbar?
For example, when an image is displayed in the frontend, the image suggestion toolbar, which is an AttachedCell, pops up:
It can can be found here, among other ...
1
vote
1
answer
137
views
How do I make a symbol for a second derivative?
In my script, I want the second derivative of a function to be a symbol that I can manipulate (i.e. give a value to, use in an expression, etc.). So I want to build a box for the expression:$$\frac{d^...
1
vote
1
answer
84
views
Single-press TemplateBox deletion
One of the handy things about TemplateBox is that it can be used to define an alias for a more "natural symbol" (by having an empty list first argument ...
1
vote
2
answers
100
views
Generating PlotLabel with mathematical formatting
What's a good pattern to insert properly formatted matrices into PlotLabel? I'm trying to insert something like the following into my plot, where the matrix is ...
1
vote
1
answer
69
views
How to change style/content of cell that is programmatically generated, using a checkbox?
I am programmatically generating some cells that have a checkbox along with some text. The following code creates a button which when clicked, creates such cells.
...
1
vote
0
answers
80
views
Whole 2 line code, producing a bug (infix operator)
Copy the following code, and create new 0 byte file, and paste the code and save it to TEST.nb
...
2
votes
1
answer
67
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
1
answer
123
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
3
answers
237
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 ...
5
votes
1
answer
115
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
1
answer
50
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 ...
3
votes
0
answers
170
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
1
answer
102
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
3
answers
135
views
How do I turn off StandardForm formatting for Piecewise, KroneckerDelta and ConditionalExpression?
I find the StandardForm formatting for Piecewise, KroneckerDelta, and ...
2
votes
0
answers
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
1
answer
209
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
0
answers
53
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
1
answer
133
views
TagBox Column and comments
This provides a useful input format, extendable with Ctrl+Enter:
...
6
votes
1
answer
197
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?
...
2
votes
0
answers
61
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 ...
2
votes
0
answers
507
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
0
answers
45
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
0
answers
73
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
1
answer
144
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
0
answers
82
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
1
answer
64
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
1
answer
224
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
1
answer
55
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
2
answers
166
views
InterpretationBox problem with symbolic expressions
Related to this question,
Why does this InterpretationBox construct work when x, y are ...
17
votes
1
answer
339
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
1
answer
61
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
0
answers
67
views
Bug with TeXForm conversion of superscript in strings [duplicate]
Bug introduced in 10.0 or earlier and persisting through 11.3
Consider a String expression with a TemplateBox superscript:
...