Reducing figure in resize box

3,546 views
Skip to first unread message

ritchie31

unread,
May 7, 2013, 10:03:39 AM5/7/13
to latexus...@googlegroups.com
Hello forum. I want to resize my figure that is inside resizebox.
I want to use something like \includegraphics[scale=0.7]{jpg/high_school_clean.jpg}, but I think it does not allow me when I use resizebox.
Here an example:

\begin{figure}
\begin{center}
\resizebox{\textwidth}{!}
{\includegraphics{eps/myfigure.eps}}
 \caption{This is my figure}
\label{fig:myfigure}
\end{center}
\end{figure}

Also how can I obtain the bold weight in the word Figure?
Thanks for your help. 

Ole Peter Smith

unread,
May 7, 2013, 10:21:51 AM5/7/13
to latexus...@googlegroups.com
I always use \scalebox{0.7}{\includegraphics{file.png})...

0le


--
You received this message because you are subscribed to the Google Groups "LaTeX Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to latexusersgro...@googlegroups.com.
To post to this group, send email to latexus...@googlegroups.com.
Visit this group at http://groups.google.com/group/latexusersgroup?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
                                            /////
                                         ( O O )
=================oOO==(_)==OOo=================
            Every day and every hour, I'm Learning more
          The more I Learn, the less I Know about before
         The Less I know, the more I want to Look around
             Diggin' deeper into Higher Ground...  UB40
                                   .oooO Oooo.
==================(     )=(     )=====================
                                     \  (     )  /
                                      \_)   (_/
===============================================
                        Ole Peter Smith, IME, UFG
            http://olepeter.mat.ufg.br  - ole at mat.ufg.br
===============================================
                   Life sure is a Mystery to be Lived
                      Not a Problem to be Solved
===============================================

Werner Grundlingh

unread,
May 7, 2013, 11:46:01 AM5/7/13
to latexus...@googlegroups.com
There should be no problem with this. However, I would suggest using

\begin{figure}
  \centering
  \includegraphics[width=\linewidth]{eps/myfigure}
  \caption{This is my figure}
  \label{fig:myfigure}
\end{figure}

As reference, see When should we use \begin{center} instead of \centering? where the discussion is about spacing introduced when using the center environment over \centering. Note that I've also dropped the extension of the file included with \includegraphics. This should be picked up by the driver at compile-time. Also, \linewidth is updated based on the context, and is sometimes more appropriate than the fixed width \textwidth.

For making Figure X.X in bold, you can use the caption package in the following setup: \usepackage[labelfont=bf]{caption}. As reference, see Figure: how to have “Figure 1.5” in bold.

Nikola Biliskov

unread,
May 7, 2013, 1:43:09 PM5/7/13
to latexus...@googlegroups.com

The way in which Figure is shown should be defined in preamble. To define size, I prefer the use of,for example: {width=0.5\textwidth}

--

Nikola Biliskov

unread,
May 7, 2013, 1:45:39 PM5/7/13
to latexus...@googlegroups.com

Yes.. \includegraphics[width=0.5\textwidth]{figname.ext}

ritchie31

unread,
May 8, 2013, 12:27:20 AM5/8/13
to latexus...@googlegroups.com
Sorry guys but it does not allow me to.
I just want to keep this format 

\begin{figure}
\begin{center}
\resizebox{\textwidth}{!}
{\includegraphics[width=\linewidth]{fig1.eps}}
 \caption{myfigure.}
\label{fig1}
\end{center}
\end{figure}

 because it does not mess with the position of the figure on the document. So my question is how to resize the image using this format?

Ole Peter Smith

unread,
May 8, 2013, 12:50:44 AM5/8/13
to latexus...@googlegroups.com
\scalebox...


--
You received this message because you are subscribed to the Google Groups "LaTeX Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to latexusersgro...@googlegroups.com.
To post to this group, send email to latexus...@googlegroups.com.
Visit this group at http://groups.google.com/group/latexusersgroup?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Werner Grundlingh

unread,
May 8, 2013, 1:52:07 AM5/8/13
to latexus...@googlegroups.com
Drop the use of \resizebox{\textwidth}{!}{...} and just scale it using 
  \includegraphics[scale=<num>]{fig1}
or resize it using
  \includegraphics[width=<len>]{fig1}
For <num> you can have any number (for example, 0.5 for 50% scale, 0.3333 for 1/3 scale or 2 for double the size), while <len> can be any length (for example, \linewidth for the full width of the line, 0.5\linewidth for 50% of the line's width, 100pt for 100pt wide or whatever).



--

Peter Flynn

unread,
May 8, 2013, 4:44:20 PM5/8/13
to latexusersgroup
On Wed, May 8, 2013 at 5:27 AM, ritchie31 <medi...@gmail.com> wrote:
Sorry guys but it does not allow me to.

What does that mean? The command is correct and will work. 

 because it does not mess with the position of the figure on the document.

Figures float. That's why they're figures. Using resizebox instead of includegraphics to do the resizing will not affect this. Show us a full example not working.
 
So my question is how to resize the image using this format?

Don't. Use includegraphics[width=\columnwidth] 

///Peter 
Reply all
Reply to author
Forward
0 new messages