Message Boards Message Boards

TwoString: Using ToString for Interpreter["TexExpression"][string]

Posted 6 years ago

ToString is a routine in Mathematica, that has default FormatType -> OutputForm and that has no attribute HoldFirst. For applications for the Interpreter for TEX it makes more sense to have attribute HoldFirst. When this is used, then other forms may get HoldForm in the output string. It is easy to remove the latter again for InputForm. Since this works fine, it makes sense to make the latter the new default. Since ToString is such a core routine, this new functionality can better be provided by a new routine TwoString that builds around ToString. Alternative names are TooString or MakeString. It is suggested to the makers of Mathematica that ToString is adapted with options HoldFirst -> True and HoldForm -> False for this particular use just like TwoString (with default InputForm and the removal of HoldForm from the output string). It would be useful to have some TeXString[expr] object with HoldFirst such that expr would be readable by a TEX interpreter. PM. I regard all of this as a minor issue, but it just crossed my path.

https://www.wolframcloud.com/objects/thomas-cool/Utilities/2018-04-05-TwoString.nb

Attachments:
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract