Changes to previous version:
new subtags <bgColor>, <axesColor>, <gridColor>, <lineStyle>, <axis>, <grid> in <euclidianView>
new attribute yscale in tag <coordSystem>
new attribute pointStyle in tag <evSettings>
new attribute number in tag <startPoint> for images
new subtag <slider> in <element> for numbers and angles
new subtag <allowReflexAngle> in <element> for angles
new subtag <inBackground> in <element> for images
new subtag <file> in <element> for images
new subtag <worksheetText> in <construction>
This is a very short description of GeoGebra’s XML file format. It is used to store GeoGebra constructions in a text file called geogebra.xml. This file is compressed together with all images of the construction in a zip archive. The zip archive will usually be stored as a file with the filename extension .ggb (GeoGeBra file).
<?xml version="1.0" encoding="utf-8"?>
<geogebra format="2.5">
<gui>
...
</gui>
<euclidianView>
...
</euclidianView>
<kernel>
...
</kernel>
<construction>
...
</construction>
</geogebra>
<gui>
<show algebraView="true" auxiliaryObjects="true" />
<font size="12"/>
<splitDivider loc="250" locVertical="400", horizontal="true"/>
</gui>
<euclidianView>
...
</euclidianView>
coordSystem
<coordSystem xZero="215" yZero="345" scale="30.0" yscale="60.0" />
The attributes xZero and yZero give the screen position of the axes origin in pixel. The attributes scale and yscale give the length of one unit in pixel for the x-axis and y-axis.
evSettings
<evSettings axes="true" grid="false" pointCapturing="true" pointStyle="0"/>
The attribute pointStyle is an integer representing one of the following global point styles:
|
0 |
POINT_STYLE_DOT |
|
1 |
POINT_STYLE_CROSS |
bgColor, axesColor, gridColor
<bgColor
r="255" g="255" b="255"/>
<axesColor
r="10" g="10" b="10"/>
<gridColor
r="200" g="200" b="200"/>
bgColor:
background color of the euclidian view
axesColor: color of the
axes
gridColor: color of the coordinate grid
lineStyle
<lineStyle axes="1" grid="10"/>
where axes is out of
|
0 |
AXES_LINE_TYPE_FULL |
|
1 |
AXES_LINE_TYPE_ARROW |
and grid is out of
|
0 |
LINE_TYPE_FULL |
|
10 |
LINE_TYPE_DASHED_SHORT |
|
15 |
LINE_TYPE_DASHED_LONG |
|
20 |
LINE_TYPE_DOTTED |
|
30 |
LINE_TYPE_DASHED_DOTTED |
axis
<axis id="0" label="x" unitLabel="x" showNumbers="true" tickDistance="2"/>
where id is one of
|
0 |
xAxis |
|
1 |
yAxis |
and
tickDistance is optional. The
tickDistance is the distance between two numbers of an axis. If the
tickDistance is not set, it is calculated automatically.
grid
<grid distX="2.0" distY="4.0"/>
where distX and distY are the distances between the grid lines in x and y direction.
<kernel>
<decimals val="2"/>
<angleUnit val="degree"/>
</kernel>
where angleUnit is either degree or radiant.
A construction has three string attributes: title, author and date.
<construction title="Construction Title" author="Me" date="1.12.2003">
<worksheetText above="some text" below="some other text" />
<element type="point" label="P"> ... </element>
<command name="Intersect"> ... </command>
<expression label="T" exp="A + 1/2 (B-A)"/>
</construction>
An element has two attributes: type and label. The following types are valid: point, vector, line, segment, conic, numeric, angle, function.
<element type="line" label="a">
<show object="true" label="true"/>
<objColor r="0" g="0" b="255"/>
<lineStyle thickness="2" type="0"/>
<eqnStyle style="implicit"/>
<coords x="6.0" y="7.8" z="1.0"/>
<fixed val="false"/>
<auxiliary val="true"/>
</element>
Tags for types point, vector, line, segment, conic, function
<show object="true" label="true"/>
<objColor r="0" g="0" b="255" alpha="0.2"/>
<labelOffset x="10" y="5"/>
<trace val="true">
<animation step="0.1"/>
<labelMode val="0"/>
where val is an integer representing one of the following labeling styles:
|
0 |
NAME |
|
1 |
NAME_VALUE |
|
2 |
VALUE |
Tags for types vector, line, segment, conic, function
<lineStyle thickness="2" type="0"/>
where type is an integer representing one of the following dashing styles:
|
0 |
LINE_TYPE_FULL |
|
10 |
LINE_TYPE_DASHED_SHORT |
|
15 |
LINE_TYPE_DASHED_LONG |
|
20 |
LINE_TYPE_DOTTED |
|
30 |
LINE_TYPE_DASHED_DOTTED |
Tags for types line, conic
<eqnStyle style=" ... " parameter=" ... " />
For an element of type line attribute style may have values explicit, implicit or parametric. For parametric the second attribute parameter specifies the parameter's name.
For an element of type conic attribute style may have values implicit or specific.
Tags for types point, vector, line, segment
<coords x="6.0" y="7.8" z="1.0"/>
Tags for types point, vector
<coordStyle style=" ... "/>
where style has value cartesian or polar
Tags for types numeric, angle
<value val="3.0"/>
<slider min="-10.0" max="10.0" width="4.0" x="3.0" y="5.0" fixed="true" horizontal="true" />
where min and max are optional
Tags for type angle
<arcSize val="30"/>
<allowReflexAngle val="true"> states whether an angle is allowed to have a value between pi and 2pi.
Tags for type numeric
<slopeTriangleSize val="1"/>
Tags for type point
<pointSize val="3"/>
Tags for type vector, text, image
for relative startpoint
<startPoint exp="(A+B)/2"/>
or
<startPoint x="3" y="2" z="1"/>
label attribute deprecated since 2.4: <startPoint label="A"/>
For images three startPoints (corners) can be specified, hence the attribute number was added since 2.5:
<startPoint number="0" x="3" y="2" z="1"/>
where number is out of 1, 2 or 3 for the corner points A, B and D of a rectangular image.
Tags for type conic
<matrix A0="1.0" A1="1.0" A2="46.92" A3="0.0" A4="-6.0" A5="-4.6"/>
<eigenvectors x0="1.0" y0="0.0" z0="1.0" x1="-0.0" y1="1.0" z1="1.0"/>
Tags for type image
<file name="filename.png"/>
specifies the internal filename of the image. This name is used to store the image in the zip archive.
<inBackground val="true"/>
<command name="Intersect">
<input a0="ell" a1="hyp"/>
<output a0="K" a1="L" a2="" a3=""/>
</command>
<expression label="T" exp="A + 1/2 (B-A)" type="point"/>
The type attribute is optional an may have values point or vector.