From e0c6872cf40896c7be36b11dcc744620f10adf1d Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 2 Sep 2019 13:46:59 +0900 Subject: Initial commit --- macros/latex/contrib/capt-of/README | 8 ++ macros/latex/contrib/capt-of/capt-of.dtx | 176 +++++++++++++++++++++++++++++++ macros/latex/contrib/capt-of/capt-of.ins | 46 ++++++++ macros/latex/contrib/capt-of/capt-of.pdf | Bin 0 -> 85950 bytes 4 files changed, 230 insertions(+) create mode 100644 macros/latex/contrib/capt-of/README create mode 100644 macros/latex/contrib/capt-of/capt-of.dtx create mode 100644 macros/latex/contrib/capt-of/capt-of.ins create mode 100644 macros/latex/contrib/capt-of/capt-of.pdf (limited to 'macros/latex/contrib/capt-of') diff --git a/macros/latex/contrib/capt-of/README b/macros/latex/contrib/capt-of/README new file mode 100644 index 0000000000..c41d89bfdd --- /dev/null +++ b/macros/latex/contrib/capt-of/README @@ -0,0 +1,8 @@ +This directory provides a single LaTeX package: capt-of.sty + +The package allows the user to produce captions in the ordinary text +of a document. Such captions are identical to those used in floats +(except that they're not in a float...). + +The bundle is distributed under the lppl, and is Copyright (c) Robin +Fairbairns, 2010. diff --git a/macros/latex/contrib/capt-of/capt-of.dtx b/macros/latex/contrib/capt-of/capt-of.dtx new file mode 100644 index 0000000000..d2e06dfba9 --- /dev/null +++ b/macros/latex/contrib/capt-of/capt-of.dtx @@ -0,0 +1,176 @@ +% ^^A ignore the tedious stuff when typesetting +% +% \CheckSum{6} +% +% \iffalse +% Copyright 1996, 1999, 2010 Robin Fairbairns (rf10@cam.ac.uk) +% +% This program may redistributed and/or modified under the terms +% of the LaTeX Project Public License Distributed from CTAN +% archives in directory macros/latex/base/lppl.txt; either +% version 1.3 of the License, or (at your option) any later version. +% +% \begin{macrocode} +%<*!debugins> +\NeedsTeXFormat{LaTeX2e} +% +%<*dtx> +\ProvidesFile{capt-of.dtx}% +% +%\ProvidesPackage{capt-of}% + [2009/12/29 v0.2 +% standard captions outside of floats% +%<*dtx> + capt-of package source file% +% + ]% $Id: footmisc.dtx,v 4.20 2005/03/17 13:41:58 rf Exp rf10 $ +% \end{macrocode} +% +% Driver for compiling this file on its own +% \begin{macrocode} +%<*driver> +\setcounter{errorcontextlines}{999} +\documentclass{ltxdoc} +\GetFileInfo{capt-of.dtx} +\EnableCrossrefs +% to get documented source of the package, comment out the next line, +% and uncomment the following one; otherwise, create yourself +% (somewhere on your LaTeX input path) a file ltxdoc.cfg that contains +% simply \AtBeginDocument{\AlsoImplementation} +\OnlyDescription +%\AlsoImplementation +\setcounter{StandardModuleDepth}{1} +\begin{document} +\DocInput{capt-of.dtx} +\end{document} +% +% \end{macrocode} +% +% \fi +% +% \title{The \textsf{capt-of} package} +% \author{Robin Fairbairns\thanks{Email: \emph{rf10@cam.ac.uk}}} +% \maketitle +% +% \section{Why this package?} +% +% \LaTeX{} provides a command (\cs{caption}) for adding a caption to a +% float environment (that is to say, a \texttt{figure} or a +% \texttt{table}, ``out of the box''). +% +% The command is a good one, and many users want to use it. Often, +% they end up using a float environment, in a case where it's not +% strictly necessary, and get entangled in the positioning problems +% that floats pose for the innocent user. Using this package, the +% user can have standard-looking captions without the need of a float +% environment. +% +% This package defines an alternative command, \cs{captionof}, which +% sets things up so that \cs{caption} will work outside of a float. +% +% The \textsf{float} package provides an alternative to +% \cs{captionof}, in the float \texttt{[H]} option +% (``place the environment \emph{here} without doing any of this +% floating stuff''). So why use \textsf{capt-of}? --- its great +% advantage is simplicity; you load it, and it defines \emph{one} +% macro, while \textsf{float} defines lots and lots. (Of course, if +% you need others of \textsf{float}'s capabilities, \textsf{capt-of} +% loses its advantage...). +% +% \section{The potential problem} +% +% \cs{captionof} defines a caption in text; it also steps the +% \texttt{figure} (or \texttt{table} or whatever) counter. The float +% environments do the same. +% +% Now, consider the sequence: +% \begin{quote} +% \begin{verbatim} +% +% \begin{figure} +%
+% \caption{...} +% \end{figure} +% ... +% +% ... +% +% \captionof{figure}{...} +% \end{verbatim} +% \end{quote} +% and suppose the \texttt{figure} environment doesn't fit anywhere +% between where it's specified and the inline figure (so that it will +% float to somewhere later). +% +% We will then see a document with +% \begin{quote} +% \meta{earlier text}\\ +% \dots\\ +% \meta{intervening text}\\ +% \dots\\ +% \meta{inline figure stuff}\\ +% Figure \meta{n+1}: \dots\\ +% \dots\\ +% \meta{yet more text}\\ +% \dots\\ +% \meta{figure stuff}\\ +% Figure \meta{n}: \dots +% \end{quote} +% That is, the figure numbers have got out of order, because the +% floating figure was specified before the inline figure. +% +% \LaTeX{} won't do this when everything is specified as a float: it +% keeps floats of the same type in order (which is why floats stack up +% if a single one won't fit). +% +% The moral of that little tale is to say: don't use \cs{captionof} +% and floats of the same type in the same document. (Or be +% extra-specially careful about what's happening if you must.) +% \AlsoImplementation +% \StopEventually{} +% +% \section{The code (such as it is)} +% +% \begin{macro}{\captionof} +% Usage: \cs{captionof}\marg{type}\oarg{move}\marg{caption} +% \begin{description} +% \item[\normalfont\itshape type] is `\texttt{figure}' or +% `\texttt{table}' (or some type you've defined with the +% \textsf{float} package) +% \item[\normalfont\itshape move] is the optional moving argument of +% \cs{caption} (the thing that goes to the list of tables/figures) +% \item[\normalfont\itshape caption] is the text of the caption +% \end{description} +% +% It's probably best to use \cs{captionof} within an enclosing group +% (e.g., \cs{begin}\marg{center} \emph{figure} +% \cs{captionof}\texttt{\char`{figure\char`}}\marg{blah blah} \cs{end}\marg{center}) +% \begin{macrocode} +\newcommand\captionof[1]{\def\@captype{#1}\caption} +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +\endinput +% +% \end{macrocode} +% +% \Finale +% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +% +\endinput \ No newline at end of file diff --git a/macros/latex/contrib/capt-of/capt-of.ins b/macros/latex/contrib/capt-of/capt-of.ins new file mode 100644 index 0000000000..a9b703236f --- /dev/null +++ b/macros/latex/contrib/capt-of/capt-of.ins @@ -0,0 +1,46 @@ +\input docstrip.tex + +\preamble +---------------------------------------------------------------------- +The capt-off package -- float-style captions outside of floats +Copyright (c) 2010 Robin Fairbairns + +This work may be distributed and/or modified under the conditions of the +LaTeX Project Public License, either version 1.3c of this license or (at +your option) any later version. The latest version of this license is in: +http://www.latex-project.org/lppl.txt, and version 1.3c or later is part +of all distributions of LaTeX version 2005/12/01 or later. + +This work has the LPPL maintenance status `author-maintained'. + +This work consists of the files capt-of.dtx, capt-of.ins, and README +and the derived files footmisc.sty (not distributed from the archive) +and footmisc.pdf. +----------------------------------------------------------------------- + +\endpreamble + +\def\batchfile{capt-of.ins} +\keepsilent +\Msg{*** Generating the capt-of package ***} +\askforoverwritefalse +\generate{% + \file{capt-of.sty}{\from{capt-of.dtx}{package}}% +} + + +\ifToplevel{ +\Msg{***********************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the file} +\Msg{* footmisc.sty into a directory searched by TeX} +\Msg{*} +\Msg{* Usual TDS location:} +\Msg{* \space\space tex/latex/capt-of} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{*} +\Msg{***********************************************************} +} + +\endbatchfile diff --git a/macros/latex/contrib/capt-of/capt-of.pdf b/macros/latex/contrib/capt-of/capt-of.pdf new file mode 100644 index 0000000000..8a6c238353 Binary files /dev/null and b/macros/latex/contrib/capt-of/capt-of.pdf differ -- cgit v1.2.3