Initial revision
[gapil.git] / macro.tex
diff --git a/macro.tex b/macro.tex
new file mode 100644 (file)
index 0000000..7375beb
--- /dev/null
+++ b/macro.tex
@@ -0,0 +1,55 @@
+%
+% Defining some commands to manipulate counter to avoid ude of 
+% \label and \ref commands (and related problem to remeber the 
+% used labels 
+%
+%
+\newcounter{usercount}       % define a new counter for internal use
+%
+% Figure commands
+%
+\newcommand{\curfig}{fig.~\thefigure}
+\newcommand{\nfig}{%
+\setcounter{usercount}{\value{figure}}%
+\addtocounter{usercount}{1}%
+fig.~\thechapter.\theusercount}
+\newcommand{\pfig}{%
+\setcounter{usercount}{\value{figure}}%
+\addtocounter{usercount}{-1}%
+fig.~\thechapter.\theusercount}
+%
+% Tables commands
+%
+\newcommand{\curtab}{tab.~\thetable}
+\newcommand{\ntab}{%
+\setcounter{usercount}{\value{table}}%
+\addtocounter{usercount}{1}%
+tab.~\thechapter.\theusercount}
+\newcommand{\ptab}{%
+\setcounter{usercount}{\value{table}}%
+\addtocounter{usercount}{-1}%
+tab.~\thechapter.\theusercount}
+%
+% equations commands
+%
+\newcommand{\cureq}{(\theequation)}
+\newcommand{\nxeq}{%
+\setcounter{usercount}{\value{equation}}%
+\addtocounter{usercount}{1}%
+(\thechapter.\theusercount)}
+\newcommand{\preeq}{%
+\setcounter{usercount}{\value{equation}}%
+\addtocounter{usercount}{-1}%
+(\thechapter.\theusercount)}
+
+%
+% Macro to put picture (in format PICT) inside a figure
+%
+\newcommand{\pictfig}[3]{
+        \begin{minipage}[t][#1][b]{#2}
+        \mbox{\special{pict=#3}}
+%    \vspace{3cm}
+    \end{minipage}
+}
+%
+%