<Chapter Label="options">
<Heading>
The <Package>IntPic</Package> package options.
</Heading>
<Section>
<Heading>Available options</Heading>
The list of allowed options, some of which already familiar from the examples, can be obtained as follows:
<Example><![CDATA[
gap> RecNames(IP_TikzDefaultOptionsForArraysOfIntegers);
[ "other", "colors", "highlights", "shape_only", "colsep", "rowsep", "cell_width", "allow_adjust_cell_width", "scale", "inner_sep", "line_width", "line_color" ]
]]></Example>
Its meaning is as follows:
<List>
<Item>
<A>colors</A>: any list of colors (to be used with the &LaTeX; package <Package>xcolor</Package>)
</Item>
<Item>
<A>highlights</A>: a list of lists of integers -- the elements of the first are colored by using the first color, etc. In cases of elements that appear in more than one list a kind of gradient (made with 4 colors at most) is used to fill the cell; the number may be printed with a fifth color and a sixt color may be used for the border.
</Item>
<Item>
<A>shape_only</A>: an option to be used when only the shape is important. When <A>true</A> or " " is used, all the nodes are empty; using a symbol, for instance a <M>*</M>, this symbol is printed in all the nodes.
</Item>
<Item>
<A>colsep</A>: the <Package>tikz</Package> matrix option <A>column sep</A>
</Item>
<Item>
<A>rowsep</A>: the <Package>tikz</Package> matrix option <A>row sep</A>
</Item>
<Item>
<A>cell_width</A>: the <Package>tikz</Package> matrix option <A>minimum width</A>
</Item>
<Item>
<A>scale</A>: the <Package>tikz</Package> matrix option <A>scale</A>
</Item>
<Item>
<A>inner_sep</A>: the <Package>tikz</Package> matrix option <A>inner sep</A>
</Item>
<Item>
<A>line_width</A>: the <Package>tikz</Package> matrix option <A>line width</A>
</Item>
<Item>
<A>line_color</A>: the <Package>tikz</Package> matrix option <A>line color</A>: the color of the cell borders
</Item>
<Item>
<A>allow_adjust_cell_width</A>: the number of points per digit (to avoid discrepancies between the width of the cells when there are numbers with different number of digits to be printed). When the user sets the option cell_width, then allow_adjust_cell_width is automatically set to <A>false</A>
</Item>
<Item>
<A>other</A>: if non empty, the complete <C>tikz</C> code has to be written (it may be useful when several images are to be produced - otherwise, changing the <C>tikz</C> code would be enough)
<Example><![CDATA[
other := ["\\draw[postaction={draw,line width=1pt,red}] (-80pt,-8pt)
rectangle (16pt,40pt);","\\draw[postaction={draw,line width=1pt,blue}]
(-16pt,8pt) rectangle (80pt,-40pt);"]]]>
</Item>
</List>
Adding this option to one of the preceding examples, one obtains the following:
<Alt Only="LaTeX">
\begin{center}
\includegraphics[width=0.80\textwidth]{../images/table_axis_ground_shape_other_option}
\end{center}
</Alt>
<Alt Only="HTML">
<br><center><img src="../images/table_axis_ground_shape_other_option.jpg"></center><br>
</Alt>
The user may want to change the defaults by editing the file <C>options.gd</C> in the folder <C>gap</C>. The changes are lost whenever any re-installation occurs. It is recommended that in this case a copy is made, although it is not guaranteed that it will work in the next release.
</Section>
<Section>
<Heading>Ilustrating the use of options</Heading>
The next example illustrates the use of the option <C>negatives</C>. The images produced are shown below.
<Example><![CDATA[
gap> rg := [-5..23];;
gap> len := 10;;
gap> hg := rec();;
gap> hg.highlights:=[[2,3,5,7],[11,13,17,19],[23]];;
gap> tkz := IP_TikzArrayOfIntegers(rg,len,hg);;
gap> Print(tkz);
gap> #IP_Splash(tkz);
gap> hg.negatives:=false;;
gap> tkz := IP_TikzArrayOfIntegers(rg,len,hg);;
gap> Print(tkz);
gap> # IP_Splash(tkz);
]]></Example>
<Alt Only="LaTeX">
\includegraphics[width=0.45\textwidth]{../images/table_with_negatives.pdf}
\hfill
\includegraphics[width=0.45\textwidth]{../images/table_without_negatives.pdf}
</Alt>
<Alt Only="HTML">
<br><center><img src="../images/table_with_negatives.jpg"></center><br>
<br><center><img src="../images/table_without_negatives.jpg"></center><br>
</Alt>
</Section>
</Chapter>
¤ Dauer der Verarbeitung: 0.11 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.