Questions tagged [boxes]

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

Filter by
Sorted by
Tagged with
2
votes
1answer
61 views

Symbolized, Subscripted Variable Doesn't Look Pretty

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 trying to ...
2
votes
0answers
32 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
37 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
127 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
101 views

TagBox Column and comments

This provides a useful input format, extendable with Ctrl+Enter: ...
5
votes
1answer
102 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
35 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
57 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
240 views

ToExpression and ToBoxes aren't inverses of each other?

Applying ToExpression and ToBoxes repeatedly to Hold[1/1] gives many ...
1
vote
0answers
42 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
120 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
46 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
71 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
43 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
258 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
66 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
102 views

InterpretationBox problem with symbolic expressions

Related to this question, Why does this InterpretationBox construct work when x, y are ...
1
vote
1answer
34 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
157 views

How to build a TemplateBox with dynamic length GridBox?

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

Newline in code with MakeExpression

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

Redefined MakeExpression leads to error in interpreting

I’d like to have a TemplateBox that interprets as its content boxes: ...
12
votes
6answers
8k 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
76 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
145 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
682 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
173 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
47 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
111 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
242 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
309 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
76 views
1
vote
1answer
177 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
196 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
176 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
184 views

Export Table with URL as HTML?

This is expression: ...
31
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
65 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
117 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 ...
2
votes
1answer
157 views

Strange setting in FormatValues[MakeExpression]

My system is: 8.0 for Mac OS X x86 (64-bit) (October 5, 2011) When I start Mathematica and call FormatValues[MakeExpression] I get the following output: ...
12
votes
1answer
153 views

Strange behavior of UpSetDelayed together with MakeBoxes

In order to answer this question, I just stumbled into the world of UpValues. Though I managed to find a solution for the problem, I'm confused by my own code now 囧,...
6
votes
4answers
383 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
232 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
112 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
94 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
136 views

How to make TeXForm use TemplateBox to generate code?

If I define the TraditionalForm formatting of myFunction without TemplateBox, then ...
5
votes
3answers
186 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 ...
6
votes
1answer
130 views

To TagSet or not to TagSet when using MakeBoxes

What is the difference between the following two: ...