Latex Text Labels

Dave Yrueta shared this question 7 months ago
Answered

Hi --

I'd like to define a some text using latex, and then use SetCaption to attach the text to an object. I'm finding that the displayed caption is showing the literal latex markup and not the rendered text.

Example: t1 = \Delta x, and k = Segment(A, B)

SetCaption(k, t1) renders "\Delta x" under object k, and not the rendered version of \Delta x. Is there any way around this?

Thanks!

Comments (2)

photo
1

Try

SetCaption(k, "$" + t1 + "$")

photo
1

Great, thank you!

© 2021 International GeoGebra Institute