Convert sqrt Function Text format to Latex Format

jospercomp shared this question 8 months ago
Answered

How to convert sqrt Function Text format to Latex Text Format by doing replace.


"sqrt(a)" => "\sqrt{a}"

"sqrt(11)"=>"\sqrt{11}"


"bsqrt(a)" => "b\sqrt{a}"

15sqrt(2) => "15\sqrt{a}"

Best Answer
photo

or use the new command replaceall() over first text

Comments (4)

photo
1

FormulaText(sqrt(11), false)
FormulaText(sqrt(a), false)

photo
1

or use the new command replaceall() over first text

photo
1

Sequence("\sqrt{" + (i) + "}=" + (ReplaceAll(SurdText(sqrt(i)), "sqrt", "\sqrt")), i, 1, 100, 1)

photo
© 2021 International GeoGebra Institute