summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/subfigure/test3.tex
blob: 4b1e507d9d27d253d91c0f9a1e8701ed97845456 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
\documentclass{article}
\usepackage{fullpage}
\usepackage{subfigure}

\fboxsep=-\fboxrule
\def\textfraction{.1}

\newcommand{\figbox}[1]{%
  \fbox{%
    \vbox to 1in{%
      \vfil
      \hbox to 2in{%
        \parbox{2in}{%
          \centering
          #1}}%
      \vfil}}}

\begin{document}

\setcounter{lofdepth}{2}
\listoffigures
\newpage

\section{Reference Test}

\begin{figure}%
  \centering
  \subfigure{%
    \label{fig:A}%
    \figbox{SUBFIG ONE:\\
            (no opt)}}%
  \quad
  \subfigure[]{%
    \label{fig:B}%
    \figbox{SUBFIG TWO:\\
            (empty opt)}}%
  \label{fig:AB}\\
%
  \subfigure[Subfigure Three.]{%
    \label{fig:C}%
    \figbox{SUBFIG THREE:\\
            (opt)}}%
  \quad
  \subfigure[][Subfigure Four.]{%
    \label{fig:D}%
    \figbox{SUBFIG FOUR:\\
            (empty opt and opt)}}%
  \quad
  \subfigure[][]{%
    \label{fig:E}%
    \figbox{SUBFIG FIVE:\\
            (both empty opt)}}\\
%
  \subfigure[The Sixth Subfigure.][Subfigure Six.]{%
    \label{fig:F}%
    \figbox{SUBFIG SIX:\\
            (both opt)}}%
  \quad
  \subfigure[The Seventh Subfigure][]{%
    \label{fig:G}%
    \figbox{SUBFIG SEVEN:\\
            (opt and empty opt)}}
%
  \caption{Optional argument test.}%
  \label{fig:main}%
\end{figure}

The figure~\ref{fig:main} on page~\pageref{fig:main} is composed
of the seven subfigures~\subref{fig:A} (aka: \ref{fig:A}),
\subref{fig:B} (aka: \ref{fig:B}), \subref{fig:C} (aka: \ref{fig:C}),
\subref{fig:D} (aka: \ref{fig:D}), \subref{fig:E} (aka: \ref{fig:E}),
\subref{fig:F} (aka: \ref{fig:F}), and \subref{fig:G} (aka:
\ref{fig:G}).

\end{document}