Inline display formatted strings #1820
Answered
by
ctrekker
nandoconde
asked this question in
Questions about using Pluto
-
|
Hello! Is there any way to display formatted strings (with md"This is my variable with limited decimals: $(Print(@sprintf "%5.4f" BigFloat("6.666666666666666")))" |
Beta Was this translation helpful? Give feedback.
Answered by
ctrekker
Jan 12, 2022
Replies: 1 comment 1 reply
-
|
Hi nandoconde! I would suggest two changes:
These two changes ended up producing the desired result for me. md"""This is my variable with limited decimals: $(@sprintf "%5.4f" BigFloat("6.666666666666666"))""" |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
nandoconde
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi nandoconde!
I would suggest two changes:
@sprintfis resolved into a string already, thePrint()call around it can be removedThese two changes ended up producing the desired result for me.
md"""This is my variable with limited decimals: $(@sprintf "%5.4f" BigFloat("6.666666666666666"))"""