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

learn more… | top users | synonyms

5
votes
1answer
38 views

Strange problem with Derivative and BoxForm`MakeDerivativeBoxes

All of the following three lines should produce the same output, but the third variant produces an error on output. ...
0
votes
0answers
22 views

FormBox in pretty strings

My goal is to write usage messages in the same style as Mathematica's built-in ones, such as List::usage. This involves a mess of ...
5
votes
3answers
131 views

How to extract the displayed name of an entity

Entities are typically displayed in their elided form: It's useful when exploring the output of EntityList to have access to the canonical name of the ...
16
votes
0answers
99 views

Inconsistent handling of Dynamic option values; intended, omission, or bug?

In answering Dynamic ClipPlanes calculated from current ViewPoint Kuba and I got into a brief exchange regarding how Option values wrapped in Dynamic should be ...
7
votes
2answers
96 views

How to open and explore the codes of the system Palettes files

The built in Palettes of Mathematica are simply .nb files which can be found in the following place: ...
9
votes
0answers
53 views

Issue with undo after copying a string inside a string

Bug introduced in 10.0 and persisting through 10.4.1 or later Here's a small but annoying issue related to undo and copying of strings. Steps required to get the problem: Type ...
3
votes
1answer
48 views

Newline in code with MakeExpression

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

How can I define MakeBoxes for Inactive forms of user-defined heads?

Here I define a MakeBoxes for Times: ...
7
votes
1answer
101 views

How to convert arbitrary raw boxes directly into String?

This question is motivated by the recent question about searching inside of the NB files. According to the Documentation, ToString expects a high-level WL ...
5
votes
0answers
123 views

Same input,different result? [duplicate]

Using this code,you can see,same input, but the output are different. So weird! If I copy this code here, it outputs normally. So what's the problem? Ps:I use ...
3
votes
1answer
25 views

Definition of TraditionalForm

This is a followup of "How to check for Mathematica’s definition of XY?, a question by uli on how to access the definition of a built-in symbol. That question focused on ...
18
votes
2answers
307 views

Understanding evaluation and typesetting

Background So, one could be surprised by the fact that: Hold @ Grid[{{1, 2}}] (*or*) Hold @ Graphics @ Disk[] This issue and methods of prevention are ...
8
votes
2answers
84 views

Reading Cells or Boxes expression by expression

Let's say we have a cell: (*newline*) (*newline*) Plot[ x, {x, 0, 1} ] (*newline*) Plot[x, {x, 0, 2}] How to read it expression by expression? ...
15
votes
2answers
203 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: ...
7
votes
1answer
122 views

ToExpression and ToBoxes aren't inverses of each other?

Applying ToExpression and ToBoxes repeatedly to Hold[1/1] gives many ...
2
votes
1answer
54 views

What sets of boxes can be selected?

In this question I am only interested in mathematical expressions arising in output cells, not more elaborate code which is typically found in input cells. My understanding is that such output is ...
3
votes
1answer
85 views

Test whether the selection is a subexpression

I am writing a button that applies some transformation to the current selection, in a spirit similar to the question "Apply a function to the current selection in place". However, I would like to ...
3
votes
1answer
38 views

Custom MakeBoxes are issued also for different pattern expressions

Suppose I want to display some expression, say foo[p1_,p2_], as a point in a circle. I can achieve this using MakeBoxes, like ...
1
vote
2answers
74 views

Manipulate slider freeze, and empty value in box

Here's a MWE code to show two problems I'm experiencing with the sliders and their value box, under Manipulate : ...
5
votes
1answer
79 views

What are “\<” and “\>” delimiters in box expressions?

If I enter a string (say, "abc") in a cell, and then switch to box representation (Shift+Ctrl+E or menu item ...
7
votes
1answer
111 views

Ways to obtain a BoxObject

Is there any way to get a BoxObject, except with EvaluationBox or ParentBox? So usually one ...
7
votes
2answers
269 views

Add semicolon at the end of code line programmatically

Suppose we have several lines of code in a cell: a b; Module[{}, c d] e How can we wrap them in a CompoundExpression i.e. ...
1
vote
0answers
63 views

Redefined MakeExpression leads to error in interpreting

I’d like to have a TemplateBox that interprets as its content boxes: ...
8
votes
1answer
84 views

On an existing notebook, how to transform all “double brackets” into “DoubleBracket”

Sometimes, having all double brackets [[...]] transformed into \\[LeftDoubleBracket] ... \\[RightDoubleBracket] can really ...
7
votes
1answer
152 views

How to get string representation of boxes in v10.2?

In Mathematica versions up to 10.1 we could get string representation of given boxes by passing them to ToString with InputForm: ...
10
votes
1answer
300 views

How to change the font color of a variable in whole input cell

I want to track the occurrence of a particular variable in a code. So the idea is to change its color. Usually I do it in a crude way - convert the code into text and then use ...
1
vote
1answer
213 views

How can I draw a box with moving particles inside and a hole in one side? [closed]

The idea is to create a simulation for ideal gas motion in a container that have a hole and then find the speed distribution for the gas particles that leave the box through the hole. I have a ...
3
votes
1answer
64 views

Splitting formatted output to multiple lines in a controlled fashion

Let's consider a slightly complicated expression in TraditionalForm: ...
2
votes
2answers
93 views

NotebookWrite in EvaluationBox forces Input CellStyle

There is a promissing new function EvaluationBox[] and a nice last example in documentation section for it: ...
4
votes
0answers
88 views

Using an external Pattern breaks Format

I noted while writing this answer that using an external Pattern on Format doesn't work: ...
6
votes
2answers
191 views

How can you resize all the images in a notebook section?

I've pasted a large number of photos and they are too big which makes scrolling hard. Is there a way to automatically have Mathematica size them to 10% or something reasonable without have to click on ...
2
votes
1answer
91 views

How to suppress clutter parentheses in output?

Dozens of unnecessary parentheses are making my output hard to read. For example, this: expr = D[f[x], {x, 2}]^2; returns this: (* f"[x]^2 *) But when I try ...
5
votes
2answers
101 views

Removing spurious parenthesis in `TraditionalForm`

I don't understand the following behavior (in v 9.0.1) of TraditionalForm regarding insertion of parenthesis. Let us start with the a definition for ...
3
votes
0answers
57 views

To UpSet or not to UpSet when using MakeBoxes

What is the difference between the following two: ...
5
votes
2answers
183 views

Customizing display of partial differential equations

I am manipulating partial differential equations symbolically, and would like to get the easily readable form $\rho \frac{\partial v}{\partial t}$, leaving variables implicit. Based on suggestions ...
10
votes
2answers
267 views

Backslash commands in strings?

I discovered by playing around that Text[DisplayForm@SubscriptBox["\[Lambda]", "k"]] produces the same result as ...
9
votes
1answer
174 views

How to get a list of all expressions in a notebook matching a certain pattern?

Suppose I have a Mathematica notebook saved to a certain location on disk. Given a pattern I need to get the list of all expressions matching this pattern that appear in input, output or print cells ...
2
votes
2answers
84 views

How to paste multiple expression using PasteButton?

Is there a way to paste multiple expressions into notebook using PasteButton? For example, I want to do ...
7
votes
1answer
151 views

Converting string representation of boxes into explicit boxes [duplicate]

It is very easy and convenient to write textual labels as Strings in the WYSIWYG mode. For example, I define a short form describing a linear model: ...
2
votes
1answer
140 views

A Box for the integral or partial derivative d

I am looking for the name of the box in the Box Language of Mma making integrals, such as those shown in the image below as well as of the sign of the partial derivative. I understand that I can get ...
5
votes
2answers
113 views

How to robustly apply ToBoxes to a Dynamic expression?

Inserting a Dynamic object in a boxform expression messes up syntax colouring. See the following example. where the variable ...
5
votes
1answer
668 views

How to extract a possible closed form from WolframAlpha[] output

To find a possible closed form of a number, I can use the function WolframAlpha["6.38905609893065", IncludePods -> "PossibleClosedForm"] It returns a result ...
6
votes
1answer
129 views

Why only up to two \[Prime] superscripts are interpreted as derivatives?

I noticed that only up to two \[Prime] superscripts are interpreted as derivatives. Is there a reason for this restriction? Is it documented? ...
5
votes
2answers
140 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. ...
4
votes
2answers
168 views

ToBoxes Respect Spaces Code

Is there a way to force either ToBoxes or MakeBoxes to respect the spacing that occurs in the code? For example is there a way ...
11
votes
1answer
174 views

Functions returns Command Completion Output

Is there a function that returns the output as if you invoked Command Completion. To help clarify I am looking for a function that returns the Cell Data as if you invoked ...
2
votes
1answer
1k views

How to import a Microsoft Word document into Mathematica?

I have a Microsoft Word document in DOCX format. I need to import it into Mathematica as a String preserving all formatting (font, size, bold/italic style, colors, ...
3
votes
2answers
455 views

FrameStyle in Inset with Framed expression

I am creating some plots that use FrameStyle->AbsoluteThickness@5 and PlotStyle->AbsoluteThickness@0.5. In my plots' ...
1
vote
1answer
188 views

How to copy an image given as a GraphicsBox expression to the clipboard?

I have a GraphicsBox expression encoding an image. I need to copy this image to the clipboard so that it can be inserted in a Microsoft Word document. When I invoke ...
5
votes
1answer
376 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 ...