Questions tagged [boxes]

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

Filter by
Sorted by
Tagged with
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...
6
votes
1answer
697 views

How to convert an image to a compressed string representation equivalent to one copied to clipboard by `CopyToClipboard[image]`?

In my recent question I asked How to embed an image into a string? The suggested solution was ...
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?
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 ...
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 ...
4
votes
1answer
55 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, ...
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 ...
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 ...
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 ...
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 ...
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 ...
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*) ...
3
votes
1answer
106 views

TagBox Column and comments

This provides a useful input format, extendable with Ctrl+Enter: ...
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
111 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 ...
12
votes
2answers
260 views

ToExpression and ToBoxes aren't inverses of each other?

Applying ToExpression and ToBoxes repeatedly to Hold[1/1] gives many ...
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, ...
7
votes
1answer
125 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: ...
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 ...
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 ...
6
votes
1answer
265 views

This code crashes the FrontEnd - can I remove anything else?

Bug present in version 11.0.0 Thank you for contacting Wolfram Technical Support and for taking the time to report this issue. I have forwarded it to our development team. I want to file a ...
3
votes
1answer
88 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 ...
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): ...
6
votes
2answers
188 views

How to build a TemplateBox with dynamic length GridBox?

I have created the following TemplateBox Rule. ...
5
votes
2answers
150 views

Newline in code with MakeExpression

I start with f[x]. In boxes, this is RowBox[{"f", "[", "x", "]"}]. I apply ...
2
votes
1answer
143 views

Redefined MakeExpression leads to error in interpreting

I’d like to have a TemplateBox that interprets as its content boxes: ...
12
votes
6answers
9k views

Notation of partial derivative

I want to write partial derivatives of functions with many arguments. Why is it that when I type f[x,y] ctrl+6 (0,1) it turns out to be bad syntax? The output of ...
2
votes
1answer
80 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: ...
5
votes
2answers
152 views

Combination of CellPrint and PrintTemporary, or DisplayForm for Cells

I'm programmatically generating some formatted output that generates a cell in the form of a Cell[] expression. For instance, the output might be ...
21
votes
3answers
709 views

Tokenize Mathematica input in a simple way

Background Usually, I give detailed descriptions when I have a question which sometimes lead to that users don't write their answers because they maybe think their answer is too simple. Therefore, I ...
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,...
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
171 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. ...
9
votes
3answers
253 views

Why does MakeBoxes mess up RowBox ordering?

When I use RowBox for MakeBoxes the order of the elements is changed for TraditionalForm, if there is a plus (+) in the list of elements. ...
18
votes
3answers
314 views

How do I use the third and fourth arguments of Parenthesize?

Parenthesize seems to do a good job with constructing boxes that need to be appropriately parenthesized: ...
0
votes
0answers
77 views
1
vote
1answer
181 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. ...
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 ...
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
207 views

Export Table with URL as HTML?

This is expression: ...
33
votes
2answers
2k views

How do I extract the contents of a selected cell as plain text?

My aim is to extract the contents of an Input cells as plain text. Ideally I would like to be able to select one or more Input cells and press a button which would then extract the text from these ...
16
votes
0answers
166 views

Issue with undo after copying a string inside a string

Bug introduced in 10.0 and persisting through V11.3 Here's a small but annoying issue related to undo and copying of strings. Steps required to get the problem: Type ...
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 ...