Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
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
Project: cocalc-sagemath-dev-slelievre
Views: 418346<?xml version="1.0" encoding="UTF-8"?>12<Chapter Label="intro">3<Heading>4The <Package>IntPic</Package> package5</Heading>6<!-- <Index>&IntPic; - Overview</Index>-->7<Section>8<Heading>Overview and Introduction</Heading>9The &IntPic; package has as its main goal producing <C>Tikz</C> 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.10<!-- When used in conjunction with the package <Package>IntPic</Package> <Cite Key="DelgadoEgri-NagyMitchellPfeiffer2012-Viz"></Cite>, &IntPic; provides an immediate visualization.-->11<P />12&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 <Alt Not='Text'><URL13Text='NumericalSgps'>http://www.fc.up.pt/cmup/mdelgado/numericalsgps</URL></Alt><Alt Only='Text'><Package>NumericalSgps</Package></Alt> package <Cite Key="DelgadoGarcia-SanchezMorais:numericalsgps"></Cite>. Effort has then been made to serve a slightly more general purpose.14For 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 following15<P />1617<Alt Only="LaTeX">18\begin{center}19\includegraphics[width=0.95\textwidth]{../images/primesandtwins}20\end{center}21</Alt>22<Alt Only="HTML">23<br><center><img src="../images/primesandtwins.jpg"></center><br>24</Alt>2526It 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.27<P />28This package contains relatively few lines of code. The heavier part is the documentation, where many examples are presented.29<P />30The design of this greatly benefits from my long experience on producing visualization tools for &GAP; objects. The package <Package>sgpviz</Package> <Cite Key="DelgadoMorais:sgpviz"></Cite> is the visible part. More recently, I got involved in a more general project, the <Package>Viz</Package> package <Cite Key="DelgadoEgri-NagyMitchellPfeiffer2012-Viz"></Cite>.31The 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 <Package>Viz</Package> package is recommended since in this case an immediate visualization is provided.32<P />33The package produces <C>tikz</C> 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 <Package>Viz</Package> 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.3435In order to produce the drawings, &LaTeX;, as well as some &LaTeX; packages, in particular <C>tikz</C> and <C>pgf</C>, must be installed and working. I will assume that this is the case.3637All the images in <Cite Key="fengraoab"></Cite> have been produced by using the &IntPic; package.38<P />39This 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 <F>examples.g</F> contains the &GAP; code, including the one to save the <C>tikz</C> code, to produce the examples in the manual.4041</Section>4243<!-- ######################################## -->44<Section Label="install">45<Heading>46Installing <Package>IntPic</Package>47</Heading>48In 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 <Email>[email protected]</Email>.49<P/>50It 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 page51<Alt Only="LaTeX">\noindent\vspace{\baselineskip}</Alt>52<URL>http://www.gap-system.org</URL>.53<P/>5455<Alt Only="LaTeX">\noindent</Alt>56If the &IntPic; package was obtained as a part of the &GAP; distribution from the <Q>Download</Q> section of the &GAP; website, you may proceed to Section <Ref Sect="loading"/>. 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 <Ref Sect="GAP Root Directories" BookName="ref"/>).57<P/>5859Below we describe the installation procedure for the <File>.tar.gz</File> archive format, which can be obtained from <URL>http://cmup.fc.up.pt/cmup/mdelgado/intpic/</URL>. Installation using other archive formats or non UNIX-like systems is performed in a similar way.60<P/>6162To install the &IntPic; package, unpack the archive file, which should have a name of the form63<C>64intpic-<A>XXX</A>.tar.gz65</C>66for some version number67<A>XXX</A>, by typing68<P/>69 70<C>71gzip -dc intpic-<A>XXX</A>.tar.gz | tar xpv72</C>73<P/>7475It may be unpacked in one of the following locations:76<List>77<Item>78in the <File>pkg</File> directory of your &GAP; installation;79</Item>80<Item>81or in a directory named <File>.gap/pkg</File> in your home directory (to be added to the &GAP; root directory unless &GAP; is started with <C>-r</C> option);82</Item>8384<Item>85or in a directory named <File>pkg</File> in another directory of your choice (e.g. in the directory <File>mygap</File> in your home directory).86</Item>87</List>8889In the latter case one must start &GAP; with the <C>-l</C> option, e.g. if your private <F>pkg</F> directory is a subdirectory of <F>mygap</F> in your home directory you might type:90<P/>91 92<C>93gap -l "<A>;myhomedir</A>/mygap"94</C>95<P/>96<Alt Only="LaTeX">\noindent</Alt>97where <A>myhomedir</A> 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).98</Section>99100<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->101102103<Section Label="loading">104<Heading>105Loading <Package>IntPic</Package>106</Heading>107108To use the &IntPic; Package you have to request it explicitly. This is done by calling <Ref Func="LoadPackage" BookName="ref"/>:109<P/>110<Example><![CDATA[111gap> LoadPackage("intpic");112]]></Example>113<P/>114The package banner, followed by <C>true</C>, will be shown, if the load has been successful.115<P/>116If you want to load the &IntPic; package by default, you can put the <C>LoadPackage</C> command into your <F>gaprc</F> file117(see Section <Ref Sect="The gap.ini and gaprc files" BookName="ref"/>).118119</Section>120</Chapter>121122123