summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-grmaxwidth.html
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-05-22 23:51:44 +0000
committerKarl Berry <karl@freefriends.org>2009-05-22 23:51:44 +0000
commit566f5207d7e3cafb0633d31277067336ccd9cca7 (patch)
tree7af53e7ac405185168bc1dc38c4e820f442b78d0 /Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-grmaxwidth.html
parentb0beea26ffffd915bb6d9b82f2d65a0a05b7e23b (diff)
move generic english documents out of texmf-doc
git-svn-id: svn://tug.org/texlive/trunk@13396 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-grmaxwidth.html')
-rw-r--r--Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-grmaxwidth.html34
1 files changed, 34 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-grmaxwidth.html b/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-grmaxwidth.html
new file mode 100644
index 00000000000..06edd868751
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-grmaxwidth.html
@@ -0,0 +1,34 @@
+<head>
+<title>UK TeX FAQ -- question label grmaxwidth</title>
+</head><body>
+<h3>Limit the width of imported graphics</h3>
+<p/>Suppose you have graphics which may or may not be able to fit within
+the width of the page; if they will fit, you want to set them at their
+natural size, but otherwise you want to scale the whole picture so
+that it fits within the page width.
+<p/>You do this by delving into the innards of the graphics package (which
+of course needs a little LaTeX internals programming):
+<blockquote>
+<pre>
+\makeatletter
+\def\maxwidth{%
+ \ifdim\Gin@nat@width&gt;\linewidth
+ \linewidth
+ \else
+ \Gin@nat@width
+ \fi
+}
+\makeatother
+</pre>
+</blockquote><p>
+This defines a &ldquo;variable&rdquo; width which has the properties you want.
+Replace <code>\</code><code>linewidth</code> if you have a different constraint on the width
+of the graphic.
+<p/>Use the command as follows:
+<blockquote>
+<pre>
+\includegraphics[width=\maxwidth]{figure}
+</pre>
+</blockquote><p>
+<p/><p>This question on the Web: <a href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=grmaxwidth">http://www.tex.ac.uk/cgi-bin/texfaq2html?label=grmaxwidth</a>
+</body>