X-Git-Url: https://gapil.gnulinux.it/gitweb/?p=gapil.git;a=blobdiff_plain;f=macro.tex;fp=macro.tex;h=7375bebe6d59ec58b5eff3a7a2342b46a1de9c4c;hp=0000000000000000000000000000000000000000;hb=3d44c36183fe67ed64bff95a36596ad87f620683;hpb=d05c744fc23f1ba7ec85c8268abdc8ee8426d950 diff --git a/macro.tex b/macro.tex new file mode 100644 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} +} +% +%