| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • Finally, you can manage your Google Docs, uploads, and email attachments (plus Dropbox and Slack files) in one convenient place. Claim a free account, and in less than 2 minutes, Dokkio (from the makers of PBworks) can automatically organize your content for you.

View
 

LaTex with GeoGebra

Page history last edited by Russell Blyth 9 years, 11 months ago

LaTex with GeoGebra - I

 

In a previous document we looked at exporting graphics from GeoGebra as PNG files that can easily be imported into Word. We now want to look at exporting graphics from GeoGebra so that they can easily be imported into LaTex.

 

We start with a nice graphical image we would like to export.

 

From the "File" menu, we select "Export" and then "Graphics view as PGF/Tikz".

 

This brings up a dialog box. Select the button to generate the code, then the button to save the code.

 

 

 

We now have LaTex code that you can use in your favorite TeX engine.

 

We want to make some modifications to the TeX code. From the top:

We added the fullpage package to reduce margins to a more standard inch on each side.

We added some text before the picture so we can see it in the context of a page.

We enclosed the tikzpicture in an \fbox to see a box around the graphics.

We enclosed the boxed picture in a \centerline construction to center it.

We closed the \fbox and \centerline.

We added some text below the graphic.

 

 

We then run the TeX engine to see the picture in a LaTeX document.

 

More advanced issues:

  • The text enclosed in square brackets after \begin{tikzpicture} is an option list. We can use the scale option to change the size of the graphic. Using scale=.5 cuts the picture in half. Using scale=2 doubles the size.

  • Scaling the graphic does not change the text size in the graphic.

  • In this example, we did not select the option to use gnuplot to graph functions. To use that option you need to have gnuplot installed in your system in a way that your TeX engine can find.

  • The alternative to gnuplot uses a sampling technique that may overflow with many functions or with complicated functions.

 

© 2011, Mike May, S.J., Saint Louis University

 

Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 license, Mike May, S.J. maymk@slu.edu

 

Comments (0)

You don't have permission to comment on this page.