Debian Codegraph @

texmf-dist/doc/latex/subfigmat/subfigmat-doc.tex

raw
1 \documentclass[pagesize=auto, fontsize=12pt, DIV=10, headings=normal]{scrartcl}
2
3 \usepackage{fixltx2e}
4 \usepackage{etex}
5 \usepackage{lmodern}
6 \usepackage[T1]{fontenc}
7 \usepackage{textcomp}
8 \usepackage[svgnames]{xcolor}
9 \usepackage{listings}
10 \usepackage{microtype}
11 \usepackage{hyperref}
12
13 \newcommand*{\mail}[1]{\href{mailto:#1}{\texttt{#1}}}
14 \newcommand*{\bmail}[1]{\href{mailto:#1}{\texttt{<#1>}}}
15 \newcommand*{\pkg}[1]{\textsf{#1}}
16 \newcommand*{\cs}[1]{\texttt{\textbackslash#1}}
17 \makeatletter
18 \newcommand*{\cmd}[1]{\cs{\expandafter\@gobble\string#1}}
19 \makeatother
20 \newcommand*{\env}[1]{\texttt{#1}}
21 \newcommand*{\meta}[1]{\textlangle\textsl{#1}\textrangle}
22
23 \addtokomafont{title}{\rmfamily}
24
25 \lstset{%
26 language=[LaTeX]TeX,%
27 columns=flexible,%
28 upquote=true,%
29 numbers=left,%
30 basicstyle=\ttfamily,%
31 keywordstyle=\color{Navy},%
32 commentstyle=\color{DimGray},%
33 stringstyle=\color{SeaGreen},%
34 numberstyle=\scriptsize\color{SlateGray}%
35 }
36
37 \title{The \pkg{subfigmat} package\thanks{This manual corresponds to \pkg{subfigmat.sty}~v1.0, dated~27 Feb 1999.}}
38 \author{%
39 Steven Douglas Cochran\thanks{\mail{[email protected]}}%
40 \and Bil Kleb\thanks{\mail{[email protected]}}%
41 }
42 \date{27 Feb 1999}
43
44
45 \begin{document}
46
47 \maketitle
48
49 \noindent
50 defines an array/matrix-type environment for subfigures and
51 subtables of the form,
52 %
53 \begin{lstlisting}
54 \begin{subfigmatrix}{NC}
55 \subfigure[]{..}
56 ...
57 \end{subfigmatrix}
58 \end{lstlisting}
59 %
60 where \meta{NC} is the number of subfigures per row (i.\,e.,\ the
61 number of columns). the subfigures are ordered from
62 left-to-right, then top-to-bottom.
63
64 the environment is used within a float environment such as
65 \env{figure} or \env{table}. each subfigure should have a variable width
66 tied to the local \cmd{\linewidth} value so each can be shrunk or
67 expanded to accomate the requested layout.
68
69 The environment does not require ``square'' matrices since it
70 only works on a row-by-row basis; thus you could have a $2 \times 4$,
71 a $1 \times 3$, or a $4 \times 2$ if you so choose. if you neglect to give
72 it a full row, such as the case of a $3 \times 3$ matrix with only
73 8~elements, it simply fills the rows from left to right until
74 it runs out of elements.
75
76
77 \section{further example:}
78
79 if you wanted to create a figure with four subfigures in a tiled
80 or matrix format of $2 \times 2$, the following would suffice,
81 %
82 \begin{lstlisting}
83 \begin{figure}
84 \begin{subfigmatrix}{2}
85 \subfigure[]{...}
86 \subfigure[]{...}
87 \subfigure[]{...}
88 \subfigure[]{...}
89 \end{subfigmatrix}
90 \caption{Example.}
91 \label{f:eg}
92 \end{figure}
93 \end{lstlisting}
94 %
95 the result would look similar to the following,
96 %
97 \begin{quote}
98 \begin{tabular}{@{\quad}c@{\quad}c@{\quad}}
99 [subfig] & [subfig] \\
100 (a) & (b) \\[2ex]
101 [subfig] & [subfig] \\
102 (c) & (d) \\[2ex]
103 \multicolumn{2}{c}{Figure 1: Example.}
104 \end{tabular}
105 \end{quote}
106
107
108 \section{notes:}
109
110 comments, bugs, fixes can be sent to \mail{[email protected]}.
111 what becomes of them is another story. ;)
112
113 each subfigure is placed within a \env{minipage} of the proper width
114 to fit \meta{NC} subfigures within the current float's \cmd{\linewidth},
115 accounting for $2 \times \cmd{\tabcolsep}$'s worth of space between each
116 adjacent subfigure.
117
118 \cmd{\linewidth} is a fairly general length. it is equal to
119 \cmd{\textwidth} for single-column formats, \cmd{\columnwidth} for multiple-%
120 column documents (and also single-column documents), or
121 according to a \cmd{\parbox} or \env{minipage} environment.
122
123 if you are using the \pkg{graphicx} package, the subfigure widths are
124 automatically set to the local \cmd{\linewidth}.
125
126 the separation between figures can be changed via the
127 \cmd{\sfmcolsep} variable, e.\,g.,
128 %
129 \begin{lstlisting}
130 \setlength{\sfmcolsep}{\hspace{0.2in}}
131 \end{lstlisting}
132 %
133 to set a ``hard'' inter-column spacing as opposed to the
134 default behavior of tying the inter-column spacing to the
135 documents tabular column spacing (\cmd{\tabcolsep}\}.
136
137
138 \section{to do:}
139
140 \begin{itemize}
141 \item transposed ordering: from top-to-bottom, then left-to-right.
142 \end{itemize}
143
144 \pagebreak[2]
145
146
147 \section{history:}
148
149 \begin{description}
150 \item[25 Feb 1999]
151 Bil Kleb \bmail{[email protected]} [v1.0]\\
152 Edited for Arseneau-style release to \textsc{ctan}.
153 Changed \cmd{\sfm@colsep} to a more user-tunable \cmd{\sfmcolsep}.
154
155 \item[27 Feb 1997]
156 Bil Kleb \bmail{[email protected]}\\
157 Minor changes.
158
159 \item[27 Feb 1997]
160 Steven Douglas Cochran \bmail{[email protected]}\\
161 Created.
162
163 \item[24 Feb 1997]
164 Bil Kleb \bmail{[email protected]}\\
165 Posted question to news:comp.text.tex.
166 \end{description}
167
168
169 \section{distribution:}
170
171 this program can redistributed and/or modified under the terms
172 of the \LaTeX\ Project Public License Distributed from CTAN
173 archives in directory \href{http://ctan.org/macros/latex/base/lppl.txt}{\nolinkurl{macros/latex/base/lppl.txt}}; either
174 version~1 of the License, or (at your option) any later version.
175
176
177 \end{document}