The IntPic package
Overview and Introduction The &IntPic; package has as its main goal producing Tikz code for arrays of integers to be included in a &LaTeX; file, which can then be processed. Some of the integers are emphasized, by using different colors for the cells.

&IntPic; grew up from my will to have a pictorial view of some sets of integers. I wanted, in particular, get a pictorial view of the results produced by the http://www.fc.up.pt/cmup/mdelgado/numericalsgps NumericalSgps package . Effort has then been made to serve a slightly more general purpose. For instance, if the user wants to have a pictorial idea of how many primes there are between 800 and 1000, or show it to his students and, perhaps, which among these primes are twin primes, he will probably be happy by producing a picture like the following

\begin{center} \includegraphics[width=0.95\textwidth]{../images/primesandtwins} \end{center} <br><center><img src="../images/primesandtwins.jpg"></center><br> It has clearly too much information, given through the different colors. The twin primes in the given range are in red-blue, while the remaining primes in the same range are in red.

This package contains relatively few lines of code. The heavier part is the documentation, where many examples are presented.

The design of this greatly benefits from my long experience on producing visualization tools for &GAP; objects. The package sgpviz is the visible part. More recently, I got involved in a more general project, the Viz package . The experience gained there, especially through long and fruitful discussions with J. Mitchell, influenced me a lot. This package will probably be part of that more general project. For the moment it is independent, but its use in conjunction with the Viz package is recommended since in this case an immediate visualization is provided.

The package produces tikz code that the user may then use at his wish. In particular, he can use it in publications. But prior to obtaining results that lead to a publication, the user may benefit of viewing thousands of images. There is a (almost platform independent) function in Viz that is intended to make this task easy. It benefits from the &GAP; stuff on creating a temporary directory where the computations occur. The cleaning task is also left to &GAP;, which leaves the user free of the need of collecting the garbage. In order to produce the drawings, &LaTeX;, as well as some &LaTeX; packages, in particular tikz and pgf, must be installed and working. I will assume that this is the case. All the images in have been produced by using the &IntPic; package.

This package consists basically of a function with many options associated. The purpose of the manual is to illustrate the use of the options. Many examples are presented. A file, named examples.g contains the &GAP; code, including the one to save the tikz code, to produce the examples in the manual.
Installing IntPic In this section we give a brief description of how to start using &IntPic;. If you have any problems getting &IntPic; working, then you could try emailing me at mdelgado@fc.up.pt.

It is assumed that you have a working copy of &GAP; with version number 4.5 or higher. The most up-to-date version of &GAP; and instructions on how to install it can be obtained from the main &GAP; web page \noindent\vspace{\baselineskip} http://www.gap-system.org.

\noindent If the &IntPic; package was obtained as a part of the &GAP; distribution from the Download section of the &GAP; website, you may proceed to Section . Alternatively, the &IntPic; package may be installed using a separate archive, for example, for an update or an installation in a non-default location (see ).

Below we describe the installation procedure for the .tar.gz archive format, which can be obtained from http://cmup.fc.up.pt/cmup/mdelgado/intpic/. Installation using other archive formats or non UNIX-like systems is performed in a similar way.

To install the &IntPic; package, unpack the archive file, which should have a name of the form intpic-XXX.tar.gz for some version number XXX, by typing

gzip -dc intpic-XXX.tar.gz | tar xpv

It may be unpacked in one of the following locations: in the pkg directory of your &GAP; installation; or in a directory named .gap/pkg in your home directory (to be added to the &GAP; root directory unless &GAP; is started with -r option); or in a directory named pkg in another directory of your choice (e.g. in the directory mygap in your home directory). In the latter case one must start &GAP; with the -l option, e.g. if your private pkg directory is a subdirectory of mygap in your home directory you might type:

gap -l ";myhomedir/mygap"

\noindent where myhomedir is the path to your home directory, which may be replaced by a tilde (the empty path before the semicolon is filled in by the default path of the &GAP; home directory).
Loading IntPic To use the &IntPic; Package you have to request it explicitly. This is done by calling :

gap> LoadPackage("intpic");

The package banner, followed by true, will be shown, if the load has been successful.

If you want to load the &IntPic; package by default, you can put the LoadPackage command into your gaprc file (see Section ).