CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

| Download

GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it

Views: 418346
1
2
5 The IntPic package options.
3
4
5
5.1 Available options
6
7
The list of allowed options, some of which already familiar from the
8
examples, can be obtained as follows:
9
10
 Example 
11
gap> RecNames(IP_TikzDefaultOptionsForArraysOfIntegers);
12
[ "other", "colors", "highlights", "shape_only", "colsep", "rowsep", 
13
 "cell_width", "allow_adjust_cell_width", "scale", "inner_sep", 
14
 "line_width", "line_color" ]
15

16
17
Its meaning is as follows:
18
19
 colors: any list of colors (to be used with the LaTeX package xcolor)
20
21
 highlights: a list of lists of integers -- the elements of the first
22
are colored by using the first color, etc. In cases of elements that
23
appear in more than one list a kind of gradient (made with 4 colors at
24
most) is used to fill the cell; the number may be printed with a fifth
25
color and a sixt color may be used for the border.
26
27
 shape_only: an option to be used when only the shape is important.
28
When true or " " is used, all the nodes are empty; using a symbol, for
29
instance a *, this symbol is printed in all the nodes.
30
31
 colsep: the tikz matrix option column sep
32
33
 rowsep: the tikz matrix option row sep
34
35
 cell_width: the tikz matrix option minimum width
36
37
 scale: the tikz matrix option scale
38
39
 inner_sep: the tikz matrix option inner sep
40
41
 line_width: the tikz matrix option line width
42
43
 line_color: the tikz matrix option line color: the color of the cell
44
borders
45
46
 allow_adjust_cell_width: the number of points per digit (to avoid
47
discrepancies between the width of the cells when there are numbers
48
with different number of digits to be printed). When the user sets the
49
option cell_width, then allow_adjust_cell_width is automatically set
50
to false
51
52
 other: if non empty, the complete tikz code has to be written (it may
53
be useful when several images are to be produced - otherwise, changing
54
the tikz code would be enough)
55
56
  Example 
57
other := ["\\draw[postaction={draw,line width=1pt,red}] (-80pt,-8pt) 
58
rectangle (16pt,40pt);","\\draw[postaction={draw,line width=1pt,blue}] 
59
(-16pt,8pt) rectangle (80pt,-40pt);"]
60

61
62
Adding this option to one of the preceding examples, one obtains the
63
following:
64
65
66
5.2 Default options
67
68
The defaults for the available options are as follows
69
70
 colors: ShuffledIP_colors
71
72
 highlights: [[]]
73
74
 shape_only : "false"
75
76
 colsep: "2"
77
78
 rowsep: "2"
79
80
 cell_width: "30"
81
82
 scale: "1"
83
84
 inner_sep: "3"
85
86
 line_width: "0"
87
88
 line_color: "black"
89
90
 allow_adjust_cell_width: "10"
91
92
 other: []
93
94
They may be consulted:
95
96
 Example 
97
gap> IP_TikzDefaultOptionsForArraysOfIntegers;
98
rec( allow_adjust_cell_width := "10", cell_width := "30", 
99
 colors := [ "red", "green", "blue", "-red", "-green", "-blue", "black!80", 
100
 "black!30", "red!50", "green!50", "blue!50", "-red!50", "-green!50", 
101
 "-blue!50", "black!70", "black!25", "red!20", "green!20", "blue!20", 
102
 "-red!20", "-green!20", "-blue!20", "black!60", "black!20", 
103
 "red!80!green!50", "green!80!red!50", "blue!80!red!50", 
104
 "-red!80!green!50", "-green!80!red!50", "-blue!80!red!50", "black!50", 
105
 "black!15", "red!80!blue!60", "green!80!blue!60", "blue!80!green!60", 
106
 "-red!80!blue!60", "-green!80!blue!60", "-blue!80!green!60", 
107
 "black!40", "black!10" ], colsep := "2", highlights := [ [ ] ], 
108
 inner_sep := "3", line_color := "black", line_width := "1", other := [ ], 
109
 rowsep := "2", scale := "1", shape_only := "false" )
110

111
 
112

113
114
The user may want to change the defaults by editing the file options.gd in
115
the folder gap. The changes are lost whenever any re-installation occurs. It
116
is recommended that in this case a copy is made, although it is not
117
guaranteed that it will work in the next release.
118
119
120