| 1 |
<html> |
| 2 |
<!-- |
| 3 |
+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + |
| 4 |
| Copyright(C) 1997-2010 by F. Bosisio | |
| 5 |
| | |
| 6 |
| This program can be redistributed and/or modified under | |
| 7 |
| the terms of the LaTeX Project Public License, either | |
| 8 |
| version 1.3 of this license or (at your option) any later | |
| 9 |
| version. The latest version of this license is in | |
| 10 |
| http://www.latex-project.org/lppl.txt | |
| 11 |
| and version 1.3 or later is part of all LaTeX distributions | |
| 12 |
| version 2005/12/01 or later. | |
| 13 |
| | |
| 14 |
| This work has the LPPL maintenance status `maintained'. | |
| 15 |
| The Current Maintainer of this work is F. Bosisio. | |
| 16 |
| | |
| 17 |
| This work consists of files graphfig.dtx and graphfig.html | |
| 18 |
| and of the derived files graphfig.sty and graphfig.pdf. | |
| 19 |
| | |
| 20 |
| E-mail: [email protected] | |
| 21 |
| CTAN location: macros/latex/contrib/bosisio/ | |
| 22 |
+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + |
| 23 |
--> |
| 24 |
<head> |
| 25 |
<title>Package graphfig</title> |
| 26 |
</head> |
| 27 |
<body> |
| 28 |
|
| 29 |
<h1 align="CENTER"> |
| 30 |
Package <tt>graphfig</tt><br /> |
| 31 |
<small> |
| 32 |
This is version 2.2, last revised 1997/12/15; documentation date 2005/04/09. |
| 33 |
</small> |
| 34 |
</h1> |
| 35 |
|
| 36 |
<p align="CENTER"> |
| 37 |
<strong> |
| 38 |
Author: <i>F. Bosisio</i><br /> |
| 39 |
<small> |
| 40 |
E-mail: <a href="mailto:[email protected]"> |
| 41 |
<tt>[email protected]</tt> |
| 42 |
</a><br /> |
| 43 |
CTAN location: <a href="http://mirror.ctan.org/macros/latex/contrib/bosisio"> |
| 44 |
<tt>macros/latex/contrib/bosisio</tt> |
| 45 |
</a> |
| 46 |
</small> |
| 47 |
</strong> |
| 48 |
</p> |
| 49 |
|
| 50 |
<p align="LEFT"></p> |
| 51 |
|
| 52 |
<!------------------------------------------------------------------------> |
| 53 |
<p> |
| 54 |
|
| 55 |
<h3>Abstract</h3> |
| 56 |
<div> |
| 57 |
Documentation for the package <tt>graphfig</tt>. |
| 58 |
</div> |
| 59 |
|
| 60 |
<hr /><br /> |
| 61 |
<!------------------------------------------------------------------------> |
| 62 |
|
| 63 |
<h2>Table of contents</h2> |
| 64 |
|
| 65 |
<ul> |
| 66 |
<li><a href="#SECTION01">Introduction</a></li> |
| 67 |
<li><a href="#SECTION02">Required packages</a></li> |
| 68 |
<li><a href="#SECTION03">The options</a></li> |
| 69 |
<li><a href="#SECTION04">The <tt>Figure</tt> environment and its relatives</a> |
| 70 |
<ul> |
| 71 |
<li><a href="#SECTION04a">The <tt>graphfile</tt> command</a></li> |
| 72 |
<li><a href="#SECTION04b">Sub-figures</a></li> |
| 73 |
</ul></li> |
| 74 |
</ul> |
| 75 |
|
| 76 |
<hr /><br /> |
| 77 |
<!------------------------------------------------------------------------> |
| 78 |
|
| 79 |
<h2> |
| 80 |
<a name="SECTION01">Introduction</a> |
| 81 |
</h2> |
| 82 |
|
| 83 |
<p> |
| 84 |
This package provides some commands to make the use of graphic files |
| 85 |
in LaTeX simpler. |
| 86 |
</p> |
| 87 |
|
| 88 |
<p> |
| 89 |
It declares the ``<tt>Figure</tt>'' environment (capitalized!) and the two |
| 90 |
commands ``<tt>\graphfile</tt>'' and ``<tt>\graphfile*</tt>''. |
| 91 |
Combining this commands, it is possible to include graphic files in a |
| 92 |
LaTeX document very simply. |
| 93 |
</p> |
| 94 |
|
| 95 |
<hr /><br /> |
| 96 |
<!------------------------------------------------------------------------> |
| 97 |
|
| 98 |
<h2> |
| 99 |
<a name="SECTION02">Required packages</a> |
| 100 |
</h2> |
| 101 |
|
| 102 |
<p> |
| 103 |
This package uses the ``<tt>\includegraphics*</tt>'' command defined in |
| 104 |
the standard <tt>graphics</tt> package. |
| 105 |
Moreover, it uses the package <tt>subfigure</tt> when the |
| 106 |
<a href="#SECTION03"><tt>subfigure</tt> option</a> is specified, and the |
| 107 |
<tt>float</tt> package if the <a href="#SECTION03"><tt>AllowH</tt> option</a> |
| 108 |
is used. |
| 109 |
</p> |
| 110 |
|
| 111 |
<hr /><br /> |
| 112 |
<!------------------------------------------------------------------------> |
| 113 |
|
| 114 |
<h2> |
| 115 |
<a name="SECTION03">The options</a> |
| 116 |
</h2> |
| 117 |
|
| 118 |
<p> |
| 119 |
At now, two options are available: ``<tt>subfigure</tt>'' and |
| 120 |
``<tt>AllowH</tt>''. |
| 121 |
</p> |
| 122 |
|
| 123 |
<p> |
| 124 |
The ``<tt>subfigure</tt>'' option allow the use of sub-figures inside a |
| 125 |
<a href="#SECTION04"><tt>Figure</tt> environment</a>, in order to place |
| 126 |
multiple pictures in a single LaTeX figure (cfr. the <tt>subfigure</tt> |
| 127 |
standard package). |
| 128 |
</p> |
| 129 |
|
| 130 |
<p> |
| 131 |
The ``<tt>AllowH</tt>'' option allow the use of the ``<tt>H</tt>'' float |
| 132 |
specifier for the <a href="#SECTION04"><tt>Figure</tt> environment</a>, |
| 133 |
in order to place the figure exaclty where the command is placed |
| 134 |
(cfr. the <tt>float</tt> standard package). |
| 135 |
</p> |
| 136 |
|
| 137 |
<hr /><br /> |
| 138 |
<!------------------------------------------------------------------------> |
| 139 |
|
| 140 |
<h2> |
| 141 |
<a name="SECTION04">The <tt>Figure</tt> environment and its relatives</a> |
| 142 |
</h2> |
| 143 |
|
| 144 |
<p> |
| 145 |
The ``<tt>Figure</tt>'' environment (capitalized!) is somewhat different from |
| 146 |
the standard LaTeX ``<tt>figure</tt>'' environment: besides an optional |
| 147 |
argument used to specify the placement parameters (which now defaults to |
| 148 |
``<tt>[htbp]</tt>''), it has a mandatory agrument specifying the ``caption'' |
| 149 |
and another optional argument, used as a ``label'' for cross-referencies: |
| 150 |
<pre> |
| 151 |
\begin{Figure}[<htbpH>]{<caption>}[<label>] |
| 152 |
... |
| 153 |
\end{Figure} |
| 154 |
</pre> |
| 155 |
</p> |
| 156 |
|
| 157 |
<p> |
| 158 |
The use of the ``<tt>H</tt>'' specifier (i.e. ``I want my float here!'') is |
| 159 |
possible only if the <a href="#SECTION03">``<tt>AllowH</tt>'' option</a> has |
| 160 |
been specified. |
| 161 |
</p> |
| 162 |
|
| 163 |
<hr /><br /> |
| 164 |
<!------------------------------------------------------------------------> |
| 165 |
|
| 166 |
<h3> |
| 167 |
<a name="SECTION04a">The <tt>graphfile</tt> command</a> |
| 168 |
</h3> |
| 169 |
|
| 170 |
<p> |
| 171 |
Inside the ``<tt>Figure</tt>'' environment, are available the commands: |
| 172 |
<pre> |
| 173 |
\graphfile[<width>]{<file>}[<sub-caption>] |
| 174 |
\graphfile*[<heigth>]{<file>}[<sub-caption>] |
| 175 |
</pre><br /> |
| 176 |
which are a simplified version of the ``<tt>\includegraphics*</tt>'' |
| 177 |
command (which is automatically included by this package; see the |
| 178 |
<tt>graphics</tt> package for reference), since you don't have to worry |
| 179 |
about scaling: the mandatory argument is the name of the graphic file to |
| 180 |
include, whereas the first optional argument specifies the desired width |
| 181 |
(in the non *-form) or heigth (in the *-form) of the figure as a fraction |
| 182 |
of ``<tt>\linewidth</tt>'' (e.g. ``|50|'' means |
| 183 |
``<tt>.50\linewidth</tt>'', i.e. half a line! ), so no unit of measure |
| 184 |
(as ``<tt>cm</tt>'' or ``<tt>pt</tt>'') is required. |
| 185 |
</p> |
| 186 |
|
| 187 |
<p> |
| 188 |
Moreover, since the ``*-form'' of ``<tt>\includegraphics</tt>'' is used, |
| 189 |
the regions outside the bounding-box of postscript files are not drawn. |
| 190 |
</p> |
| 191 |
|
| 192 |
<p> |
| 193 |
Another advantage of the combined use of the |
| 194 |
<a href="#SECTION04">``<tt>Figure</tt>'' environment</a> and the |
| 195 |
``<tt>\graphfile</tt>'' commands is that the picture is automatically |
| 196 |
centered horizontally, so no ``<tt>\centering</tt>'' or similar |
| 197 |
declartion is required. |
| 198 |
<pre> |
| 199 |
\begin{Figure}[<htbpH>]{<caption>}[<label>] |
| 200 |
\graphfile[<width>]{<file>} |
| 201 |
\end{Figure} |
| 202 |
</pre> |
| 203 |
</p> |
| 204 |
|
| 205 |
<hr /><br /> |
| 206 |
<!------------------------------------------------------------------------> |
| 207 |
|
| 208 |
<h3> |
| 209 |
<a name="SECTION04b">Sub-figures</a> |
| 210 |
</h3> |
| 211 |
|
| 212 |
<p> |
| 213 |
If you want to include more than one file in a single figure, you may |
| 214 |
specify <a href="#SECTION03">the ``<tt>subfigure</tt>'' option</a>, which |
| 215 |
includes the <tt>subfigure</tt> package and provides the authomatic |
| 216 |
placement of a sub-caption below each picture. |
| 217 |
</p> |
| 218 |
|
| 219 |
<p> |
| 220 |
If the ``<tt>subfigure</tt>'' option is not specified, multiple graphs are |
| 221 |
still allowed but no sub-caption will appear. |
| 222 |
<pre> |
| 223 |
\graphfile[<width_1>]{<file_1>}[<sub-caption_1>] |
| 224 |
... |
| 225 |
\graphfile[<width_N>]{<file_N>}[<sub-caption_N>] |
| 226 |
</pre><br /> |
| 227 |
This is a combined version of ``<tt>\subfigure</tt>'' and |
| 228 |
``<tt>\includegraphics*</tt>'' (see the <tt>subfigure</tt> and |
| 229 |
<tt>graphics</tt> packages for reference): |
| 230 |
the last optional argument specify a ``caption'' for the sub-figure under |
| 231 |
consideration, while the first two arguments work exactly like as described |
| 232 |
above in the case of one only picture (indeed, you can use the last optional |
| 233 |
argument even if the <tt>subfigure</tt> option was not specified, in which |
| 234 |
case it is simply ignored). |
| 235 |
</p> |
| 236 |
|
| 237 |
<p> |
| 238 |
Each individual caption is printed preceded by a bracketed letter, which is |
| 239 |
the sub-figure counter and is printed even if no caption is specified. |
| 240 |
Using only a series of ``<tt>\graphfile[...]{...}[...]</tt>'' commands |
| 241 |
inside a ``<tt>Figure</tt>'' environment provides an equal spacing beetween |
| 242 |
the pictures and around them, without the need for any extra command. |
| 243 |
</p> |
| 244 |
|
| 245 |
<p> |
| 246 |
Finally, if a ``<tt><label></tt>'' was specified as the last optional |
| 247 |
argument to the <a href="#SECTION04">``<tt>Figure</tt>'' environment</a>, |
| 248 |
you can reference to each individual sub-figure by the labels |
| 249 |
``<tt><label>:a</tt>'', ``<tt><label>:b</tt>'', and so on, without |
| 250 |
the need for declaring them. |
| 251 |
<pre> |
| 252 |
\begin{Figure}[<htbpH>]{<caption>}[<label>] |
| 253 |
\graphfile[<width_1>]{<file_1>}[<sub-caption_1>] |
| 254 |
\graphfile[<width_2>]{<file_2>}[<sub-caption_2>] |
| 255 |
: |
| 256 |
: |
| 257 |
\end{Figure} |
| 258 |
</pre> |
| 259 |
</p> |
| 260 |
|
| 261 |
<hr /><br /> |
| 262 |
<!------------------------------------------------------------------------> |
| 263 |
|
| 264 |
<address> |
| 265 |
<i>F. Bosisio</i><br /> |
| 266 |
E-mail: <a href="mailto:[email protected]"><tt>[email protected]</tt></a> |
| 267 |
</address> |
| 268 |
|
| 269 |
<!------------------------------------------------------------------------> |
| 270 |
|
| 271 |
</body> |
| 272 |
</html> |
| 273 |
|