# Copy-Paste simple converted Latex formulas into CAS

Hello,

In the Finnish Matriculation Exam Geogebra can be used for solving mathematical problems. Geogebra and some other tools are included in a closed (secure) Linux environment running in the students PC which is booted from a USB memory stick.

There is also a Latex editor included in that system that can be used to write formulas in the so called answer-box. However, currently there is no way to import the formulas into Geogebra CAS. Thus they need to be imported by hand by rewriting them in the Geogebra CAS-window. This is tedious and error-prone.

A demo-version of the Latex-editor is here: https://math-demo.abitti.fi/

(in the window the text ”Lisää kaava” means ”Insert a new Formula”. It becomes visible by clicking in the ”Vastaus”-box i.e. the ”Answer”-box).

So my proposal would be to develop a simple Latex-formula paste-function in the Geogebra, which could be used to paste and convert simple Latex-formulas in the CAS -window into a format understood by Geogebra.

For example the following formula:

would currently look like the follwing when copy-pasted into Geogebra CAS from the Latex answer-box (or from the Geogebra graphic-window Latex):

E_1 - R_1 \; I_1 - E_3 - R_3 \; I_3 = 0

Thus only a simple conversion would be needed to replace the ”space” codes ”\;” with a space-character.

Similarly the following formula:

would look like the following in Latex

I_5 = \frac{E_1 \; R_2 + E_1 \; R_3 - E_2 \; R_3 - E_3 \; R_2}{R_1 \; R_2 + R_1 \; R_3 + R_2 \; R_3}

So the conversion would in this case need to additionally remove the ”\frac” and insert the division symbol ”/” between the curly braces. This looks like a simple task.

Thus by keeping the Latex-support in the new Geogebra Latex paste-command simple, the needed implementation work would probably be fairly simple, too. This would however cover many real-life cases and would make the working in the Finnish Matriculation exam less tedious and less error prone.

In addition to these two cases, support for the following would be important:

Geogebra already supports Latex in the graphic-window. Thus, instead of generating the output for the graphic-window, it would need to add a converted text-output suitable for the CAS-window.- parenthesis, e.g ”\left(a+b\right)” for (a+b) and ”\left[a+b\right]” for [a+b]

- relations, e.g. ”\le” for <= and ”\ge” for >=

- multiplication ”\cdot”

- ”\sqrt{ }”

-”\sqrt[]{}”

- functions ”\sin”, ”\cos”, ”\tan”, ”\log”, ”\ln", etc.

- absolute value like ”\left|x\right|” for abs(x) or |x|

- Greek letters e.g ”\alpha”, ”\beta”, ”\Omega”, ”\pi”, etc.

this help?

https://help.geogebra.org/t...

can you do a javascript for importing?

That already works in GeoGebra 6 https://www.geogebra.org/cl...

I think it's unlikely we'll add that to GeoGebra 5

Hi Michael,

Thanks for the info.

For GeoGebra 5 users I tried a workaround having both versions (5 and 6) running and copying the Latex formula first into version 6 and from there into version 5 CAS. That seemed to be working. A bit cumbersome solution, but it seems to be working.

From my list some formulas didn't seem to work properly, namely:

- multiplication ”\cdot”

- Capital Greek letters like ”\Omega”

- absolute value like ”\left|x\right|” for abs(x) or |x|

-”\sqrt[]{}”

Of these, the two first ones are the most annoying omissions. The Greek Omega is used frequently in Physiscs, especially in Electronics (as for Resistance values). The multiplication omission is also strange since that is one of the most used ones.

I made a problem report for GeoGebra 6 about the above mentioned cases plus another one

https://help.geogebra.org/t...

Do you teach LaTeX to your students in your physics classes?

Would it be easier to write the equations in CAS and paste LaTeX to Abittieditori than to work the other way round?

M

Do you teach LaTeX to your students in your physics classes?

Would it be easier to write the equations in CAS and paste LaTeX to Abittieditori than to work the other way round?

Still I understand your point, it would be nice to have programs to be able to use copy-paste the way users would like it work.

M

Some improvements coming in v593

Loading...Comments have been locked on this page!