% figcommands                                              by Steve Mann, 1990
% commands file for simplifying use of PSfig, especially with multiple figures
% 
% new commands for figure widths and heights
\newlength{\figw}
\setlength{\figw}{6in}
\newlength{\figwlt}
\setlength{\figwlt}{5in} % something a little l.t. one page width
\newlength{\figwcol}  % for one column of an ASSP journal
\setlength{\figwcol}{3.25in}
\newlength{\figwlr}
\setlength{\figwlr}{3in}  % widths for 2 side by side figures
\newlength{\figwlrcol}
\setlength{\figwlrcol}{1.75in} % widths 2 side by side figures in one ASSP col
\newlength{\figh}
\setlength{\figh}{7in}
\newlength{\fighud}
\setlength{\fighud}{3.5in} % height for 2 fugures above on another
%        PATH  for  neuron@mcmaster and mcbuff@mcmaster
%\newcommand{\path}{/home/mcbuff/steve/thesis}     % path for figures and .bib
%\newcommand{\path}{/usr2/users/SPARC/steve/thesis} % path for figures and .bib
%\newcommand{\path}{/u/steve/TFaffine}  % mediaMIT path for figures and .bib, 
%-------------------------------------------------------------------------
%        COMMANDS FOR FIGURES
\newcommand{\figpath}{\path/figs}
% path for figures usually \path/figs or just \path, depending on how many figs
%\newcommand{\figpath}{/usr2/users/SPARC/steve/thesis/figs/} % old equivalent
%-------------------------------------------------------------------------

\newcommand{\fig}[1]{\psfig{figure=\figpath/#1}}
% If you dont want figs, comment out above line, and use this line
%\newcommand{\fig}[1]{\vspace{.25in} \underline{\large #1 } \vspace{.25in}}

%%%\newcommand{\fig}[1]{\psfig{figure=#1empty}} % also works for nofig???

% example equivalent uses:
%      \psfig{figure=\figpath/logon/logonaffine.eps,height=2.75in}
%      \fig{logon/logonaffine.eps,height=2.75in}
%-------------------------------------------------------------------------
\newcommand{\figc}[1]{   % figure centered rather than left justified as usual
  \vbox{
    \centerline{\fig{#1}}
  }
}
%example use of figc:
%\begin{figure}
%  \figc{logon/logonlong.eps,height=2in}
%  \caption{
%  \label{fig:logon}
%  Single scale Gabor expansions, onto a fixed set of temporal resolution.}
%\end{figure}
%-------------------------------------------------------------------------
\newcommand{\figca}[2]{ % puts letter "a" under single figure centered in box
  \vbox{
    \centerline{\fig{#2}}
    \hbox{\makebox[#1]{~(a)}
         }
  }
}
% USAGE: \figca{5in}{pork.eps,width=5in}
%-------------------------------------------------------------------------
\newcommand{\figcmylabel}[3]{  % with my own label under it
  \vbox{
    \centerline{\fig{#2}}
    \hbox{\makebox[#1]{~(#3)}
         }
  }
}
% USAGE: \figcmylabel{5in}{pork.eps,width=5in}{z} % puts letter `z' under fig
%-------------------------------------------------------------------------
\newcommand{\figlrab}[4]{
  \centerline{  % centerline2
    \vbox{
      %%\vspace{0.10in}    % save space
      \hbox{
         \makebox[#1][l]{\fig{#2}}
         \makebox[#3][r]{\fig{#4}}
      }   % end hbox
      %%\vspace{0.25in}    % save space
      \hbox{\makebox[#1]{~(a)} \makebox[#3]{~(b)} }
    }     % end vbox
  }       % end centerline2
}
\newcommand{\figlrd}[4]{ % self (abc) on the left, (d) on the right
  \centerline{  % centerline2
    \vbox{
      %%\vspace{0.10in}    % save space
      \hbox{
         \makebox[#1][l]{\fig{#2}}
         \makebox[#3][r]{\fig{#4}}
      }   % end hbox
      %%\vspace{0.25in}    % save space
      \hbox{\makebox[#1]{~(a,b,c)} \makebox[#3]{~(d)} }
    }     % end vbox
  }       % end centerline2
}
% example use of figlrab:
%\begin{figure}
%  \figlrab{3in}{logon/logonlong.eps,height=2.75in}
%          {3in}{logon/logonshort.eps,height=2.75in}
%  \caption{
%  \label{fig:logon}
%  Single scale Gabor expansions.\@
%  (a)~``Complete'' bases with long time and narrow bandwidth.\@
%  (b)~With poor frequency and good temporal resolution.}
%\end{figure}
%-------------------------------------------------------------------------
\newcommand{\figlrcd}[4]{
  \centerline{  % centerline2
    \vbox{
      %%\vspace{0.10in}    % save space
      \hbox{
         \makebox[#1][l]{\fig{#2}}
         \makebox[#3][r]{\fig{#4}}
      }   % end hbox
      %%\vspace{0.25in}    % save space
      \hbox{\makebox[#1]{~(c)} \makebox[#3]{~(d)} }
    }     % end vbox
  }       % end centerline2
}
%-------------------------------------------------------------------------
\newcommand{\figlrmylabelmylabel}[8]{
  \centerline{  % centerline2
    \vbox{
      %%\vspace{0.10in}    % save space
      \hbox{
         \makebox[#1][l]{\fig{#2}}
         \makebox[#4][r]{\fig{#5}}
      }   % end hbox
      %%\vspace{0.25in}    % save space
      \hbox{\makebox[#1]{~(#3)} \makebox[#4]{~(#6)} }
    }     % end vbox
  }       % end centerline2
}
%-------------------------------------------------------------------------
\newcommand{\figlrnoab}[4]{  % just say NO to the LETTERS a,b
                             % used by prolet figure
  \centerline{  % centerline2
      \hbox{
         \makebox[#1][l]{\fig{#2}}
         \makebox[#3][r]{\fig{#4}}
      }   % end hbox
  }       % end centerline2
}
%-------------------------------------------------------------------------
\newcommand{\figlcrabc}[6]{  % figures left, center, right (side by side)
  \centerline{  % centerline2
    \vbox{
      %no effect here \vspace{0.10in}
      %% no effect here   \vspace{-.2in} % for acm_mm96
      \hbox{
         \vspace{-.2in} % works well here   (for acm_mm96)
         \makebox[#1][l]{\fig{#2}}
         \makebox[#3][c]{\fig{#4}}
         \makebox[#5][r]{\fig{#6}}
      }   % end hbox
      \vspace{0.25in}
      \hbox{\makebox[#1]{~(a)} \makebox[#3]{~(b)} \makebox[#5]{~(c)} }
    }     % end vbox
  }       % end centerline2
}
%-------------------------------------------------------------------------
\newcommand{\figlcrnoabc}[6]{  % just say NO to the LETTERS a,b,c
  \centerline{  % centerline2
      \vspace{0.10in}
      \hbox{
         \makebox[#1][l]{\fig{#2}}
         \makebox[#3][c]{\fig{#4}}
         \makebox[#5][r]{\fig{#6}}
      }   % end hbox
  }       % end centerline2
}
%-------------------------------------------------------------------------
\newcommand{\figlcrdef}[6]{  % figures left, center, right (side by side)
  \centerline{  % centerline2
    \vbox{
      %no effect here \vspace{0.10in}
      %% no effect here   \vspace{-.2in} % for acm_mm96
      \hbox{
         \vspace{-.2in} % works well here   (for acm_mm96)
         \makebox[#1][l]{\fig{#2}}
         \makebox[#3][c]{\fig{#4}}
         \makebox[#5][r]{\fig{#6}}
      }   % end hbox
      \vspace{0.25in}
      \hbox{\makebox[#1]{~(d)} \makebox[#3]{~(e)} \makebox[#5]{~(f)} }
    }     % end vbox
  }       % end centerline2
}
%-------------------------------------------------------------------------
\newcommand{\figccccabcd}[8]{  % 4 figures in a row
  \centerline{  % centerline2
    \vbox{
      %no effect here???  ... \vspace{0.10in}
      %%no effect here    \vspace{-.2in} % for acm_mm96
      \hbox{
        \vspace{-.2in} % for acm_mm96 try here
         \makebox[#1][c]{\fig{#2}}
         \makebox[#3][c]{\fig{#4}}
         \makebox[#5][c]{\fig{#6}}
         \makebox[#7][c]{\fig{#8}}
      }   % end hbox
      \vspace{0.25in}
      \hbox{\makebox[#1]{~(a)} \makebox[#3]{~(b)} \makebox[#5]{~(c)} \makebox[#7]{~(d)} }
    }     % end vbox
  }       % end centerline2
}
%-------------------------------------------------------------------------
\newcommand{\figccccbcde}[8]{  % 4 figures in a row
  \centerline{  % centerline2
    \vbox{
      %no effect here???  ... \vspace{0.10in}
      %%no effect here    \vspace{-.2in} % for acm_mm96
      \hbox{
        \vspace{-.2in} % for acm_mm96 try here
         \makebox[#1][c]{\fig{#2}}
         \makebox[#3][c]{\fig{#4}}
         \makebox[#5][c]{\fig{#6}}
         \makebox[#7][c]{\fig{#8}}
      }   % end hbox
      \vspace{0.25in}
      \hbox{\makebox[#1]{~(b)} \makebox[#3]{~(c)} \makebox[#5]{~(d)} \makebox[#7]{~(e)} }
    }     % end vbox
  }       % end centerline2
}
%-------------------------------------------------------------------------
\newcommand{\figcccccabcde}[9]{  % 5 figures in a row
  \centerline{  % centerline2
    \vbox{
      \vspace{0.10in}
      \hbox{
         \makebox[#1][c]{\fig{#2}}
         \makebox[#3][c]{\fig{#4}}
         \makebox[#5][c]{\fig{#6}}
         \makebox[#7][c]{\fig{#8}} % re-use parameter 1 to avoid this error...
                                   % ! You already have nine parameters.
         \makebox[#1][c]{\fig{#9}}
      }   % end hbox
      \vspace{0.25in}
      \hbox{\makebox[#1]{~(a)} \makebox[#3]{~(b)} \makebox[#5]{~(c)} \makebox[#7]{~(d)} \makebox[#1]{~(e)} }
    }     % end vbox
  }       % end centerline2
}
%-------------------------------------------------------------------------
\newcommand{\figcfghij}[6]{  % 5 figures in a row
  \centerline{  % centerline2
    \vbox{
      \vspace{0.10in}
      \hbox{
         \makebox[#1][c]{\fig{#2}} % here I only specify size of one box
         \makebox[#1][c]{\fig{#3}}
         \makebox[#1][c]{\fig{#4}}
         \makebox[#1][c]{\fig{#5}} % re-use parameter 1 to avoid this error...
                                   % ! You already have nine parameters.
         \makebox[#1][c]{\fig{#6}}
      }   % end hbox
      \vspace{0.25in}
      \hbox{\makebox[#1]{~(f)} \makebox[#1]{~(g)} \makebox[#1]{~(h)} \makebox[#1]{~(i)} \makebox[#1]{~(j)} }
    }     % end vbox
  }       % end centerline2
}
%-------------------------------------------------------------------------
\newcommand{\figcklmno}[6]{  % 5 figures in a row
  \centerline{  % centerline2
    \vbox{
      \vspace{0.10in}
      \hbox{
         \makebox[#1][c]{\fig{#2}} % here I only specify size of one box
         \makebox[#1][c]{\fig{#3}}
         \makebox[#1][c]{\fig{#4}}
         \makebox[#1][c]{\fig{#5}} % re-use parameter 1 to avoid this error...
                                   % ! You already have nine parameters.
         \makebox[#1][c]{\fig{#6}}
      }   % end hbox
      \vspace{0.25in}
      \hbox{\makebox[#1]{~(k)} \makebox[#1]{~(l)} \makebox[#1]{~(m)} \makebox[#1]{~(n)} \makebox[#1]{~(o)} }
    }     % end vbox
  }       % end centerline2
}
%-------------------------------------------------------------------------
\newcommand{\figcpqrst}[6]{  % 5 figures in a row
  \centerline{  % centerline2
    \vbox{
      \vspace{0.10in}
      \hbox{
         \makebox[#1][c]{\fig{#2}} % here I only specify size of one box
         \makebox[#1][c]{\fig{#3}}
         \makebox[#1][c]{\fig{#4}}
         \makebox[#1][c]{\fig{#5}} % re-use parameter 1 to avoid this error...
                                   % ! You already have nine parameters.
         \makebox[#1][c]{\fig{#6}}
      }   % end hbox
      \vspace{0.25in}
      \hbox{\makebox[#1]{~(p)} \makebox[#1]{~(q)} \makebox[#1]{~(r)} \makebox[#1]{~(s)} \makebox[#1]{~(t)} }
    }     % end vbox
  }       % end centerline2
}
%-------------------------------------------------------------------------
\newcommand{\figccccccccnoabcdefgh}[9]{  % 8 figures in a row
  \centerline{  % centerline2
    \vbox{
      \vspace{0.10in}
      \hbox{
         \makebox[#1][c]{\fig{#2}}
         \makebox[#1][c]{\fig{#3}} % re-use parameter 1 to avoid this error...
                                   % ! You already have nine parameters.
         \makebox[#1][c]{\fig{#4}}
         \makebox[#1][c]{\fig{#5}}
         \makebox[#1][c]{\fig{#6}}
         \makebox[#1][c]{\fig{#7}}
         \makebox[#1][c]{\fig{#8}}
         \makebox[#1][c]{\fig{#9}}
      }   % end hbox
      \vspace{0.25in}
      % \hbox{\makebox[#1]{~(a)} \makebox[#1]{~(b)} \makebox[#1]{~(c)} \makebox[#1]{~(d)} \makebox[#1]{~(e)} \makebox[#1]{~(f)} \makebox[#1]{~(g)} \makebox[#1]{~(h)} }
    }     % end vbox
  }       % end centerline2
}
%-------------------------------------------------------------------------
\newcommand{\figud}[4]{
  \centerline{
    \vbox{
         \hbox{\makebox[#1][c]{\fig{#2}}}  % need the hboxes to get
         \hbox{\makebox[#1]{~(a)}}         %          centerline to work
         \hbox{\makebox[#3][c]{\fig{#4}}}  %          otherwise doesnt center
         \hbox{\makebox[#3]{~(b)}}
    }     % end vbox
  }       % end centerline
}
%-------------------------------------------------------------------------

