LaTeX forum ⇒ TeXworksInquire about width and scale

Information and discussion about TeXworks, an integrated LaTeX environment for several platforms
yaozhao
Posts: 57
Joined: Sat Oct 27, 2018 10:38 pm

Inquire about width and scale

Postby yaozhao » Sun Oct 28, 2018 9:56 pm

\includegraphics[width=1\textwidth]{ImageFilename}


Another option command is [scale=0.5]

Any difference between these two option commands? Which one do you prefer?
Also, for scale, I can change the centimeters. What's the meaning of width=1\textwidth?

Many thanks in advance!

Recommended reading 2021:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics
User avatar
Stefan Kottwitz
Site Admin
Posts: 10067
Joined: Mon Mar 10, 2008 9:44 pm

Inquire about width and scale

Postby Stefan Kottwitz » Sun Oct 28, 2018 11:18 pm

Hi!

width means an absolute width of the image in the document. \textwidth is the value of the width of the text body, from left to right. So, no matter what resolution or width the image actually has, this command scales it so it matches the text from left to right margin.

scale=0.5 means scaling by a factor, here it's 50 percent, the half. It's relative to the image original size: if it's 10cm, it now becomes 5cm. So scale is less often used, since it's a multiple (fraction) of the image dimension, not the text dimension.

Stefan
LaTeX.org admin

yaozhao
Posts: 57
Joined: Sat Oct 27, 2018 10:38 pm

Inquire about width and scale

Postby yaozhao » Mon Oct 29, 2018 2:37 am

I'm still confused.

width means an absolute width of the image in the document.


So [width=1\textwidth] means now the width is 1 cm?

User avatar
Johannes_B
Site Moderator
Posts: 4183
Joined: Thu Nov 01, 2012 4:08 pm

Inquire about width and scale

Postby Johannes_B » Mon Oct 29, 2018 3:56 am

No. The width is one time the width of your text width. The width of the page minus the page margins.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.


Return to “TeXworks”

Who is online

Users browsing this forum: No registered users and 3 guests