This commit was manufactured by cvs2svn to create branch 'start'.
[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 
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 %
46 % Macro to put picture (in format PICT) inside a figure
47 %
48 \newcommand{\pictfig}[3]{
49         \begin{minipage}[t][#1][b]{#2}
50         \mbox{\special{pict=#3}}
51 %    \vspace{3cm}
52     \end{minipage}
53 }
54 %
55 %