# Align pictures with text

I am having problems to align or better put, make my figures being of equal size/margins like my text

What I do is this

\documentclass[a4paper,12pt]{book}

%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Document preamble %%%
%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{appendix}

\usepackage[sort&compress,square,comma,numbers]{natbib}
\usepackage{hypernat}
% for figures
\usepackage{pstricks}
\usepackage{graphicx}
\usepackage[center,tight]{subfigure}
\usepackage{eso-pic}
\usepackage{epigraph}
\usepackage{verbatim}
\usepackage{geometry}                % See geometry.pdf to learn the layout options. \usepackage{graphicx}
\usepackage{epstopdf}
\usepackage{tikz}
\usepackage{mathptmx}
\usepackage{accents}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage[todo,colour,check,front]{optional}
\usepackage{slashed}
\usepackage{multirow}
\usepackage{url}

\DeclareGraphicsRule{.tif}{png}{.png}{convert #1 dirname #1/basename #1 .tif.png}

\usepackage[utf8]{inputenc}
\usepackage{slantsc}
\usepackage{array}
\usepackage{wasysym}
\usepackage{scalerel}
\usepackage{graphicx}

\pagestyle{empty}
\usepackage[T1]{fontenc}

%special font

\usepackage{mathpazo}
\usepackage{slashed}            % for slashed characters in math mode
\usepackage{bbm}                % for \mathbbm{1} (unit matrix)
\usepackage{xspace}             % For spacing after commands

\renewcommand{\textfraction}{1}
\renewcommand{\topfraction}{1.5}
\setcounter{totalnumber}{10}
\setcounter{secnumdepth}{5}
\setcounter{tocdepth}{5}
\usepackage{blindtext}

%\setcounter{MaxMatrixCols}{30}

\numberwithin{equation}{section}

\setlength{\textwidth}{18cm}

\setlength{\oddsidemargin}{.5cm}
\setlength{\evensidemargin}{.5cm}
\setlength{\topmargin}{0.25cm}
\setlength{\footskip}{30pt}

\usepackage[usenames,dvipsnames]{pstricks}
\usepackage{epsfig}
\usepackage{pst-plot} % For axes

\usepackage{fancyhdr}
\usepackage{paralist}
\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{\markboth{\MakeUppercase{\chaptername}\ \thechapter:\ #1}{}}
\renewcommand{\sectionmark}[1]{}
\fancyhf{}

% adjust rest of page layout (needs to be done after fancy headers)

% just to generate text for the example

% Add rotating possibility in columns and such
\usepackage{rotating}

\interfootnotelinepenalty=1000

%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% The document itself %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

\begin{figure}[!ht]
\begin{center}
\minipage{0.8\textwidth}
%\centerline{  \includegraphics[scale=0.65]{./chapter3/figures_susy/q_qq.png}}
\includegraphics[scale=0.65 ]{./chapter3/figures_susy/q_qq.png}

\caption{The Feynman diagrams bla bla bla }
\endminipage\hill
\label{fig:q_qq}
\end{center}
\end{figure}
\end{document}


I what ever I am trying, my pics are always bigger than the text... thanks

Alex

-
working example ? –  Alex Mar 30 '13 at 20:28
this {\centering\par \makebox[0pt]{\includegraphics{...}} aligns pic, but this cannot be surrounded by the \begin{figure} etc... \par} –  Alex Mar 30 '13 at 20:38
Instead of using the scale key, use width, as in \includegraphics[width=\textwidth]{./chapter3/figures_susy/q_qq.png}. –  Gonzalo Medina Mar 30 '13 at 20:40

To guarantee that your images will have a width equat to the text width, instead of using the scale key use widthwith a value equal to \textwidth, as in

\includegraphics[width=\textwidth]{./chapter3/figures_susy/q_qq.png}


A complete example; the showframe package was only used to draw a frame showing the margins:

\documentclass{article}
\usepackage{showframe}
\usepackage{graphicx}

\begin{document}

\noindent\includegraphics[scale=0.9]{example-image-a}

\noindent\includegraphics[width=\textwidth]{example-image-a}

\end{document}
`

-