Export to TikZ from cloud/online Geogebra

Bryce Davis shared this question 4 years ago
Answered

Is there away to convert GGB files to LateX code without downloading a software download?

Comments (13)

photo
1

Not officially. You can try this test-code in the browser's console though:


  1. ggbApplet.exportPGF()


You might need to adjust the "ggbApplet", eg

https://www.geogebra.org/m/RHYH3UQ8

  1. ggbApplet1300.exportPGF()

photo
2

Hi, so I've tried this thing that I love !

photo
1

Now that is a good idea!


Try this to copy to clipboard:


  1. var text = ggbApplet.exportPGF()
  2. var textField = document.createElement('textarea');
  3. textField.innerText = text;
  4. document.body.appendChild(textField);
  5. textField.select();
  6. document.execCommand('copy');
  7. textField.remove();

photo
1

Hi, checked with 5.0.311.0 webapp on a linux 64bit computer. The paste (Ctr+V) of the copy to the clipboard to Texmaker and its compilation with divps+ps2pdf work very fine, even for the only surface selected with the right click.

photo
photo
1

Is there a way to open this file in GeoGebra desktop and use it there? When I do, it says it cannot find the function exportPGF along with the ggb file. Should I be making a different download choice?

photo
1

It will work in desktop in the new version (5.0.313.0)


Also try this in Internet Explorer 11:

https://www.geogebra.org/m/yxWQfHc2

photo
1

I apologize for disturbing you. At the moment I have on my computer 5.0.604.0 desctop version of geogebra. Does it have this option?

is there some version of desktop geogebra that has this?


sry for my eng, its google translated

photo
1

* Open https://www.geogebra.org/m/RHYH3UQ8

* Press F12

* Copy and paste this

ggbApplet226405.copyTextToClipboard(ggbApplet226405.exportPGF())

photo
1

tried this.


get

Uncaught ReferenceError: ggbApplet226405 is not definedat

<anonymous>:1:1


in 85.0.4183.121 64x version google chrome


and


Uncaught ReferenceError: ggbApplet226405 is not defined


<anonymous> debugger eval code:1


in Mozilla Firefox 80.0.1

photo
1

also i tried invoke ggbApplet.exportPGF and ggbApplet.exportPGF()

on https://www.geogebra.org/classic

and get undefined return value

photo
2

Sorry, try


ggbApplet.exportPGF(function(a){console.log(a)})


(undocumented, may change to not use a callback in the future)

photo
1

okay, now its work, thanks.

photo
2

What are the prospects for this command? How long do you plan to keep it working?

photo
© 2021 International GeoGebra Institute