Skip to main content
17 votes
Accepted

How to make version 12 print Root objects to screen normally as in earlier versions?

Making the comments into an an answer as suggested. SetSystemOptions[ "TypesetOptions" -> "NumericalApproximationForms" -> False] will restore the legacy ...
ilian's user avatar
  • 25.5k
13 votes

Tokenize Mathematica input in a simple way

I am a developer at Wolfram Research and I am trying to share some of the work I have been doing with parsing WL code. I have written a package for parsing WL code and retaining interesting metadata, ...
brenton's user avatar
  • 521
10 votes

What are "\<" and "\>" delimiters in box expressions?

Summary of the all available information In the hoarier days space-like characters (spaces, newlines, tabs) inside strings were interpreted on input in an odd way: for example single newlines ...
Alexey Popkov's user avatar
10 votes

What are the differences between using MakeBoxes and Interpretation?

Assuming that you want to create a special display form for foo that can be used in all contexts, you should use neither of these solutions. Why? ...
Szabolcs's user avatar
  • 236k
10 votes
Accepted

Validate `Box` grammar, is it possible?

You may try using MathLink`CallFrontEnd[FrontEnd`ReparseBoxStructurePacket[...]]. ...
Domen's user avatar
  • 31k
10 votes

What is box-structure in Mathematica? Why can a function be left-value?

Definitions The tech note, Transformation Rules and Definitions, starting with the section "Making Definitions for Indexed Objects" and going on through "Modifying Built-in Functions&...
Michael E2's user avatar
  • 241k
9 votes
Accepted

What are the differences between using MakeBoxes and Interpretation?

Point of conversion A large and perhaps key difference is that MakeBoxes (foo) only transforms the expression into the expanded ...
Mr.Wizard's user avatar
  • 273k
9 votes
Accepted

Make a custom object look like MatrixForm of a matrix?

InterpretationBox will take care of making safe round trip from boxes to expression but we need to take extra care during condition checking and partition not to ...
Kuba's user avatar
  • 137k
9 votes
Accepted

How do I view the built-in definition of TemplateBox styles in terms of low level boxes?

They live in stylesheets: CurrentValue[{StyleDefinitions, "Binomial"}] ...
Kuba's user avatar
  • 137k
8 votes

MakeBoxes for Power not matching when inside Times?

I believe the existing rules for Times take precedence. (i.e. act first.) Perhaps a derivative of this can work for you: ...
Mr.Wizard's user avatar
  • 273k
8 votes
Accepted

Is there a way to print simple roots as Root objects?

expr = 3 - Sqrt[2]; Use ToNumberField to convert the expression to an AlgebraicNumber ...
Bob Hanlon's user avatar
  • 161k
7 votes

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

Thank you for bringing this to our attention. I've done a preliminary investigation. On Unix only the kernel crashes, on Windows the FE crashes (or, more accurately, the FE crashes before the kernel ...
Itai Seggev's user avatar
  • 14.2k
7 votes

Symbolize Does Not Work in `.m` Files or What?

This answer may seem slightly off but it was posted before recent updates. The bottom line holds though. It symbolizes boxes, not expressions, it is not Subscript ...
Kuba's user avatar
  • 137k
7 votes
Accepted

How to convert expression with Subscript to string

how to convert a expression containing 2D format into corresponding string that retains the format programmatically? For example, how to convert ...
Alexey Popkov's user avatar
7 votes

TagBox + InterpretationBox vs ConvertTo/StandardForm

This report finally found its way to me, and this is not a bug. I'm sorry support gave you incorrect information. This has nothing to do with the particular boxes involved, but rather with your use ...
Itai Seggev's user avatar
  • 14.2k
7 votes
Accepted

Export Table with URL as HTML?

This is what it looks like for me when I try to export the grid as HTML: These are just the first couple of errors. It goes on like that. On the other hand, ...
C. E.'s user avatar
  • 71k
7 votes

Are there any good tutorials on Boxes?

Converting a comment to an answer for the record: I am not aware of a better (?any at all) tutorial than Jason's Typesetting Workshop. I am not counting documentation. Otherwise you can learn a lot ...
7 votes

How to typeset a key combination in Mathematica notebook?

The specific boxes you ask for are: ...
Sjoerd Smit's user avatar
  • 24.3k
6 votes
Accepted

Why doesn't defined MakeBoxes display what is constructed in RHS?

Interesting question. Building on comments by glS It appears that HoldForm is treated specially by (conversion to) ...
Mr.Wizard's user avatar
  • 273k
6 votes
Accepted

How to make TeXForm use TemplateBox to generate code?

The internal function used by TeXForm to process boxes is System`Convert`CommonDump`ExpandTemplateBoxes. This function is ...
Carl Woll's user avatar
  • 131k
6 votes
Accepted

How to display fractional expression like this?

In this particular case it is sufficient to add a custom formatting rule: ...
Alexey Popkov's user avatar
6 votes

Make a custom object look like MatrixForm of a matrix?

InterpretationBox used in answer by J.M. and by Kuba allows you to copy formatted object and keep its proper interpretation as an ...
jkuczm's user avatar
  • 15.1k
6 votes
Accepted

How to recover these TemplateBox into normal form?

If you want to edit the box expressions, there're already some similar questions on MSE, such as 47213, 13317. Solution 1 However, the direct use of ...
rnotlnglgq's user avatar
  • 3,750
6 votes

What is box-structure in Mathematica? Why can a function be left-value?

Assigning values to symbols or expressions follows conventinal rules of programming laguages. Plus[x,y]=1 is simply not allowed, because it changes the definition ...
Roland F's user avatar
  • 4,226
6 votes
Accepted

Converting WolframAlpha Output to Markdown

An easiest way is to make use: Pod ComputableData - see how HERE MathJax in markdown So getting the data from ...
Vitaliy Kaurov's user avatar
5 votes
Accepted

MakeExpression can't deal with FE boxes riffled with whitespaces

Tracing the evaluation with Trace[ToExpression[boxes], TraceInternal -> True] reveals that ToExpression calls ...
Alexey Popkov's user avatar
5 votes
Accepted

How to make some RowBox to be string

How can I get the unchanged Box form of an arbitrary expression? toBoxes = MathLink`CallFrontEnd[ FrontEnd`UndocumentedTestFEParserPacket[#, True] ][[1]] & ...
Kuba's user avatar
  • 137k
5 votes
Accepted

To TagSet or not to TagSet when using MakeBoxes

Generally speaking, that TagSetDelayed form is preferable, as the rule is attached to the myfuncF rather than to ...
Itai Seggev's user avatar
  • 14.2k
5 votes
Accepted

Dynamically updated AccountingForm

A workaround: Define a function that is identical to AccountingForm (with the options specified) and use it as the first argument in ...
kglr's user avatar
  • 399k
5 votes

Make a custom object look like MatrixForm of a matrix?

Something to start with: ...
J. M.'s missing motivation's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible