%------------------------------------------------------------------------
% podar@sbcs (Sunil Podar)
% to include this file, say:
% \input{/users/podar/Latex/macros/article}
%
% here I implement the \.......type command where .... is the section,
% subsection, etc. It allows one to redefine via \renewcommand the
% typestyle used for making the headings; by typestyle, I mean, the size and
% the font. Include this file if the documentstyle is article (For report
% style, replace article by report).
%------------------------------------------------------------------------
\makeatletter
% this is do redefine the font in which the page number is printed. The
% \pagenumbering command is still the proper command to change the type 
% of pagenumber to things like roman, arabic, etc. use renewcommand to 
% change the font. E.g. \renewcommand{\pagenumberfont}{\sf}
\def\pagenumberfont{\rm}
\def\pagenumbering#1{\global\c@page \@ne \gdef\thepage{\pagenumberfont 
\csname @#1\endcsname \c@page}}
%---------------------
\def\section{\@startsection {section}{1}{\z@}{3.5ex plus 1ex minus
    .2ex}{2.3ex plus .2ex}{\sectiontype}}
\def\subsection{\@startsection{subsection}{2}{\z@}{3.25ex plus 1ex minus
   .2ex}{1.5ex plus .2ex}{\subsectiontype}}
\def\subsubsection{\@startsection{subsubsection}{3}{\z@}{3.25ex plus 1ex minus
   .2ex}{0ex plus .2ex}{\subsubsectiontype}}
\def\paragraph{\@startsection
     {paragraph}{4}{\z@}{3.25ex plus 1ex minus
     .2ex}{-1em}{\subsubsectiontype}}
\def\subparagraph{\@startsection
     {subparagraph}{4}{\parindent}{3.25ex plus 1ex minus
     .2ex}{-1em}{\subsubsectiontype}}
%---------------------
\def\@dottedtocline#1#2#3#4#5{\ifnum #1>\c@tocdepth \else
  \vskip \z@ plus .2pt
  {\hangindent #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip
    \parindent #2\relax\leavevmode
   \@tempdima #3\relax
   \othertoctype
    #4\leaders\hbox{$\m@th \mkern \@dotsep mu.\mkern \@dotsep mu$}\hfill
   \hbox to\@pnumwidth{\hfil\othertoctype #5}\par}\fi}
%
\def\l@section#1#2{\pagebreak[3]
   \vskip 1.0em plus 1pt  % space above chapter line
   \@tempdima 1.5em       % width of box holding chapter number
   \begingroup
     \parindent \z@ \rightskip \@pnumwidth
     \parfillskip -\@pnumwidth
     \maintoctype         % Boldface.
     \leavevmode          % TeX command to enter horizontal mode.
     #1\hfil \hbox to\@pnumwidth{\hss #2}\par
   \endgroup}
\makeatother
%---------------------
% to change do: \renewcommand{\sectiontype}{\large\bf}
\def\sectiontype{\Large\bf} %these are default values same as regular LaTeX.
\def\subsectiontype{\large\bf}
\def\subsubsectiontype{\normalsize\bf}
\def\maintoctype{\bf} 	%main entries in toc i.e. chapters in report
		      	%style, and sections in article style.
\def\othertoctype{\rm}  %other entries,i.e. in lof, lot, subsection,
			% subsubsection, etc.
%--------------------------------------------------------------------------
% here I redefine the macros to change the way LaTeX typesets the caption in
% figure and table environments. Normally it insists on typesetting it in
% roman normalsize and with the word ``Figure'' before the number (say 2.1);
% using the renewcommand you can change it to whatever fontsize and font you
% like. You may also change the word ``Figure'' to something else, say 
% ``Fig.'' or ``Algorithm'' or whatever, but beware, the entry will still go
% into the listoffigures (or listoftables); only the in-text stuff will
% change. You will still have to explicitely change the fonts in the argument
% of the \caption command. 
% To change, use a command like the following:
%
%\renewcommand{\figuretype}{\large\bf Figure}
%\renewcommand{\tabletype}{\large\bf Table}
%
% If you want to change the way LaTeX typesets the number then change the
% definition of the macro \thefigure and \thetable accordingly. E.g. people
% coming from the troff way often like their figure numbers to be of the
% form 2-1; if you want that, simply change the . in the next two stmts to -
% and insert a \@roman etc. if you want other representation for numbers.
% You will have to uncomment these lines and put them inside the
% \makeatletter and \makeatother environment.
%\def\thefigure{\thechapter.\@arabic\c@figure}
%\def\thetable{\thechapter.\@arabic\c@table}
%---------------------------------------------------------------------------
\makeatletter
\def\fnum@figure{\figuretype\ \thefigure}
\def\figuretype{Figure} %LaTeX default
\def\fnum@table{\tabletype\ \thetable}
\def\tabletype{Table} %LaTeX default
\makeatother
