|
|
Welcome to the TeXnik web site Reference on subfigure |
![]() |
||||||||||
|
Write into the optional argument for the caption for example
\subfigure[A wonderful caption\label{sub1}]{...}
Now you are able to put refs in your text at any place with
... this belongs to fig.\ref{sub1} ...
for "sub1" you can write any other text.
\usepackage{subfigure}
\newbox\subfigbox
\makeatletter
\newenvironment{subfloat}%
{\def\caption##1{\gdef\subcapsave{\relax##1}}%
\let\subcapsave\@empty%
\setbox\subfigbox\hbox%
\bgroup}%
{\egroup%
\subfigure[\subcapsave]{\box\subfigbox}}%
\makeatother
and in the the text for example:
\begin{figure}
\centering%
\begin{subfloat}%
\rule{4cm}{3cm}
\caption{\label{fig:label1}caption 1}%
\end{subfloat}%
\hspace{1.5cm}%
\begin{subfloat}%
\begin{minipage}{0.3\linewidth}
\begin{verbatim}
blah fasel
bluuber laber
fasel laber quassel
\end{verbatim}
\end{minipage}
\caption{\label{fig:label2}caption 2}%
\end{subfloat}%
\caption{caption}
\label{fig:label}
\end{figure}
|
|||||||||||