| 1 |
%% |
| 2 |
%% This is file `example.tex', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% mcaption.dtx (with options: `example') |
| 8 |
%% |
| 9 |
%% This is a generated file. |
| 10 |
%% |
| 11 |
%% Copyright (C) 2005 by Stephan Hennig <[email protected]> |
| 12 |
%% |
| 13 |
%% This file may be distributed and/or modified under the conditions of |
| 14 |
%% the LaTeX Project Public License, either version 1.2 of this license |
| 15 |
%% or (at your option) any later version. The latest version of this |
| 16 |
%% license is in: |
| 17 |
%% |
| 18 |
%% http://www.latex-project.org/lppl.txt |
| 19 |
%% |
| 20 |
%% and version 1.2 or later is part of all distributions of LaTeX version |
| 21 |
%% 1999/12/01 or later. |
| 22 |
%% |
| 23 |
\listfiles |
| 24 |
\documentclass{book} |
| 25 |
\usepackage{wrapfig} |
| 26 |
\usepackage[top]{mcaption} |
| 27 |
\usepackage[ |
| 28 |
font={footnotesize,it}, |
| 29 |
labelfont=bf, |
| 30 |
justification=raggedright] |
| 31 |
{caption}[2005/06/28] |
| 32 |
\usepackage[english]{babel} |
| 33 |
\usepackage{blindtext} |
| 34 |
\begin{document} |
| 35 |
\setlength{\margincapsep}{3\columnsep} |
| 36 |
|
| 37 |
\author{Stephan Hennig} |
| 38 |
\title{mcaption test file} |
| 39 |
\maketitle |
| 40 |
\listoffigures |
| 41 |
\listoftables |
| 42 |
|
| 43 |
\chapter{Demonstration of the mcaption package} |
| 44 |
\section{This is one-column mode} |
| 45 |
\blindtext[1] |
| 46 |
|
| 47 |
\begin{wrapfigure}{o}{5cm} |
| 48 |
\begin{margincap} |
| 49 |
\rule{5cm}{2cm} |
| 50 |
\caption{A wrapfigure caption in the outer margin.} |
| 51 |
\label{fig:wrapOneCol} |
| 52 |
\end{margincap} |
| 53 |
\end{wrapfigure} |
| 54 |
\blindtext[1] |
| 55 |
\begin{table} |
| 56 |
\begin{margincap} |
| 57 |
\centering |
| 58 |
\begin{tabular}{@{}lr@{}} |
| 59 |
foo & 7\\ |
| 60 |
bar & 21 \\ |
| 61 |
baz & 23 \\ |
| 62 |
\end{tabular} |
| 63 |
\caption{A table caption in the outer margin.} |
| 64 |
\label{tab:shorttab} |
| 65 |
\end{margincap} |
| 66 |
\end{table} |
| 67 |
|
| 68 |
\twocolumn |
| 69 |
\section{This is two-column mode} |
| 70 |
\blindtext[1] |
| 71 |
|
| 72 |
\begin{wrapfigure}{o}{2cm} |
| 73 |
\begin{margincap} |
| 74 |
\rule{2cm}{1cm} |
| 75 |
\caption[A hanging wrapfigure caption.]{Another wrapfigure caption |
| 76 |
in the outer margin. Note, we are in the outer column. And we're |
| 77 |
hanging!} |
| 78 |
\label{fig:wrapTwoCol} |
| 79 |
\end{margincap} |
| 80 |
\end{wrapfigure} |
| 81 |
\blindtext[5] |
| 82 |
\begin{figure*} |
| 83 |
\begin{margincap} |
| 84 |
\centering |
| 85 |
\rule{10cm}{2cm} |
| 86 |
\caption{A figure caption in the outer margin.} |
| 87 |
\label{fig:figure*} |
| 88 |
\end{margincap} |
| 89 |
\end{figure*} |
| 90 |
|
| 91 |
Let's reference all figures and tables: |
| 92 |
|
| 93 |
\newcommand*{\pref}[1]{\ref{#1} & \pageref{#1}} |
| 94 |
\begin{tabular}{ll} |
| 95 |
float & page\\\hline |
| 96 |
figure~\pref{fig:wrapOneCol}\\ |
| 97 |
table~\pref{tab:shorttab}\\ |
| 98 |
figure~\pref{fig:wrapTwoCol}\\ |
| 99 |
figure~\pref{fig:figure*}\\ |
| 100 |
\end{tabular} |
| 101 |
\end{document} |
| 102 |
\endinput |
| 103 |
%% |
| 104 |
%% End of file `example.tex'. |