Revision 0a91a34fc84dcdc4bc7586442fc911eba0745cdd authored by hieuhoang1972 on 13 April 2009, 13:26:16 UTC, committed by hieuhoang1972 on 13 April 2009, 13:26:16 UTC
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/branches/hieu_ftemplate_2@2281 1f5c12ca-751b-0410-a591-d2e778427230
1 parent 069aed9
Raw File
subfig.sty
% subfig.sty 
% ----------------------------------------------------------------------
%                     This LaTeX environment  is for
% printing   subfigures.   To   use   this   environment,  include  in  the
% \documentstyle header  a command to  load in the  .sty file containing this
% macro. For example:
%     \documentstyle[subfig]{article}
% if you  have the  macro in  a file subfig.sty. The environment seems pretty
% well documented in the comments.
%
% Modified : June 8, 1989.  You can now reference either individual
%            figures in the subfigures environment, or all of
%            them.  If you use a \label command immediately after the
%            \begin{subfigures} command, then a reference to that
%            label will generate a reference to the figure number
%            without the alphabetic extension.
%
% Modified : 16 - january - 1989 by Johannes Braams ( BRAAMS@HLSDNL5)
%            Added \global\@ignoretrue in the definition of
%            \endsubfigures in order to prevent a spurious space
%            at the beginning of the next text-line. Also added %'s
%            at the end of each command-line for the same reasons.
%
% Modified: 961011 - by Pete Newbury.  Took subeqn.sty and did a global
%            search-and-replace ``subeqn'' --> ``subfig'' and
%            ``equation'' --> ``figure''.   
%
%%%----------------------------------------------------------------
%%% File: subfig.sty
%%% The subfigures environment %%%
%
% Within the subfigures environment, the only change is that
% figures are labeled differently.  The number stays the same,
% and lower case letters are appended.  For example, if after doing
% three figures, numbered 1, 2, and 3, you start a subfigures
% environmment and do three more figures, they will be numbered
% 4a, 4b, and 4c.  After you end the subfigures environment, the
% next figure will be numbered 5.
%
% Both text and figures can be put inside the subfigures environment.
%
% If you make any improvements, I'd like to hear about them.
%
%
\newtoks\@stfigure

\def\subfigures{\refstepcounter{figure}%
\edef\@savedfigure{\the\c@figure}%
\@stfigure=\expandafter{\thefigure}%   %only want \thefigure
\edef\@savedthefigure{\the\@stfigure}% %expanded once
\edef\oldthefigure{\thefigure}%
\setcounter{figure}{0}%
\def\thefigure{\oldthefigure\alph{figure}}}%

\def\endsubfigures{%
\setcounter{figure}{\@savedfigure}%
\@stfigure=\expandafter{\@savedthefigure}%
\edef\thefigure{\the\@stfigure}\global\@ignoretrue}
%%%----------------------------

back to top