Questions tagged [boxes]

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

Filter by
Sorted by
Tagged with
1 vote
1 answer
86 views

Why are extra characters created with MakeBoxes?

Consider a symbol that looks like this one: $a_b$ This question is about the behavior MakeBoxes on strings that contain boxes. Try this: Iconize $a_b$ and then Un-Iconize it---no problem. Now try this:...
Craig Carter's user avatar
  • 4,425
4 votes
2 answers
180 views

Converting WolframAlpha Output to Markdown

I am calling Wolfram Alpha using WolframScript. That is, I can't display all the beauty that is inserted into Wolfram Mathematica Notebook. Let's say I execute a line like this: ...
Kirill Belov's user avatar
2 votes
1 answer
67 views

RawBoxes in ClickToCopy adding spaces after escaped characters

I'd like to use ClickToCopy to display a matrix equation, and have its TeX form be copyable. I started with something like ...
srossd's user avatar
  • 260
1 vote
0 answers
46 views

How do I clear out-of-quote content from a Boxes-type InputField?

I have this code as a test. ...
Milk's user avatar
  • 1,688
4 votes
1 answer
222 views

How to execute a String code in the form of StandardForm?

How to execute a String code in the form of StandardForm? I want to get execution results for strings of various forms. For this, I used ToExpression. ...
Milk's user avatar
  • 1,688
2 votes
3 answers
132 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
  • 567
3 votes
0 answers
40 views

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

Consider the following sample: ...
xzczd's user avatar
  • 66.2k
3 votes
1 answer
45 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
  • 23.5k
1 vote
2 answers
95 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
523 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
190 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,285
0 votes
0 answers
35 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
  • 4,425
1 vote
1 answer
52 views

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

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

Parentheses control

I have an equation with random integer coefficients. The structure is to demonstrate the distributive property. ...
JEM's user avatar
  • 1,165
7 votes
1 answer
86 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.7k
10 votes
1 answer
133 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.7k
1 vote
0 answers
31 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,211
1 vote
1 answer
79 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,211
5 votes
1 answer
134 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
  • 66.2k
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
  • 483
4 votes
2 answers
266 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,947
0 votes
0 answers
31 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
219 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.7k
14 votes
1 answer
243 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
163 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,610
1 vote
1 answer
85 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
107 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
72 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
  • 535
1 vote
0 answers
81 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,285
2 votes
1 answer
76 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,610
4 votes
1 answer
138 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
  • 645
4 votes
3 answers
254 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,385
5 votes
1 answer
126 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,881
3 votes
1 answer
52 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
193 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
108 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
139 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.7k
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
  • 9,010
3 votes
1 answer
238 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
  • 543
0 votes
0 answers
54 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
  • 643
3 votes
1 answer
135 views

TagBox Column and comments

This provides a useful input format, extendable with Ctrl+Enter: ...
Mr.Wizard's user avatar
  • 272k
7 votes
1 answer
214 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
  • 235k
2 votes
0 answers
71 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
557 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,693
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,385
1 vote
0 answers
74 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
150 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
  • 31.5k
0 votes
0 answers
83 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
68 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.7k
3 votes
1 answer
235 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