| 1 |
\documentclass{article} |
| 2 |
\usepackage{fullpage} |
| 3 |
\usepackage{subfigure} |
| 4 |
|
| 5 |
\fboxsep=-\fboxrule |
| 6 |
\def\textfraction{.1} |
| 7 |
|
| 8 |
\newcommand{\figbox}[1]{% |
| 9 |
\fbox{% |
| 10 |
\vbox to 1in{% |
| 11 |
\vfil |
| 12 |
\hbox to 2in{% |
| 13 |
\parbox{2in}{% |
| 14 |
\centering |
| 15 |
#1}}% |
| 16 |
\vfil}}} |
| 17 |
|
| 18 |
\begin{document} |
| 19 |
|
| 20 |
\setcounter{lofdepth}{2} |
| 21 |
\listoffigures |
| 22 |
\newpage |
| 23 |
|
| 24 |
\section{Reference Test} |
| 25 |
|
| 26 |
\begin{figure}% |
| 27 |
\centering |
| 28 |
\subfigure{% |
| 29 |
\label{fig:A}% |
| 30 |
\figbox{SUBFIG ONE:\\ |
| 31 |
(no opt)}}% |
| 32 |
\quad |
| 33 |
\subfigure[]{% |
| 34 |
\label{fig:B}% |
| 35 |
\figbox{SUBFIG TWO:\\ |
| 36 |
(empty opt)}}% |
| 37 |
\label{fig:AB}\\ |
| 38 |
% |
| 39 |
\subfigure[Subfigure Three.]{% |
| 40 |
\label{fig:C}% |
| 41 |
\figbox{SUBFIG THREE:\\ |
| 42 |
(opt)}}% |
| 43 |
\quad |
| 44 |
\subfigure[][Subfigure Four.]{% |
| 45 |
\label{fig:D}% |
| 46 |
\figbox{SUBFIG FOUR:\\ |
| 47 |
(empty opt and opt)}}% |
| 48 |
\quad |
| 49 |
\subfigure[][]{% |
| 50 |
\label{fig:E}% |
| 51 |
\figbox{SUBFIG FIVE:\\ |
| 52 |
(both empty opt)}}\\ |
| 53 |
% |
| 54 |
\subfigure[The Sixth Subfigure.][Subfigure Six.]{% |
| 55 |
\label{fig:F}% |
| 56 |
\figbox{SUBFIG SIX:\\ |
| 57 |
(both opt)}}% |
| 58 |
\quad |
| 59 |
\subfigure[The Seventh Subfigure][]{% |
| 60 |
\label{fig:G}% |
| 61 |
\figbox{SUBFIG SEVEN:\\ |
| 62 |
(opt and empty opt)}} |
| 63 |
% |
| 64 |
\caption{Optional argument test.}% |
| 65 |
\label{fig:main}% |
| 66 |
\end{figure} |
| 67 |
|
| 68 |
The figure~\ref{fig:main} on page~\pageref{fig:main} is composed |
| 69 |
of the seven subfigures~\subref{fig:A} (aka: \ref{fig:A}), |
| 70 |
\subref{fig:B} (aka: \ref{fig:B}), \subref{fig:C} (aka: \ref{fig:C}), |
| 71 |
\subref{fig:D} (aka: \ref{fig:D}), \subref{fig:E} (aka: \ref{fig:E}), |
| 72 |
\subref{fig:F} (aka: \ref{fig:F}), and \subref{fig:G} (aka: |
| 73 |
\ref{fig:G}). |
| 74 |
|
| 75 |
\end{document} |