# Keeping Stretching Brackets/Braces/Parenthesis in A String

Hopefully a simple one...Does anyone know how to preserve "bracket stretching" in a string. For instance, if I copy a formula and use it as a plot label or in any string the brackets revert back to (...) and don't keep the stretched appearance they have when used as an input.

Thanks!

So people can see what I am seeing: So when I input my formula as a Mathematica input to be actually used for calculation and plotting:

If I take the same formula in a string, using TraditionalForm[...]

As can be seen the parenthesis are not stretched around the formula as they should be.

• Diid you try TraditionalForm? – Alexei Boulbitch Jul 8 '16 at 12:02
• @AlexeiBoulbitch Unfortunately this does not work :( – QuantumPenguin Jul 8 '16 at 12:49
• What does not work? Please publish your code and, may be, an image of what do you have and what are you after. – Alexei Boulbitch Jul 8 '16 at 13:06
• TraditionalForm does not change a String, remove the quotation marks around the expression within the Print. – Bob Hanlon Jul 8 '16 at 14:26
• Alternatively, convert to TraditionalForm prior to converting to String, i.e., Print[expr // TraditionalForm // ToString] – Bob Hanlon Jul 8 '16 at 14:40

Your code contains numerous syntax errors. The first formula has no sense in Mma. I tried to rewrite its part that seems reasonable:

expr = 10*
Log[10, Re[(1/Subscript[R, p] + 1/(2 \[Nu]*\[Pi]*L*I) +
2 \[Pi]*\[Nu]*Subscript[C, p]*I)^-1]] + Subscript[P, 0];


Then you may do the following:

TraditionalForm[expr]


There are also multiple other ways to represent a formula in Mma, and give it the desired form. However, your explanation does not show, what is precisely your need. Anyway, Print is the last way I would use for this purpose.

Have fun!

• Thanks, for the input. I don't understand what you mean by syntax errors. The code compiles and behave as it should. If there were syntax errors it would not compile, if you are referring to the double-stamp R and i, then yes these are usually Re[..] and I in mathematica but I changed it for the purposes of being used in a label. Thanks for the help. – QuantumPenguin Jul 8 '16 at 15:01
• There are two left square brackets and three right ones. Further, in your expression {P0} and nu have no sense. This I mean by syntax errors. – Alexei Boulbitch Jul 11 '16 at 7:38