Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I want to print the expression $A[x] = 8020.6596 \times 1.055^x$ as is on a 2D graphic. I included the line

Graphics[Text[HoldForm[A[x] = 8020.6596 \[Times] 1.055^x],{2,0}]]

in the graphics call, but the first constant insists on printing as $8020.66$. How can I fix this problem?

share|improve this question
add comment

2 Answers 2

Using NumberForm:

Graphics[{Inset[A[x] = NumberForm[8020.6596, 10]*1.055^x, {0, 0}]}]
share|improve this answer
    
This works, but you can't really use it along with, say, HoldForm. So if for example I wanted to output $x^{1/3} + 8020.6596\times 1.055^x$, I can't enclose the whole thing inside a HoldForm and still put the number inside a NumberForm. Why does this have to be so difficult, he whined? –  rogerl Dec 19 '13 at 22:54
add comment

You can use strings for such things. You can use fractional spaces to adjust spacing, style text using the Format menu, etc. This does't copy here very well but it is simple in a Notebook:

enter image description here

enter image description here

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.