TeXworksInquire about width and scale

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

Inquire about width and scale

Post by yaozhao »

Code: Select all

\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 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX books
User avatar
Stefan Kottwitz
Site Admin
Posts: 10308
Joined: Mon Mar 10, 2008 9:44 pm

Inquire about width and scale

Post by Stefan Kottwitz »

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

Post by yaozhao »

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: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Inquire about width and scale

Post by Johannes_B »

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.
Post Reply