Questions tagged [boxes]

Boxes are the underlying representation of two-dimensional forms in notebooks.

Filter by
Sorted by
Tagged with
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 ...
Y. zeng's user avatar
  • 425
3 votes
0 answers
36 views

What's the effect of SyntaxForm option in StandardForm boxes of Superscript?

Consider the following sample: ...
xzczd's user avatar
  • 62.8k
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. ...
Sjoerd Smit's user avatar
  • 21.6k
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: ...
Kirill Belov's user avatar
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 ...
Aerterliusi's user avatar
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, ......
imida k's user avatar
  • 4,037
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: ...
Craig Carter's user avatar
  • 3,926
1 vote
1 answer
46 views

Combination of RowBox and SuperscriptBox create a new line "\n"?

Given the following code: ...
infinitezero's user avatar
  • 1,335
0 votes
2 answers
114 views

Parentheses control

I have an equation with random integer coefficients. The structure is to demonstrate the distributive property. ...
JEM's user avatar
  • 1,147
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: ...
QuantumDot's user avatar
  • 19.5k
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]: $$\...
QuantumDot's user avatar
  • 19.5k
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: ...
Anti Earth's user avatar
  • 1,151
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 ...
Anti Earth's user avatar
  • 1,151
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 ...
xzczd's user avatar
  • 62.8k
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 ...
AlbertLew's user avatar
  • 463
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 ...
Adam's user avatar
  • 3,797
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. ...
jWey's user avatar
  • 73
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 ...
yode's user avatar
  • 26.1k
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 ...
István Zachar's user avatar
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^...
Quark Soup's user avatar
  • 1,560
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 ...
Ronald Monson's user avatar
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 ...
Yaroslav Bulatov's user avatar
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. ...
Sâu's user avatar
  • 525
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 ...
imida k's user avatar
  • 4,037
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 ...
Quark Soup's user avatar
  • 1,560
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...
Sean's user avatar
  • 615
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 ...
user13892's user avatar
  • 9,043
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?
swish's user avatar
  • 7,591
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 ...
asd1dsa's user avatar
  • 573
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 ...
asd1dsa's user avatar
  • 573
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, ...
rfrasier's user avatar
  • 592
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 ...
QuantumDot's user avatar
  • 19.5k
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 ...
thorimur's user avatar
  • 8,930
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 ...
Sterling's user avatar
  • 523
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 ...
user46831's user avatar
  • 633
3 votes
1 answer
133 views

TagBox Column and comments

This provides a useful input format, extendable with Ctrl+Enter: ...
Mr.Wizard's user avatar
  • 269k
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? ...
Szabolcs's user avatar
  • 232k
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 ...
Tanner Legvold's user avatar
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 ...
sam wolfe's user avatar
  • 4,187
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, ...
user13892's user avatar
  • 9,043
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 ...
bcegkmqs23's user avatar
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: ...
M.R.'s user avatar
  • 31k
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: ...
Sylvain Leroux's user avatar
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 ...
QuantumDot's user avatar
  • 19.5k
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 ...
Kevin Ausman's user avatar
  • 2,267
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 ...
matrixbud's user avatar
  • 411
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 ...
alancalvitti's user avatar
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 ...
Nasser's user avatar
  • 135k
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): ...
Kevin Ausman's user avatar
  • 2,267
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: ...
Mr.Wizard's user avatar
  • 269k