blob: 4795116c4d87b3b9e81632939b9a541624f3cc92 [file]
<!DOCTYPE html>
<html>
<!-- Created by Texinfo 6.8dev+dev, http://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!-- This manual is for GNU Texinfo (version 6.8dev, 23 February 2022),
a documentation system that can produce both online information and a
printed manual from a single source using semantic markup.
Copyright (C) 1988, 1990-1993, 1995-1999, 2001-2022 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with no
Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
Texts. A copy of the license is included in the section entitled
"GNU Free Documentation License". -->
<title>Image Scaling (GNU Texinfo 6.8dev)</title>
<meta name="description" content="Image Scaling (GNU Texinfo 6.8dev)">
<meta name="keywords" content="Image Scaling (GNU Texinfo 6.8dev)">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="texi2any">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link href="index.html" rel="start" title="Top">
<link href="Command-and-Variable-Index.html" rel="index" title="Command and Variable Index">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="Images.html" rel="up" title="Images">
<link href="Image-Syntax.html" rel="prev" title="Image Syntax">
<style type="text/css">
<!--
a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em}
div.example {margin-left: 3.2em}
span:hover a.copiable-link {visibility: visible}
-->
</style>
</head>
<body lang="en">
<div class="subsection-level-extent" id="Image-Scaling">
<div class="nav-panel">
<p>
Previous: <a href="Image-Syntax.html" accesskey="p" rel="prev">Image Syntax</a>, Up: <a href="Images.html" accesskey="u" rel="up">Inserting Images</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Command-and-Variable-Index.html" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<h4 class="subsection" id="Image-Scaling-1">9.2.2 Image Scaling</h4>
<a class="index-entry-id" id="index-Images-2"></a>
<a class="index-entry-id" id="index-Scaling-images"></a>
<a class="index-entry-id" id="index-Width-of-images"></a>
<a class="index-entry-id" id="index-Height-of-images"></a>
<a class="index-entry-id" id="index-Aspect-ratio-of-images"></a>
<a class="index-entry-id" id="index-Distorting-images"></a>
<p>The optional <var class="var">width</var> and <var class="var">height</var> arguments to the
<code class="code">@image</code> command (see the previous section) specify the size to
which to scale the image. They are only taken into account in TeX.
If neither is specified, the image is presented in its natural size
(given in the file); if only one is specified, the other is scaled
proportionately; and if both are specified, both are respected, thus
likely distorting the original image by changing its aspect ratio.
</p>
<a class="index-entry-id" id="index-Dimensions-and-image-sizes"></a>
<p>The <var class="var">width</var> and <var class="var">height</var> may be specified using any valid TeX
dimension, namely:
</p>
<dl class="table">
<dt id='index-Points-_0028dimension_0029'><span>pt<a class="copiable-link" href='#index-Points-_0028dimension_0029'> &para;</a></span></dt>
<dd><p>point (72.27pt = 1in)
</p></dd>
<dt id='index-Picas'><span>pc<a class="copiable-link" href='#index-Picas'> &para;</a></span></dt>
<dd><p>pica (1pc = 12pt)
</p></dd>
<dt id='index-Big-points'><span>bp<a class="copiable-link" href='#index-Big-points'> &para;</a></span></dt>
<dd><p>big point (72bp = 1in)
</p></dd>
<dt id='index-Inches'><span>in<a class="copiable-link" href='#index-Inches'> &para;</a></span></dt>
<dd><p>inch
</p></dd>
<dt id='index-Centimeters'><span>cm<a class="copiable-link" href='#index-Centimeters'> &para;</a></span></dt>
<dd><p>centimeter (2.54cm = 1in)
</p></dd>
<dt id='index-Millimeters'><span>mm<a class="copiable-link" href='#index-Millimeters'> &para;</a></span></dt>
<dd><p>millimeter (10mm = 1cm)
</p></dd>
<dt id='index-Didot-points'><span>dd<a class="copiable-link" href='#index-Didot-points'> &para;</a></span></dt>
<dd><p>did&ocirc;t point (1157dd = 1238pt)
</p></dd>
<dt id='index-Ciceros'><span>cc<a class="copiable-link" href='#index-Ciceros'> &para;</a></span></dt>
<dd><p>cicero (1cc = 12dd)
</p></dd>
<dt id='index-Scaled-points'><span>sp<a class="copiable-link" href='#index-Scaled-points'> &para;</a></span></dt>
<dd><p>scaled point (65536sp = 1pt)
</p></dd>
</dl>
<a class="index-entry-id" id="index-ridt_002eeps"></a>
<p>For example, the following will scale a file <samp class="file">ridt.eps</samp> to one
inch vertically, with the width scaled proportionately:
</p>
<div class="example">
<pre class="example-preformatted">@image{ridt,,1in}
</pre></div>
<a class="index-entry-id" id="index-epsf_002etex"></a>
<p>For <code class="code">@image</code> to work with TeX, the file <samp class="file">epsf.tex</samp> must be
installed somewhere that TeX can find it. (The standard location is
<samp class="file"><var class="var">texmf</var>/tex/generic/dvips/epsf.tex</samp>, where <var class="var">texmf</var> is a
root of your TeX directory tree.) This file is included in the
Texinfo distribution and is also available from
<a class="uref" href="ftp://tug.org/tex/epsf.tex">ftp://tug.org/tex/epsf.tex</a>, among other places.
</p>
<p><code class="code">@image</code> can be used within a line as well as for displayed
figures. Therefore, if you intend it to be displayed, be sure to leave
a blank line before the command, or the output will run into the
preceding text.
</p>
<p>Image scaling is presently implemented only in TeX, not in HTML or
any other sort of output.
</p>
</div>
<hr>
<div class="nav-panel">
<p>
Previous: <a href="Image-Syntax.html">Image Syntax</a>, Up: <a href="Images.html">Inserting Images</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Command-and-Variable-Index.html" title="Index" rel="index">Index</a>]</p>
</div>
</body>
</html>