Andato avanti sui socket TCP, il resto cambiamenti minimi.
[gapil.git] / macro.tex
1 %
2 % Defining some commands to manipulate counter to avoid ude of 
3 % \label and \ref commands (and related problem to remeber the 
4 % used labels) to refer nearest objects
5 %
6 %
7 \newcounter{usercount}       % define a new counter for internal use
8 %
9 % Figure commands
10 %
11 \newcommand{\curfig}{fig.~\thefigure}
12 \newcommand{\nfig}{%
13 \setcounter{usercount}{\value{figure}}%
14 \addtocounter{usercount}{1}%
15 fig.~\thechapter.\theusercount}
16 \newcommand{\pfig}{%
17 \setcounter{usercount}{\value{figure}}%
18 \addtocounter{usercount}{-1}%
19 fig.~\thechapter.\theusercount}
20 %
21 % Tables commands
22 %
23 \newcommand{\curtab}{tab.~\thetable}
24 \newcommand{\ntab}{%
25 \setcounter{usercount}{\value{table}}%
26 \addtocounter{usercount}{1}%
27 tab.~\thechapter.\theusercount}
28 \newcommand{\ptab}{%
29 \setcounter{usercount}{\value{table}}%
30 \addtocounter{usercount}{-1}%
31 tab.~\thechapter.\theusercount}
32 %
33 % equations commands
34 %
35 \newcommand{\cureq}{(\theequation)}
36 \newcommand{\nxeq}{%
37 \setcounter{usercount}{\value{equation}}%
38 \addtocounter{usercount}{1}%
39 (\thechapter.\theusercount)}
40 \newcommand{\preeq}{%
41 \setcounter{usercount}{\value{equation}}%
42 \addtocounter{usercount}{-1}%
43 (\thechapter.\theusercount)}
44 %
45 % Macro to put picture (in format PICT) inside a figure
46 %
47 \newcommand{\pictfig}[3]{
48         \begin{minipage}[t][#1][b]{#2}
49         \mbox{\special{pict=#3}}
50 %    \vspace{3cm}
51     \end{minipage}
52 }
53 %
54 %
55
56