summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-wideflt.html
blob: 5518fe2e7247806742859f3ca1e844f32e3bc9dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<head>
<title>UK TeX FAQ -- question label wideflt</title>
</head><body>
<h3>Centring a very wide figure or table</h3>
<p/>The normal means of centring a figure or table object is to include
<code>\</code><code>centering</code> at the top of the float.  This doesn&#8217;t help if the
object is wider than <code>\</code><code>textwidth</code> &#8212; the object starts at the left
margin and juts out into the right margin (which is actually doubly
unsatisfactory, since as well as looking bad, the float won&#8217;t be
placed until the next <code>\</code><code>clearpage</code> or the like.)
<p/>You can avoid the problem by rescaling the figure or table to fit, but
this is often not satisfactory, for several reasons.
<p/>Otherwise, if the object is wider than the printable area of the page,
you&#8217;ve no choice other than to <a href="FAQ-landscape.html">rotate it</a>.  If,
however, the object is <em>just</em> wider than the text block, you can
make it pretend to be the right size by:
<blockquote>
<pre>
\begin{figure}
  \noindent
  \makebox[\textwidth]{\includegraphics{my-wide-figure}}%
  \caption{This figure juts out into both margins}
\end{figure}
</pre>

</blockquote><p>
Note the <code>\</code><code>noindent</code>: the <code>\</code><code>makebox</code> starts a paragraph, and you
really don&#8217;t want that indented by <code>\</code><code>parindent</code>.
<p/><p>This question on the Web: <a href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=wideflt">http://www.tex.ac.uk/cgi-bin/texfaq2html?label=wideflt</a>
</body>