2

I need to make the picture with the width of one column in two column paper, and I wrote \linewidth but it doesn't work as shown below; it's smaller than the width and also it is very small. I need to make it bigger; any help?

my photo

\begin{figure}[H]
\centering
\includegraphics[width=\linewidth]{Data/classoutput.eps}\label{pic10}
\caption{Caption}
\end{figure}
  • 1
    You most like have a white border around the image. To see whether this is the case, use \fbox{\includegraphics[width=\dimexpr\linewidth-2\fboxsep-2\fboxrule]{<image>}}. – Werner Apr 9 '13 at 4:04
  • no i didn't want to have a border, i need to increase the width of the photo from both side – SMH Apr 9 '13 at 4:07
  • 2
    What I'm saying is that \fbox will show you whether you actually already have a white border around the image. Post the output with what I presented above so we can see what it looks like. – Werner Apr 9 '13 at 4:10
  • 1
    The picture is supposed to stay the same size (actually a tad smaller). Either way, it idea behind asking you to actually show the image with the border would be to highlight whether or not there is a thick white border around your image. If so (which is likely), then you should use epstool to trim the whitespace around the image... – Werner Apr 9 '13 at 4:21
  • 1
    See Tight bounding box for EPS. – Werner Apr 9 '13 at 4:22
3

your image has a lot of whitespace around it. You can clip the image with

\includegraphics[trim=20 20 20 20,clip]{...}

(choose correct four values, in my example it is 20pt on all sides).

0

With PSTricks.

enter image description here

% filename is main.tex
% compile it with pdflatex -shell-escape main.tex

\documentclass{article}
\usepackage{filecontents}
\begin{filecontents*}{dummy.tex}
\documentclass[pstricks,border=12pt]{standalone}
\usepackage{pstricks}
\usepackage{graphicx}
\newsavebox\IBox
\sbox\IBox{\includegraphics{example-image-a}}

\psset
{
    xunit=\dimexpr\wd\IBox/10,
    yunit=\dimexpr\ht\IBox/10,
}

\addtopsstyle{gridstyle}
{
    griddots=0,
    gridcolor=red,
    gridwidth=0.4pt,
    subgriddiv=5,
    subgridcolor=green!50,
    subgridwidth=0.1pt,
    gridlabels=5pt,
}

\begin{document}
\begin{pspicture}[showgrid=top](10,10)
    \rput[bl](0,0){\usebox\IBox}
\end{pspicture}

\begin{pspicture}[showgrid=false](5,5)(10,10)
\psclip{\psframe[dimen=middle,linestyle=none](5,5)(10,10)}
    \rput[bl](0,0){\usebox\IBox}
\endpsclip
\end{pspicture}
\end{document}
\end{filecontents*}

\immediate\write18{latex dummy}
\immediate\write18{dvips dummy}
\immediate\write18{ps2pdf dummy.ps}


\usepackage{graphicx}
\begin{document}
Karl's students do not care about dashing patterns.
\begin{figure}[hbtp]
\centering
\includegraphics[page=2,width=0.8\linewidth]{dummy}
\caption{The cropped image}
\label{fig:TheCroppedImage}
\end{figure}
Karl's students do not care about arrow tips. Karl's students, by the way, do not know what a transformation matrix is.
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.